ソースを参照

Add punctuation at the end of the first line of docstrings. Code cleanup.

Bastien Guerry 12 年 前
コミット
8eb584331a

+ 1 - 1
lisp/ob-R.el

@@ -145,7 +145,7 @@ This function is called by `org-babel-execute-src-block'."
 ;; helper functions
 
 (defun org-babel-variable-assignments:R (params)
-  "Return list of R statements assigning the block's variables"
+  "Return list of R statements assigning the block's variables."
   (let ((vars (mapcar #'cdr (org-babel-get-header params :var))))
     (mapcar
      (lambda (pair)

+ 1 - 1
lisp/ob-asymptote.el

@@ -88,7 +88,7 @@ Asymptote does not support sessions"
   (error "Asymptote does not support sessions"))
 
 (defun org-babel-variable-assignments:asymptote (params)
-  "Return list of asymptote statements assigning the block's variables"
+  "Return list of asymptote statements assigning the block's variables."
   (mapcar #'org-babel-asymptote-var-to-asymptote
 	  (mapcar #'cdr (org-babel-get-header params :var))))
 

+ 1 - 1
lisp/ob-gnuplot.el

@@ -183,7 +183,7 @@ This function is called by `org-babel-execute-src-block'."
       buffer)))
 
 (defun org-babel-variable-assignments:gnuplot (params)
-  "Return list of gnuplot statements assigning the block's variables"
+  "Return list of gnuplot statements assigning the block's variables."
   (mapcar
    (lambda (pair) (format "%s = \"%s\"" (car pair) (cdr pair)))
    (org-babel-gnuplot-process-vars params)))

+ 1 - 1
lisp/ob-haskell.el

@@ -125,7 +125,7 @@ then create one.  Return the initialized session."
       (current-buffer))))
 
 (defun org-babel-variable-assignments:haskell (params)
-  "Return list of haskell statements assigning the block's variables"
+  "Return list of haskell statements assigning the block's variables."
   (mapcar (lambda (pair)
 	    (format "let %s = %s"
 		    (car pair)

+ 1 - 1
lisp/ob-js.el

@@ -130,7 +130,7 @@ specifying a variable of the same value."
     session))
 
 (defun org-babel-variable-assignments:js (params)
-  "Return list of Javascript statements assigning the block's variables"
+  "Return list of Javascript statements assigning the block's variables."
   (mapcar
    (lambda (pair) (format "var %s=%s;"
 			  (car pair) (org-babel-js-var-to-js (cdr pair))))

+ 11 - 39
lisp/ob-lilypond.el

@@ -107,7 +107,6 @@ blocks")
 
 (defun org-babel-expand-body:lilypond (body params)
   "Expand BODY according to PARAMS, return the expanded body."
-
   (let ((vars (mapcar #'cdr (org-babel-get-header params :var))))
     (mapc
      (lambda (pair)
@@ -127,7 +126,6 @@ Depending on whether we are in arrange mode either:
 1. Attempt to execute lilypond block according to header settings
   (This is the default basic mode)
 2. Tangle all lilypond blocks and process the result (arrange mode)"
-
   (ly-set-header-args ly-arrange-mode)
   (if ly-arrange-mode
       (ly-tangle)
@@ -137,14 +135,12 @@ Depending on whether we are in arrange mode either:
   "ob-lilypond specific tangle, attempts to invoke
 =ly-execute-tangled-ly= if tangle is successful. Also passes
 specific arguments to =org-babel-tangle="
-
   (interactive)
   (if (org-babel-tangle nil "yes" "lilypond")
       (ly-execute-tangled-ly) nil))
 
 (defun ly-process-basic (body params)
-  "Execute a lilypond block in basic mode"
-
+  "Execute a lilypond block in basic mode."
   (let* ((result-params (cdr (assoc :result-params params)))
 	 (out-file (cdr (assoc :file params)))
 	 (cmdline (or (cdr (assoc :cmdline params))
@@ -153,7 +149,6 @@ specific arguments to =org-babel-tangle="
 
     (with-temp-file in-file
       (insert (org-babel-expand-body:generic body params)))
-
     (org-babel-eval
      (concat
       (ly-determine-ly-path)
@@ -165,18 +160,15 @@ specific arguments to =org-babel-tangle="
       (file-name-sans-extension out-file)
       " "
       cmdline
-      in-file) "")
-    ) nil)
+      in-file) "")) nil)
 
 (defun org-babel-prep-session:lilypond (session params)
   "Return an error because LilyPond exporter does not support sessions."
-
   (error "Sorry, LilyPond does not currently support sessions!"))
 
 (defun ly-execute-tangled-ly ()
   "Compile result of block tangle with lilypond.
 If error in compilation, attempt to mark the error in lilypond org file"
-
   (when ly-compile-post-tangle
     (let ((ly-tangled-file (ly-switch-extension
                             (buffer-file-name) ".lilypond"))
@@ -203,7 +195,6 @@ If error in compilation, attempt to mark the error in lilypond org file"
 (defun ly-compile-lilyfile (file-name &optional test)
   "Compile lilypond file and check for compile errors
 FILE-NAME is full path to lilypond (.ly) file"
-
   (message "Compiling LilyPond...")
   (let ((arg-1 (ly-determine-ly-path)) ;program
         (arg-2 nil)                    ;infile
@@ -241,7 +232,6 @@ nil as file-name since it is unused in this context"
 (defun ly-process-compile-error (file-name)
   "Process the compilation error that has occurred.
 FILE-NAME is full path to lilypond file"
-
   (let ((line-num (ly-parse-line-num)))
     (let ((error-lines (ly-parse-error-line file-name line-num)))
       (ly-mark-error-line file-name error-lines)
@@ -251,7 +241,6 @@ FILE-NAME is full path to lilypond file"
   "Mark the erroneous lines in the lilypond org buffer.
 FILE-NAME is full path to lilypond file.
 LINE is the erroneous line"
-
   (switch-to-buffer-other-window
    (concat (file-name-nondirectory
             (ly-switch-extension file-name ".org"))))
@@ -267,7 +256,6 @@ LINE is the erroneous line"
 
 (defun ly-parse-line-num (&optional buffer)
   "Extract error line number."
-
   (when buffer
     (set-buffer buffer))
   (let ((start
@@ -292,7 +280,6 @@ LINE is the erroneous line"
   "Extract the erroneous line from the tangled .ly file
 FILE-NAME is full path to lilypond file.
 LINENO is the number of the erroneous line"
-
   (with-temp-buffer
     (insert-file-contents (ly-switch-extension file-name ".ly")
 			  nil nil nil t)
@@ -307,7 +294,6 @@ LINENO is the number of the erroneous line"
   "Attempt to display the generated pdf file
 FILE-NAME is full path to lilypond file
 If TEST is non-nil, the shell command is returned and is not run"
-
   (when ly-display-pdf-post-tangle
     (let ((pdf-file (ly-switch-extension file-name ".pdf")))
       (if (file-exists-p pdf-file)
@@ -326,7 +312,6 @@ If TEST is non-nil, the shell command is returned and is not run"
   "Attempt to play the generated MIDI file
 FILE-NAME is full path to lilypond file
 If TEST is non-nil, the shell command is returned and is not run"
-
   (when ly-play-midi-post-tangle
     (let ((midi-file (ly-switch-extension file-name ".midi")))
       (if (file-exists-p midi-file)
@@ -344,7 +329,6 @@ If TEST is non-nil, the shell command is returned and is not run"
 (defun ly-determine-ly-path (&optional test)
   "Return correct path to ly binary depending on OS
 If TEST is non-nil, it contains a simulation of the OS for test purposes"
-
   (let ((sys-type
          (or test system-type)))
     (cond ((string= sys-type  "darwin")
@@ -356,7 +340,6 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes"
 (defun ly-determine-pdf-path (&optional test)
   "Return correct path to pdf viewer depending on OS
 If TEST is non-nil, it contains a simulation of the OS for test purposes"
-
   (let ((sys-type
          (or test system-type)))
     (cond ((string= sys-type  "darwin")
@@ -368,7 +351,6 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes"
 (defun ly-determine-midi-path (&optional test)
   "Return correct path to midi player depending on OS
 If TEST is non-nil, it contains a simulation of the OS for test purposes"
-
   (let ((sys-type
          (or test test system-type)))
     (cond ((string= sys-type  "darwin")
@@ -378,8 +360,7 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes"
           (t ly-nix-midi-path))))
 
 (defun ly-toggle-midi-play ()
-  "Toggle whether midi will be played following a successful compilation"
-
+  "Toggle whether midi will be played following a successful compilation."
   (interactive)
   (setq ly-play-midi-post-tangle
         (not ly-play-midi-post-tangle))
@@ -388,8 +369,7 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes"
                        "ENABLED." "DISABLED."))))
 
 (defun ly-toggle-pdf-display ()
-  "Toggle whether pdf will be displayed following a successful compilation"
-
+  "Toggle whether pdf will be displayed following a successful compilation."
   (interactive)
   (setq ly-display-pdf-post-tangle
         (not ly-display-pdf-post-tangle))
@@ -398,35 +378,28 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes"
                        "ENABLED." "DISABLED."))))
 
 (defun ly-toggle-png-generation ()
-  "Toggle whether png image will be generated by compilation"
-
+  "Toggle whether png image will be generated by compilation."
   (interactive)
-  (setq ly-gen-png
-        (not ly-gen-png))
+  (setq ly-gen-png (not ly-gen-png))
   (message (concat "PNG image generation has been "
                    (if ly-gen-png "ENABLED." "DISABLED."))))
 
 (defun ly-toggle-html-generation ()
-  "Toggle whether html will be generated by compilation"
-
+  "Toggle whether html will be generated by compilation."
   (interactive)
-  (setq ly-gen-html
-        (not ly-gen-html))
+  (setq ly-gen-html (not ly-gen-html))
   (message (concat "HTML generation has been "
                    (if ly-gen-html "ENABLED." "DISABLED."))))
 
 (defun ly-toggle-pdf-generation ()
-  "Toggle whether pdf will be generated by compilation"
-
+  "Toggle whether pdf will be generated by compilation."
   (interactive)
-  (setq ly-gen-pdf
-        (not ly-gen-pdf))
+  (setq ly-gen-pdf (not ly-gen-pdf))
   (message (concat "PDF generation has been "
                    (if ly-gen-pdf "ENABLED." "DISABLED."))))
 
 (defun ly-toggle-arrange-mode ()
-  "Toggle whether in Arrange mode or Basic mode"
-
+  "Toggle whether in Arrange mode or Basic mode."
   (interactive)
   (setq ly-arrange-mode
         (not ly-arrange-mode))
@@ -435,7 +408,6 @@ If TEST is non-nil, it contains a simulation of the OS for test purposes"
 
 (defun ly-switch-extension (file-name ext)
   "Utility command to swap current FILE-NAME extension with EXT"
-
   (concat (file-name-sans-extension
            file-name) ext))
 

+ 1 - 1
lisp/ob-ocaml.el

@@ -93,7 +93,7 @@
                            (get-buffer tuareg-interactive-buffer-name))))
 
 (defun org-babel-variable-assignments:ocaml (params)
-  "Return list of ocaml statements assigning the block's variables"
+  "Return list of ocaml statements assigning the block's variables."
   (mapcar
    (lambda (pair) (format "let %s = %s;;" (car pair)
 			  (org-babel-ocaml-elisp-to-ocaml (cdr pair))))

+ 2 - 2
lisp/ob-octave.el

@@ -110,7 +110,7 @@ end")
   (org-babel-prep-session:octave session params 'matlab))
 
 (defun org-babel-variable-assignments:octave (params)
-  "Return list of octave statements assigning the block's variables"
+  "Return list of octave statements assigning the block's variables."
   (mapcar
    (lambda (pair)
      (format "%s=%s;"
@@ -265,7 +265,7 @@ This removes initial blank and comment lines and then calls
     (org-babel-import-elisp-from-file temp-file '(16))))
 
 (defun org-babel-octave-read-string (string)
-  "Strip \\\"s from around octave string"
+  "Strip \\\"s from around octave string."
   (if (string-match "^\"\\([^\000]+\\)\"$" string)
       (match-string 1 string)
     string))

+ 2 - 2
lisp/ob-perl.el

@@ -60,7 +60,7 @@ This function is called by `org-babel-execute-src-block'."
   (error "Sessions are not supported for Perl."))
 
 (defun org-babel-variable-assignments:perl (params)
-  "Return list of perl statements assigning the block's variables"
+  "Return list of perl statements assigning the block's variables."
   (mapcar
    (lambda (pair)
      (format "$%s=%s;"
@@ -81,7 +81,7 @@ specifying a var of the same value."
 (defvar org-babel-perl-buffers '(:default . nil))
 
 (defun org-babel-perl-initiate-session (&optional session params)
-  "Return nil because sessions are not supported by perl"
+  "Return nil because sessions are not supported by perl."
 nil)
 
 (defvar org-babel-perl-wrapper-method

+ 2 - 2
lisp/ob-python.el

@@ -99,7 +99,7 @@ VARS contains resolved variable references"
 ;; helper functions
 
 (defun org-babel-variable-assignments:python (params)
-  "Return list of python statements assigning the block's variables"
+  "Return list of python statements assigning the block's variables."
   (mapcar
    (lambda (pair)
      (format "%s=%s"
@@ -287,7 +287,7 @@ last statement in BODY, as elisp."
 	  (org-babel-eval-read-file tmp-file)))))))
 
 (defun org-babel-python-read-string (string)
-  "Strip 's from around python string"
+  "Strip 's from around python string."
   (if (string-match "^'\\([^\000]+\\)'$" string)
       (match-string 1 string)
     string))

+ 1 - 1
lisp/ob-ruby.el

@@ -102,7 +102,7 @@ This function is called by `org-babel-execute-src-block'."
 ;; helper functions
 
 (defun org-babel-variable-assignments:ruby (params)
-  "Return list of ruby statements assigning the block's variables"
+  "Return list of ruby statements assigning the block's variables."
   (mapcar
    (lambda (pair)
      (format "%s=%s"

+ 1 - 1
lisp/ob-sh.el

@@ -90,7 +90,7 @@ This function is called by `org-babel-execute-src-block'."
 ;; helper functions
 
 (defun org-babel-variable-assignments:sh (params)
-  "Return list of shell statements assigning the block's variables"
+  "Return list of shell statements assigning the block's variables."
   (let ((sep (cdr (assoc :separator params))))
     (mapcar
      (lambda (pair)

+ 2 - 2
lisp/ob.el

@@ -1636,7 +1636,7 @@ With optional prefix argument ARG, jump backward ARG many source blocks."
 
 ;;;###autoload
 (defun org-babel-mark-block ()
-  "Mark current src block"
+  "Mark current src block."
   (interactive)
   ((lambda (head)
      (when head
@@ -2021,7 +2021,7 @@ code ---- the results are extracted in the syntax of the source
         (delete-region start (org-babel-result-end))))))
 
 (defun org-babel-result-end ()
-  "Return the point at the end of the current set of results"
+  "Return the point at the end of the current set of results."
   (save-excursion
     (cond
      ((org-at-table-p) (progn (goto-char (org-table-end)) (point)))

+ 6 - 6
lisp/org-agenda.el

@@ -3236,9 +3236,9 @@ the global options and expect it to be applied to the entire view.")
 
 
 (defun org-agenda-use-sticky-p ()
-  "Return non-NIL if existing agenda buffer named
-`org-agenda-buffer-name' exists, and should be shown instead of
-generating a new one"
+  "Return non-nil if an agenda buffer named
+`org-agenda-buffer-name' exists and should be shown instead of
+generating a new one."
   (and
    ;; turned off by user
    org-agenda-sticky
@@ -3257,7 +3257,7 @@ generating a new one"
       org-agenda-this-buffer-is-sticky))))
 
 (defun org-prepare-agenda-window (abuf)
-  "Setup agenda buffer in the window"
+  "Setup agenda buffer in the window."
   (let* ((awin (get-buffer-window abuf))
 	 wconf)
     (cond
@@ -6385,7 +6385,7 @@ If ERROR is non-nil, throw an error, otherwise just return nil."
       nil)))
 
 (defun org-agenda-Quit (&optional arg)
-  "Exit agenda by removing the window or the buffer"
+  "Exit agenda by removing the window or the buffer."
   (interactive)
   (if org-agenda-columns-active
       (org-columns-quit)
@@ -9036,7 +9036,7 @@ details and examples."
     (eq date today)))
 
 (defun org-agenda-todo-yesterday (&optional arg)
-  "Like `org-agenda-todo' but the time of change will be 23:59 of yesterday"
+  "Like `org-agenda-todo' but the time of change will be 23:59 of yesterday."
   (interactive "P")
   (let* ((hour (third (decode-time
                        (org-current-time))))

+ 1 - 1
lisp/org-bibtex.el

@@ -386,7 +386,7 @@ This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t."
        (read-from-minibuffer (format "%s: " name))))))
 
 (defun org-bibtex-autokey ()
-  "Generate an autokey for the current headline"
+  "Generate an autokey for the current headline."
   (org-bibtex-put org-bibtex-key-property
                   (if org-bibtex-autogen-keys
                       (let* ((entry (org-bibtex-headline))

+ 1 - 1
lisp/org-capture.el

@@ -1255,7 +1255,7 @@ Use PREFIX as a prefix for the name of the indirect buffer."
 	 buf)))))
 
 (defun org-capture-verify-tree (tree)
-  "Throw error if TREE is not a valid tree"
+  "Throw error if TREE is not a valid tree."
   (unless (org-kill-is-subtree-p tree)
     (error "Template is not a valid Org entry or tree")))
 

+ 1 - 1
lisp/org-crypt.el

@@ -75,7 +75,7 @@
 		  (context plain recipients &optional sign always-trust))
 
 (defgroup org-crypt nil
-  "Org Crypt"
+  "Org Crypt."
   :tag "Org Crypt"
   :group 'org)
 

+ 0 - 1
lisp/org-exp-blocks.el

@@ -146,7 +146,6 @@ export function should accept three arguments."
 (defun org-export-blocks-html-quote (body &optional open close)
   "Protect BODY from org html export.
 The optional OPEN and CLOSE tags will be inserted around BODY."
-
   (concat
    "\n#+BEGIN_HTML\n"
    (or open "")

+ 2 - 3
lisp/org-exp.el

@@ -2579,7 +2579,7 @@ in the list) and remove property and value from the list in LISTVAR."
 (defvar org-export-latex-minted-options) ;; defined in org-latex.el
 
 (defun org-remove-formatting-on-newlines-in-region (beg end)
-  "Remove formatting on newline characters"
+  "Remove formatting on newline characters."
   (interactive "r")
   (save-excursion
     (goto-char beg)
@@ -3233,8 +3233,7 @@ Does include HTML export options as well as TODO and CATEGORY stuff."
 		  (or org-tag-alist (org-get-buffer-tags)) " ") "")
    (mapconcat 'identity org-file-tags " ")
    org-archive-location
-   "org file:~/org/%s.org"
-   ))
+   "org file:~/org/%s.org"))
 
 ;;;###autoload
 (defun org-insert-export-options-template ()

+ 1 - 1
lisp/org-faces.el

@@ -419,7 +419,7 @@ determines if it is a foreground or a background color."
 (defface org-checkbox
   (org-compatible-face 'bold
     '((t (:bold t))))
-  "Face for checkboxes"
+  "Face for checkboxes."
   :group 'org-faces)
 
 

+ 4 - 8
lisp/org-freemind.el

@@ -455,8 +455,7 @@ DRAWERS-REGEXP are converted to freemind notes."
                         note-res
                         "</body>\n"
                         "</html>\n"
-                        "</richcontent>\n"))
-        )
+                        "</richcontent>\n")))
 
       ;; There is always an LF char:
       (when (> (length text) 1)
@@ -1085,11 +1084,9 @@ PATH should be a list of steps, where each step has the form
           ;;(a (setq is-link t) )
           ((h1 h2 h3 h4 h5 h6 p)
            ;;(setq ntxt (concat "\n" ntxt))
-           (setq lf-after 2)
-           )
+           (setq lf-after 2))
           (br
-           (setq lf-after 1)
-           )
+           (setq lf-after 1))
           (t
            (cond
             ((stringp n)
@@ -1106,8 +1103,7 @@ PATH should be a list of steps, where each step has the form
                  (let ((att (car att-val))
                        (val (cdr att-val)))
                    (when (eq att 'href)
-                     (setq link val)))))
-             )))))
+                     (setq link val))))))))))
       (if lf-after
           (setq ntxt (concat ntxt (make-string lf-after ?\n)))
         (setq ntxt (concat ntxt " ")))

+ 1 - 1
lisp/org-mac-message.el

@@ -47,7 +47,7 @@
 (require 'org)
 
 (defgroup org-mac-flagged-mail nil
-  "Options concerning linking to flagged Mail.app messages"
+  "Options concerning linking to flagged Mail.app messages."
   :tag "Org Mail.app"
   :group 'org-link)
 

+ 1 - 1
lisp/org-macs.el

@@ -393,7 +393,7 @@ The number of levels is controlled by `org-inlinetask-min-level'"
       (format "\\*\\{1,%d\\} " nstars))))
 
 (defun org-format-seconds (string seconds)
-  "Compatibility function replacing format-seconds"
+  "Compatibility function replacing format-seconds."
   (if (fboundp 'format-seconds)
       (format-seconds string seconds)
     (format-time-string string (seconds-to-time seconds))))

+ 2 - 2
lisp/org-pcomplete.el

@@ -175,7 +175,7 @@ When completing for #+STARTUP, for example, this function returns
 	    opts))))
 
 (defun pcomplete/org-mode/file-option/bind ()
-  "Complete arguments for the #+BIND file option, which are variable names"
+  "Complete arguments for the #+BIND file option, which are variable names."
   (let (vars)
     (mapatoms
      (lambda (a) (if (boundp a) (setq vars (cons (symbol-name a) vars)))))
@@ -288,7 +288,7 @@ Complete a language in the first field, the header arguments and switches."
 	    ":session" ":shebang" ":tangle" ":var"))))
 
 (defun pcomplete/org-mode/block-option/clocktable ()
-  "Complete keywords in a clocktable line"
+  "Complete keywords in a clocktable line."
   (while (pcomplete-here '(":maxlevel" ":scope"
 			   ":tstart" ":tend" ":block" ":step"
 			   ":stepskip0" ":fileskip0"

+ 1 - 1
lisp/org-vm.el

@@ -139,7 +139,7 @@
       (org-vm-select-message (org-add-angle-brackets article)))))
 
 (defun org-vm-imap-open (path)
-  "Follow a VM link to an IMAP folder"
+  "Follow a VM link to an IMAP folder."
   (require 'vm-imap)
   (when (string-match "\\([^:]+\\):\\([^#]+\\)#?\\(.+\\)?" path)
     (let* ((account-name (match-string 1 path))

+ 1 - 1
lisp/org.el

@@ -11330,7 +11330,7 @@ nil or a string to be used for the todo mark." )
 (defvar org-agenda-headline-snapshot-before-repeat)
 
 (defun org-current-effective-time ()
-  "Return current time adjusted for `org-extend-today-until' variable"
+  "Return current time adjusted for `org-extend-today-until' variable."
   (let* ((ct (org-current-time))
 	  (dct (decode-time ct))
 	  (ct1