Commit 8c36a316 authored by Adam Benanti's avatar Adam Benanti Committed by Kyle Meyer

Add missing comma to various doc-strings and comments

parent 5071208b
......@@ -8,7 +8,7 @@ TOP := $(dir $(lastword $(MAKEFILE_LIST)))
# You might also want to set LOAD_PATH. If you do, then it must
# contain "-L .".
#
# If you don't do so then the default is set in the "Load-Path"
# If you don't do so, then the default is set in the "Load-Path"
# section below. The default assumes that all dependencies are
# installed either at "../<DEPENDENCY>", or when using package.el
# at "ELPA_DIR/<DEPENDENCY>-<HIGHEST-VERSION>".
......
......@@ -191,7 +191,7 @@ called. If any of them returns nil, then the commit is not
performed and the buffer is not killed. The user should then
fix the issue and try again.
The functions are called with one argument. If it is non-nil
The functions are called with one argument. If it is non-nil,
then that indicates that the user used a prefix argument to
force finishing the session despite issues. Functions should
usually honor this wish and return non-nil."
......
......@@ -191,8 +191,8 @@ and change branch related variables."
;;;###autoload
(defun magit-checkout (revision)
"Checkout REVISION, updating the index and the working tree.
If REVISION is a local branch then that becomes the current
branch. If it is something else then `HEAD' becomes detached.
If REVISION is a local branch, then that becomes the current
branch. If it is something else, then `HEAD' becomes detached.
Checkout fails if the working tree or the staging area contain
changes.
\n(git checkout REVISION)."
......
......@@ -2052,7 +2052,7 @@ starts and ends inside the body of a that section, then the type
is `region'. If the region is empty after a mouse click, then
`hunk' is returned instead of `region'.
If optional STRICT is non-nil then return nil if the diff type of
If optional STRICT is non-nil, then return nil if the diff type of
the section at point is `untracked' or the section at point is not
actually a `diff' but a `diffstat' section."
(let ((siblings (and (not ssection) (magit-region-sections))))
......@@ -2101,7 +2101,7 @@ actually a `diff' but a `diffstat' section."
(defun magit-diff-highlight (section selection)
"Highlight the diff-related SECTION.
If SECTION is not a diff-related section, then do nothing and
return nil. If SELECTION is non-nil then it is a list of sections
return nil. If SELECTION is non-nil, then it is a list of sections
selected by the region, including SECTION. All of these sections
are highlighted."
(if (and (magit-section-match 'commit section)
......
......@@ -206,7 +206,7 @@ FILE has to be relative to the top directory of the repository."
"Compare REVA:FILEA with REVB:FILEB using Ediff.
FILEA and FILEB have to be relative to the top directory of the
repository. If REVA or REVB is nil then this stands for the
repository. If REVA or REVB is nil, then this stands for the
working tree state.
If the region is active, use the revisions on the first and last
......
......@@ -124,7 +124,7 @@ like pretty much every other keymap:
(defun magit-dired-jump (&optional other-window)
"Visit file at point using Dired.
With a prefix argument, visit in another window. If there
is no file at point then instead visit `default-directory'."
is no file at point, then instead visit `default-directory'."
(interactive "P")
(dired-jump other-window (-if-let (file (magit-file-at-point))
(progn (setq file (expand-file-name file))
......
......@@ -335,7 +335,7 @@ Currently this only adds the following key bindings.
(defun magit-file-rename (file newname)
"Rename the FILE to NEWNAME.
If FILE isn't tracked in Git fallback to using `rename-file'."
If FILE isn't tracked in Git, fallback to using `rename-file'."
(interactive
(let* ((file (magit-read-file "Rename file"))
(newname (read-file-name (format "Rename %s to file: " file))))
......@@ -371,7 +371,7 @@ tree."
With a prefix argument FORCE do so even when FILE has uncommitted
changes.
If FILE isn't tracked in Git fallback to using `delete-file'."
If FILE isn't tracked in Git, fallback to using `delete-file'."
(interactive (list (magit-read-file "Delete file")))
(if (magit-file-tracked-p file)
(magit-run-git "rm" (and force "--force") "--" file)
......
......@@ -168,7 +168,7 @@ has the form (REGEXP FACE FORMATTER). REGEXP is a regular
expression used to match full refs. The first entry whose REGEXP
matches the reference is used. The first regexp submatch becomes
the \"label\" that represents the ref and is propertized with
font FONT. If FORMATTER is non-nil it should be a function that
font FONT. If FORMATTER is non-nil, it should be a function that
takes two arguments, the full ref and the face. It is supposed
to return a propertized label that represents the ref."
:package-version '(magit . "2.1.0")
......@@ -247,7 +247,7 @@ framework ultimately determines how the collection is displayed."
;; `shell-quote-argument'), but Git for Windows expects shell
;; quoting in the dos style.
(shell-file-name (if (and (eq system-type 'windows-nt)
;; If we have Cygwin mount points
;; If we have Cygwin mount points,
;; the git flavor is cygwin, so dos
;; shell quoting is probably wrong.
(not magit-cygwin-mount-points))
......@@ -282,8 +282,8 @@ to do the following.
(defun magit-git-str (&rest args)
"Execute Git with ARGS, returning the first line of its output.
If there is no output return nil. If the output begins with a
newline return an empty string. Like `magit-git-string' but
If there is no output, return nil. If the output begins with a
newline, return an empty string. Like `magit-git-string' but
ignore `magit-git-debug'."
(setq args (-flatten args))
(magit--with-refresh-cache (cons default-directory args)
......@@ -344,8 +344,8 @@ add a section in the respective process buffer."
(defun magit-git-string (&rest args)
"Execute Git with ARGS, returning the first line of its output.
If there is no output return nil. If the output begins with a
newline return an empty string."
If there is no output, return nil. If the output begins with a
newline, return an empty string."
(setq args (-flatten args))
(magit--with-refresh-cache (cons default-directory args)
(with-temp-buffer
......@@ -377,7 +377,7 @@ message and add a section in the respective process buffer."
(defun magit-git-wash (washer &rest args)
"Execute Git with ARGS, inserting washed output at point.
Actually first insert the raw output at point. If there is no
output call `magit-cancel-section'. Otherwise temporarily narrow
output, call `magit-cancel-section'. Otherwise temporarily narrow
the buffer to the inserted text, move to its beginning, and then
call function WASHER with ARGS as its sole argument."
(declare (indent 1))
......@@ -573,9 +573,9 @@ a bare repository."
(defun magit-file-relative-name (&optional file tracked)
"Return the path of FILE relative to the repository root.
If optional FILE is nil or omitted return the relative path of
If optional FILE is nil or omitted, return the relative path of
the file being visited in the current buffer, if any, else nil.
If the file is not inside a Git repository then return nil.
If the file is not inside a Git repository, then return nil.
If TRACKED is non-nil, return the path only if it matches a
tracked file."
......@@ -766,12 +766,12 @@ are considered."
(defun magit-rev-parse (&rest args)
"Execute `git rev-parse ARGS', returning first line of output.
If there is no output return nil."
If there is no output, return nil."
(apply #'magit-git-string "rev-parse" args))
(defun magit-rev-parse-safe (&rest args)
"Execute `git rev-parse ARGS', returning first line of output.
If there is no output return nil. Like `magit-rev-parse' but
If there is no output, return nil. Like `magit-rev-parse' but
ignore `magit-git-debug'."
(apply #'magit-git-str "rev-parse" args))
......@@ -1009,7 +1009,7 @@ which is different from the current branch and still exists."
(defun magit-get-current-tag (&optional rev with-distance)
"Return the closest tag reachable from REV.
If optional REV is nil then default to `HEAD'.
If optional REV is nil, then default to `HEAD'.
If optional WITH-DISTANCE is non-nil then return (TAG COMMITS),
if it is `dirty' return (TAG COMMIT DIRTY). COMMITS is the number
of commits in `HEAD' but not in TAG and DIRTY is t if there are
......@@ -1028,10 +1028,10 @@ uncommitted changes, nil otherwise."
(defun magit-get-next-tag (&optional rev with-distance)
"Return the closest tag from which REV is reachable.
If optional REV is nil then default to `HEAD'.
If optional REV is nil, then default to `HEAD'.
If no such tag can be found or if the distance is 0 (in which
case it is the current tag, not the next) return nil instead.
If optional WITH-DISTANCE is non-nil then return (TAG COMMITS)
case it is the current tag, not the next), return nil instead.
If optional WITH-DISTANCE is non-nil, then return (TAG COMMITS)
where COMMITS is the number of commits in TAG but not in REV."
(--when-let (magit-git-str "describe" "--contains" (or rev "HEAD"))
(save-match-data
......
......@@ -230,10 +230,10 @@ improve performance."
(defcustom magit-save-repository-buffers t
"Whether to save file-visiting buffers when appropriate.
If non-nil then all modified file-visiting buffers belonging
If non-nil, then all modified file-visiting buffers belonging
to the current repository may be saved before running Magit
commands and before creating or refreshing Magit buffers.
If `dontask' then this is done without user intervention, for
If `dontask', then this is done without user intervention, for
any other non-nil value the user has to confirm each save.
The default is t to avoid surprises, but `dontask' is the
......
......@@ -200,7 +200,7 @@ The prefix used to toggle any switch can be changed by binding
another key to `magit-invoke-popup-switch'. Likewise binding
another key to `magit-invoke-popup-option' changes the prefixed
used to set any option. The two prefixes have to be different.
If you change these bindings you should also change the `prefix'
If you change these bindings, you should also change the `prefix'
property of the button types `magit-popup-switch-button' and
`magit-popup-option-button'.
......@@ -313,7 +313,7 @@ Don't confuse this with `magit-current-popup-args'.")
Use this inside the `interactive' form of a popup aware command
to determine whether it was invoked from a popup and if so from
which popup. If the current command was invoked without the use
of a popup then this is nil.")
of a popup, then this is nil.")
(defvar magit-current-popup-action nil
"The popup action now being executed.")
......@@ -441,7 +441,7 @@ when the command is invoked directly, then it returns the default
value of the variable `SHORTNAME-arguments'.
Optional argument GROUP specifies the Custom group into which the
option is placed. If omitted then the option is placed into some
option is placed. If omitted, then the option is placed into some
group the same way it is done when directly using `defcustom' and
omitting the group, except when NAME begins with \"magit-\", in
which case the group `magit-git-arguments' is used.
......@@ -591,11 +591,11 @@ changed in `magit-popup-mode-keymap').
DESC is a string describing the purpose of the argument, it is
displayed in the popup.
If optional ENABLE is non-nil then the switch is on by default.
If optional ENABLE is non-nil, then the switch is on by default.
SWITCH is inserted after all other switches already defined for
POPUP, unless optional PREPEND is non-nil, in which case it is
placed first. If optional AT is non-nil then it should be the
placed first. If optional AT is non-nil, then it should be the
KEY of another switch already defined for POPUP, the argument
is then placed before or after AT, depending on PREPEND."
(declare (indent defun))
......@@ -621,7 +621,7 @@ and VALUE is its default value.
OPTION is inserted after all other options already defined for
POPUP, unless optional PREPEND is non-nil, in which case it is
placed first. If optional AT is non-nil then it should be the
placed first. If optional AT is non-nil, then it should be the
KEY of another option already defined for POPUP, the argument
is then placed before or after AT, depending on PREPEND."
(declare (indent defun))
......@@ -645,7 +645,7 @@ actually used for anything.
COMMAND is inserted after all other commands already defined for
POPUP, unless optional PREPEND is non-nil, in which case it is
placed first. If optional AT is non-nil then it should be the
placed first. If optional AT is non-nil, then it should be the
KEY of another command already defined for POPUP, the command
is then placed before or after AT, depending on PREPEND."
(declare (indent defun))
......@@ -667,7 +667,7 @@ displayed in the popup.
COMMAND is inserted after all other commands already defined for
POPUP, unless optional PREPEND is non-nil, in which case it is
placed first. If optional AT is non-nil then it should be the
placed first. If optional AT is non-nil, then it should be the
KEY of another command already defined for POPUP, the command
is then placed before or after AT, depending on PREPEND."
(declare (indent defun))
......
......@@ -128,7 +128,7 @@ in another buffer.
However \"RET\" used to behave differently in `magit-refs-mode'
buffers, doing surprising things, some of which cannot really be
described as \"visit this thing\". If you have grown accustomed
to such inconsistent, but to you useful, behavior then you can
to such inconsistent, but to you useful, behavior, then you can
restore that by adding one or more of the below symbols to the
value of this option. But keep in mind that by doing so you
don't only introduce inconsistencies, you also lose some
......
......@@ -24,7 +24,7 @@
;;; Commentary:
;; This library implements "sections" as used in all Magit buffers.
;; If you have used Magit before then you probably know what that
;; If you have used Magit before, then you probably know what that
;; means, otherwise think "read-only Org-Mode for Git", kinda.
;;; Code:
......@@ -98,7 +98,7 @@ diff-related sections being the only exception."
magit-section-set-visibility-from-cache)
"Hook used to set the initial visibility of a section.
Stop at the first function that returns non-nil. The value
should be `show' or `hide'. If no function returns non-nil
should be `show' or `hide'. If no function returns non-nil,
determine the visibility as usual, i.e. use the hardcoded
section specific default (see `magit-insert-section')."
:package-version '(magit . "2.4.0")
......@@ -466,7 +466,7 @@ SECTION's body (and heading) obviously cannot be visible."
(defun magit-section-show-level (level)
"Show surrounding sections up to LEVEL.
If LEVEL is negative show up to the absolute value.
If LEVEL is negative, show up to the absolute value.
Sections at higher levels are hidden."
(if (< level 0)
(let ((s (magit-current-section)))
......@@ -588,13 +588,13 @@ precise."
(magit-section-match-2 (cdr l1) (cdr l2))))))
(defmacro magit-section-when (condition &rest body)
"If the section at point matches CONDITION evaluate BODY.
"If the section at point matches CONDITION, evaluate BODY.
If the section matches, then evaluate BODY forms sequentially
with `it' bound to the section and return the value of the last
form. If there are no BODY forms, then return the value of the
section. If the section does not match or if there is no section
at point then return nil.
at point, then return nil.
See `magit-section-match' for the forms CONDITION can take."
(declare (indent 1)
......@@ -616,7 +616,7 @@ section is compared against each CONDITION; the BODY forms of the
first match are evaluated sequentially and the value of the last
form is returned. Inside BODY the symbol `it' is bound to the
section at point. If no clause succeeds or if there is no
section at point return nil.
section at point, return nil.
See `magit-section-match' for the forms CONDITION can take.
Additionally a CONDITION of t is allowed in the final clause, and
......@@ -770,7 +770,7 @@ The `content' property of the section struct is the end of the
heading (which lasts from `start' to `content') and the beginning
of the the body (which lasts from `content' to `end'). If the
value of `content' is nil, then the section has no heading and
its body cannot be collapsed. If a section does have a heading
its body cannot be collapsed. If a section does have a heading,
then its height must be exactly one line, including a trailing
newline character. This isn't enforced, you are responsible for
getting it right. The only exception is that this function does
......@@ -885,7 +885,7 @@ highlighted using `magit-diff-highlight'. Return t."
(defun magit-section-highlight-selection (_ selection)
"Highlight the section-selection region.
If SELECTION is non-nil then it is a list of sections selected by
If SELECTION is non-nil, then it is a list of sections selected by
the region. The headings of these sections are then highlighted.
This is a fallback for people who don't want to highlight the
......@@ -1032,9 +1032,9 @@ either `hide' or nil."
(defun magit-section-siblings (section &optional direction)
"Return a list of the sibling sections of SECTION.
If optional DIRECTION is `prev' then return siblings that come
before SECTION, if it is `next' then return siblings that come
after SECTION. For all other values return all siblings
If optional DIRECTION is `prev', then return siblings that come
before SECTION. If it is `next', then return siblings that come
after SECTION. For all other values, return all siblings
excluding SECTION itself."
(-when-let (parent (magit-section-parent section))
(let ((siblings (magit-section-children parent)))
......@@ -1072,7 +1072,7 @@ apply to diffs where things get a bit more complicated, but even
here if the region looks like it usually does, then that's not
a valid selection as far as this function is concerned.
If optional TYPES is non-nil then the selection not only has to
If optional TYPES is non-nil, then the selection not only has to
be valid; the types of all selected sections additionally have to
match one of TYPES, or nil is returned."
(when (use-region-p)
......@@ -1123,7 +1123,7 @@ FUNCTION has to move point forward or return nil."
Add FUNCTION at the beginning of the hook list unless optional
APPEND is non-nil, in which case FUNCTION is added at the end.
If FUNCTION already is a member then move it to the new location.
If FUNCTION already is a member, then move it to the new location.
If optional AT is non-nil and a member of the hook list, then
add FUNCTION next to that instead. Add before or after AT, or
......
......@@ -344,8 +344,8 @@ When the region is active offer to drop all contained stashes."
(cl-defun magit-insert-stashes (&optional (ref "refs/stash")
(heading "Stashes:"))
"Insert `stashes' section showing reflog for \"refs/stash\".
If optional REF is non-nil show reflog for that instead.
If optional HEADING is non-nil use that as section heading
If optional REF is non-nil, show reflog for that instead.
If optional HEADING is non-nil, use that as section heading
instead of \"Stashes:\"."
(when (magit-rev-verify ref)
(magit-insert-section (stashes ref (not magit-status-expand-stashes))
......
......@@ -166,7 +166,7 @@ Non-interactively DIRECTORY is (re-)initialized unconditionally."
"Show the status of the current Git repository in a buffer.
With a prefix argument prompt for a repository to be shown.
With two prefix arguments prompt for an arbitrary directory.
If that directory isn't the root of an existing repository
If that directory isn't the root of an existing repository,
then offer to initialize it as a new repository."
(interactive
(list (and (or current-prefix-arg (not (magit-toplevel)))
......@@ -205,7 +205,7 @@ then offer to initialize it as a new repository."
(display-warning 'magit (format "\
Magit requires Git >= %s, but on %s the version is %s.
If multiple Git versions are installed on the host then the
If multiple Git versions are installed on the host, then the
problem might be that TRAMP uses the wrong executable.
First check the value of `magit-git-executable'. Its value is
......
......@@ -198,7 +198,7 @@ Global settings:
When `magit-wip-before-change-mode' is enabled then these actions
can fairly easily be undone: `discard', `reverse',
`stage-all-changes', and `unstage-all-changes'. If and only if
this mode is enabled then `safe-with-wip' has the same effect
this mode is enabled, then `safe-with-wip' has the same effect
as adding all of these symbols individually."
:package-version '(magit . "2.1.0")
:group 'magit-essentials
......@@ -551,7 +551,7 @@ See info node `(magit)Debugging Tools' for more information."
"Bind variables to submatches according to VARLIST then evaluate BODY.
Bind the symbols in VARLIST to submatches of the current match
data, starting with 1 and incrementing by 1 for each symbol. If
the last match was against a string then that has to be provided
the last match was against a string, then that has to be provided
as STRING."
(declare (indent 2) (debug (listp form body)))
(let ((s (cl-gensym "string"))
......@@ -567,7 +567,7 @@ as STRING."
(defun magit-delete-match (&optional num)
"Delete text matched by last search.
If optional NUM is specified only delete that subexpression."
If optional NUM is specified, only delete that subexpression."
(delete-region (match-beginning (or num 0))
(match-end (or num 0))))
......
......@@ -668,7 +668,7 @@ the index number. That number is incremented by one, and becomes
the index number of the entry to be inserted. If you don't want
to number the inserted revisions, then use nil for INDEX-REGEXP.
If INDEX-REGEXP is non-nil then both POINT-FORMAT and EOB-FORMAT
If INDEX-REGEXP is non-nil, then both POINT-FORMAT and EOB-FORMAT
should contain \"%N\", which is replaced with the number that was
determined in the previous step.
......@@ -700,7 +700,7 @@ the current buffer according to `magit-pop-revision-stack-format'.
Revisions can be put on the stack using `magit-copy-section-value'
and `magit-copy-buffer-revision'.
If the stack is empty or with a prefix argument instead read a
If the stack is empty or with a prefix argument, instead read a
revision in the minibuffer. By using the minibuffer history this
allows selecting an item which was popped earlier or to insert an
arbitrary reference or revision without first pushing it onto the
......@@ -881,7 +881,7 @@ Use the function by the same name instead of this variable.")
;;;###autoload
(defun magit-version (&optional print-dest)
"Return the version of Magit currently in use.
If optional argument PRINT-DEST is non-nil output
If optional argument PRINT-DEST is non-nil, output
stream (interactively, the echo area, or the current buffer with
a prefix argument), also print the used versions of Magit, Git,
and Emacs to it."
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment