Permalink
Browse files

cleanup doc-strings

  • Loading branch information...
tarsius committed Apr 4, 2013
1 parent 9834198 commit 7dc3ef48a8a48605349af7dc26a0308700df6b8f
Showing with 77 additions and 77 deletions.
  1. +9 −9 magit-bisect.el
  2. +2 −2 magit-blame.el
  3. +1 −1 magit-flow.el
  4. +7 −8 magit-key-mode.el
  5. +1 −2 magit-stgit.el
  6. +1 −1 magit-svn.el
  7. +11 −9 magit-wip.el
  8. +32 −32 magit.el
  9. +13 −13 rebase-mode.el
View
@@ -44,7 +44,7 @@ match REQUIRED-STATUS."
(list :status (if (magit--bisecting-p) 'running 'not-running)))))
(defun magit--bisect-cmd (&rest args)
- "Run `git bisect ...' and update the status buffer"
+ "Run `git bisect ...' and update the status buffer."
(with-current-buffer (magit-find-status-buffer)
(let* ((output (apply 'magit-git-lines (append '("bisect") args)))
(cmd (car args))
@@ -67,7 +67,7 @@ match REQUIRED-STATUS."
(magit-refresh))
(defun magit--bisect-info-for-status (branch)
- "Return bisect info suitable for display in the status buffer"
+ "Return bisect info suitable for display in the status buffer."
(let* ((info (magit--bisect-info))
(status (plist-get info :status)))
(cond ((eq status 'not-running)
@@ -82,7 +82,7 @@ match REQUIRED-STATUS."
"(bisecting; unknown error occured)"))))
(defun magit-bisect-start ()
- "Start a bisect session"
+ "Start a bisect session."
(interactive)
(if (magit--bisecting-p)
(error "Already bisecting"))
@@ -91,21 +91,21 @@ match REQUIRED-STATUS."
(magit--bisect-cmd "start" bad good)))
(defun magit-bisect-reset ()
- "Quit a bisect session"
+ "Quit a bisect session."
(interactive)
(unless (magit--bisecting-p)
(error "Not bisecting"))
(magit--bisect-cmd "reset"))
(defun magit-bisect-good ()
- "Tell git that the current revision is good during a bisect session"
+ "Tell git that the current revision is good during a bisect session."
(interactive)
(unless (magit--bisecting-p 'running)
(error "Not bisecting"))
(magit--bisect-cmd "good"))
(defun magit-bisect-bad ()
- "Tell git that the current revision is bad during a bisect session"
+ "Tell git that the current revision is bad during a bisect session."
(interactive)
(unless (magit--bisecting-p 'running)
(error "Not bisecting"))
@@ -119,15 +119,15 @@ match REQUIRED-STATUS."
(magit--bisect-cmd "skip"))
(defun magit-bisect-log ()
- "Show the bisect log"
+ "Show the bisect log."
(interactive)
(unless (magit--bisecting-p)
(error "Not bisecting"))
(magit-run-git "bisect" "log")
(magit-display-process))
(defun magit-bisect-visualize ()
- "Show the remaining suspects with gitk"
+ "Show the remaining suspects with gitk."
(interactive)
(unless (magit--bisecting-p)
(error "Not bisecting"))
@@ -144,7 +144,7 @@ match REQUIRED-STATUS."
"Previously run bisect commands.")
(defun magit-bisect-run (command)
- "Bisect automatically by running commands after each step"
+ "Bisect automatically by running commands after each step."
(interactive
(list
(read-from-minibuffer "Run command (like this): "
View
@@ -186,8 +186,8 @@ boundaries from BEG to END, the return value is nil."
The second argument TZ can be used to add the timezone in (-)HHMM
format to UNIXTIME. UNIXTIME should be either a number
-containing seconds since epoch or Emacs's (HIGH LOW
-. IGNORED) format."
+containing seconds since epoch or Emacs's (HIGH LOW . IGNORED)
+format."
(when (numberp tz)
(unless (numberp unixtime)
(setq unixtime (float-time unixtime)))
View
@@ -43,7 +43,7 @@
(magit-run-git-flow "feature" "start" name)))
(defun magit-flow-feature-list ()
- "List the feature branches managed by flow"
+ "List the feature branches managed by flow."
(let ((current-feature nil)
(all-features nil))
(dolist (name (magit-run-git-lines-flow "feature" "list"))
View
@@ -30,7 +30,7 @@
(defvar magit-key-mode-key-maps '()
"This will be filled lazily with proper `define-key' built
- keymaps as they're requested.")
+keymaps as they're requested.")
(defvar magit-key-mode-buf-name "*magit-key: %s*"
"Format string to create the name of the magit-key buffer.")
@@ -40,11 +40,11 @@
(defvar magit-key-mode-current-args nil
"A hash-table of current argument set (which will eventually
- make it to the git command-line).")
+make it to the git command-line).")
(defvar magit-key-mode-current-options '()
"Current option set (which will eventually make it to the git
- command-line).")
+command-line).")
(defvar magit-log-mode-window-conf nil
"Will hold the pre-menu configuration of magit.")
@@ -464,8 +464,7 @@ the key combination highlighted before the description."
(insert (propertize header 'face 'font-lock-keyword-face) "\n"))
(defvar magit-key-mode-args-in-cols nil
- "When true, draw arguments in columns as with switches and
- options.")
+ "When true, draw arguments in columns as with switches and options.")
(defun magit-key-mode-draw-args (args)
"Draw the args part of the menu."
@@ -510,9 +509,9 @@ the key combination highlighted before the description."
one-col-each)))
(defun magit-key-mode-draw-in-cols (strings one-col-each)
- "Given a list of strings, print in columns (using `insert'). If
-ONE-COL-EACH is true then don't columify, but rather, draw each
-item on one line."
+ "Given a list of strings, print in columns (using `insert').
+If ONE-COL-EACH is true then don't columify, but rather, draw
+each item on one line."
(let ((longest-act (apply 'max (mapcar 'length strings))))
(while strings
(let ((str (car strings)))
View
@@ -235,8 +235,7 @@
(defun magit-stgit-refresh ()
"Refresh the contents of a patch in an StGit series.
If there is no marked patch in the series, refreshes the current
-patch.
-Otherwise, refreshes the marked patch."
+patch. Otherwise, refreshes the marked patch."
(interactive)
(if magit-stgit--marked-patch
(magit-run magit-stgit-executable "refresh" "-p" magit-stgit--marked-patch)
View
@@ -211,7 +211,7 @@ If USE-CACHE is non nil, use the cached information."
(magit-refresh))))
(defun magit-svn-external-directories()
- "Returns all .git directories within `magit-svn-externals-dir'"
+ "Returns all .git directories within `magit-svn-externals-dir'."
(require 'find-lisp)
(find-lisp-find-files-internal (expand-file-name magit-svn-externals-dir)
'(lambda(file dir)
View
@@ -86,19 +86,21 @@
"Commit message for git-wip commits.
The following `format'-like specs are supported:
-%f the full name of the file being saved, and
-%r the name of the file being saved, relative to the repository root
-%g the root of the git repository."
+%f the full name of the file being saved
+#g the root of the git repository
+%r the name of the file being saved,
+ relative to the repository root."
:group 'magit
:type 'string)
(defcustom magit-wip-echo-area-message "Wrote %f (wip)"
"Message shown in the echo area after creating a git-wip commit.
The following `format'-like specs are supported:
-%f the full name of the file being saved, and
-%r the name of the file being saved, relative to the repository root.
-%g the root of the git repository."
+%f the full name of the file being saved
+#g the root of the git repository
+%r the name of the file being saved,
+ relative to the repository root."
:group 'magit
:type '(choice (const :tag "No message" nil) string))
@@ -108,9 +110,9 @@ The following `format'-like specs are supported:
(define-minor-mode magit-wip-save-mode
"Magit support for committing to a work-in-progress ref.
-When this minor mode is turned on and a file is saved inside a writable
-git repository then it is also committed to a special work-in-progress
-ref."
+When this minor mode is turned on and a file is saved inside a
+writable git repository then it is also committed to a special
+work-in-progress ref."
:lighter magit-wip-save-mode-lighter
(if magit-wip-save-mode
(add-hook 'after-save-hook 'magit-wip-save t t)
View
@@ -202,8 +202,9 @@ offer them as choices for `magit-status'."
(defcustom magit-repo-dirs-depth 3
"The maximum depth to look for Git repos.
-When looking for a Git repository below the directories in `magit-repo-dirs',
-Magit will only descend this many levels deep."
+When looking for a Git repository below the directories in
+`magit-repo-dirs', Magit will only descend this many levels
+deep."
:group 'magit
:type 'integer)
@@ -339,11 +340,11 @@ Autocompletion is used by functions like `magit-checkout',
`magit-interactive-rebase' and others which offer branch name
completion.
-The value 'name-then-remote means remotes will be of the
-form \"name (remote)\", while the value 'remote-slash-name
-means that they'll be of the form \"remote/name\". I.e. something that's
-listed as \"remotes/upstream/next\" by \"git branch -l -a\"
-will be \"upstream/next\"."
+The value 'name-then-remote means remotes will be of the form
+\"name (remote)\", while the value 'remote-slash-name means that
+they'll be of the form \"remote/name\". I.e. something that's
+listed as \"remotes/upstream/next\" by \"git branch -l -a\" will
+be \"upstream/next\"."
:group 'magit
:type '(choice (const :tag "name (remote)" branch-then-remote)
(const :tag "remote/name" remote-slash-branch)))
@@ -910,8 +911,7 @@ in STR."
(unless (fboundp 'string-match-p)
(defun string-match-p (regexp string &optional start)
- "Same as `string-match' except this function does not
-change the match data."
+ "Same as `string-match' but don't change the match data."
(let ((inhibit-changing-match-data t))
(string-match regexp string start))))
@@ -945,7 +945,7 @@ contents as well. Don't follow symlinks."
;;; Utilities
(defun magit-set-variable-and-refresh (symbol value)
- "Set SYMBOL to VALUE and call `magit-refresh-all'"
+ "Set SYMBOL to VALUE and call `magit-refresh-all'."
(set-default symbol value)
(magit-refresh-all))
@@ -983,9 +983,9 @@ contents as well. Don't follow symlinks."
(defun magit-completing-read (prompt collection &optional predicate require-match
initial-input hist def)
- "Call function in `magit-completing-read-function' to read user input
+ "Call function in `magit-completing-read-function' to read user input.
-Read `completing-read' documentation for the meaning of the argument"
+Read `completing-read' documentation for the meaning of the argument."
(funcall magit-completing-read-function prompt collection predicate require-match
initial-input hist def))
@@ -1549,8 +1549,8 @@ If TYPE is nil, the section won't be highlighted."
,s)))
(defun magit-set-section (title type start end)
- "Create a new section of title TITLE and type TYPE with specified start and
-end positions."
+ "Create a new section of title TITLE and type TYPE.
+Use the specified START and END positions."
(let ((section (magit-new-section title type)))
(setf (magit-section-beginning section) start)
(setf (magit-section-end section) end)
@@ -3256,15 +3256,15 @@ Customize `magit-diff-refine-hunk' to change the default mode."
target))))
(defvar magit-file-name ()
- "Name of file the buffer show a different version of")
+ "Name of file the buffer shows a different version of.")
(make-variable-buffer-local 'magit-file-name)
(defvar magit-show-current-version ()
- "Which version of MAGIT-FILE-NAME is shown in this buffer")
+ "Which version of MAGIT-FILE-NAME is shown in this buffer.")
(make-variable-buffer-local 'magit-show-current-version)
(defun magit-save-index ()
- "Add the content of current file as if it was the index"
+ "Add the content of current file as if it was the index."
(interactive)
(unless (eq magit-show-current-version 'index)
(error "Current buffer doesn't visit the index version of a file"))
@@ -3880,9 +3880,10 @@ insert a line to tell how to insert more of them"
"Buffer name for displaying commit log messages.")
(defun magit-show-commit (commit &optional scroll inhibit-history select)
- "Show information about a commit in the buffer named by
-`magit-commit-buffer-name'. COMMIT can be any valid name for a commit
-in the current Git repository.
+ "Show information about a commit.
+Show it in the buffer named by `magit-commit-buffer-name'.
+COMMIT can be any valid name for a commit in the current Git
+repository.
When called interactively or when SELECT is non-nil, switch to
the commit buffer using `pop-to-buffer'.
@@ -4013,8 +4014,8 @@ in `magit-commit-buffer-name'."
(defun magit-remote-branch-for (local-branch &optional fully-qualified-name)
"Guess the remote branch name that LOCAL-BRANCH is tracking.
-Gives a fully qualified name (e.g., refs/remotes/origin/master) if
-FULLY-QUALIFIED-NAME is non-nil."
+Gives a fully qualified name (e.g., refs/remotes/origin/master)
+if FULLY-QUALIFIED-NAME is non-nil."
(let ((merge (magit-get "branch" local-branch "merge"))
(remote (magit-get "branch" local-branch "remote")))
(save-match-data
@@ -4150,8 +4151,8 @@ to consider it or not when called with that buffer current."
t)
(defun magit-save-buffers-predicate-tree-only ()
- "Only prompt to save buffers which are within the current git project (as
- determined by the dir passed to `magit-status'."
+ "Only prompt to save buffers which are within the current git project.
+As determined by the directory passed to `magit-status'."
(and buffer-file-name
(string= (magit-get-top-dir magit-default-directory)
(magit-get-top-dir (file-name-directory buffer-file-name)))))
@@ -4324,7 +4325,7 @@ tracking brach name suggesting a sensible default."
(defun magit-maybe-create-local-tracking-branch (rev)
"Depending on the users wishes, create a tracking branch for
-rev... maybe."
+REV... maybe."
(if (string-match "^\\(?:refs/\\)?remotes/\\([^/]+\\)/\\(.+\\)" rev)
(let* ((remote (match-string 1 rev))
(branch (match-string 2 rev))
@@ -4418,8 +4419,8 @@ With prefix, forces the move even if NEW already exists.
(magit-rev-to-git old) new))
(defun magit-guess-branch ()
- "Guess branch name depending on the context of cursor and
-return a string or nil when not found."
+ "Return a branch name depending on the context of cursor.
+If no branch is found near the cursor return nil."
(let ((branch ; may be t. see `magit-section-case'
(magit-section-case (item info)
((branch)
@@ -5870,8 +5871,7 @@ FILE is the path of the file whose log must be displayed.
`magit-current-range' will be set to the value of RANGE.
-STYLE controls the display. It is either `'long', `'oneline', or something else.
- "
+STYLE controls the display. It is either `'long', `'oneline', or something else."
(magit-configure-have-graph)
(magit-configure-have-decorate)
(magit-configure-have-abbrev)
@@ -6302,7 +6302,7 @@ These are the branch names with the remote name stripped."
(defvar magit-branches-buffer-name "*magit-branches*")
(defun magit--is-branch-at-point-remote ()
- "Return non-nil if the branch at point is a remote tracking branch"
+ "Return non-nil if the branch at point is a remote tracking branch."
(magit-remote-part-of-branch (magit--branch-name-at-point)))
(defun magit-remote-part-of-branch (branch)
@@ -6571,7 +6571,7 @@ These are the branch names with the remote name stripped."
(magit-interactive-resolve (cadr info)))))
(defun magit-submodule-update (&optional init)
- "Update the submodule of the current git repository
+ "Update the submodule of the current git repository.
With a prefix arg, do a submodule update --init."
(interactive "P")
(let ((default-directory (magit-get-top-dir default-directory)))
@@ -6583,7 +6583,7 @@ With a prefix arg, do a submodule update --init."
(magit-submodule-update t))
(defun magit-submodule-init ()
- "Initialize the submodules"
+ "Initialize the submodules."
(interactive)
(let ((default-directory (magit-get-top-dir default-directory)))
(magit-run-git-async "submodule" "init")))
Oops, something went wrong.

0 comments on commit 7dc3ef4

Please sign in to comment.