浏览代码

Fix many small typos.

Bastien Guerry 12 年之前
父节点
当前提交
09743f48d6
共有 16 个文件被更改,包括 36 次插入34 次删除
  1. 1 1
      lisp/ob-calc.el
  2. 2 2
      lisp/ob-comint.el
  3. 3 3
      lisp/ob-fortran.el
  4. 2 2
      lisp/ob-js.el
  5. 1 1
      lisp/ob-latex.el
  6. 1 1
      lisp/ob-plantuml.el
  7. 2 2
      lisp/ob-ref.el
  8. 2 2
      lisp/ob-sql.el
  9. 2 2
      lisp/ob-sqlite.el
  10. 4 4
      lisp/ob-tangle.el
  11. 6 5
      lisp/ob.el
  12. 6 5
      lisp/org-bibtex.el
  13. 1 1
      lisp/org-clock.el
  14. 1 1
      lisp/org-exp-blocks.el
  15. 1 1
      lisp/org-irc.el
  16. 1 1
      lisp/org-mobile.el

+ 1 - 1
lisp/ob-calc.el

@@ -71,7 +71,7 @@
 		     (cond
 		      ((numberp res) res)
 		      ((math-read-number res) (math-read-number res))
-		      ((listp res) (error "calc error \"%s\" on input \"%s\""
+		      ((listp res) (error "Calc error \"%s\" on input \"%s\""
 					  (cadr res) line))
 		      (t (replace-regexp-in-string
 			  "'" ""

+ 2 - 2
lisp/ob-comint.el

@@ -51,7 +51,7 @@ executed inside the protection of `save-excursion' and
   `(save-excursion
      (save-match-data
        (unless (org-babel-comint-buffer-livep ,buffer)
-         (error "buffer %s doesn't exist or has no process" ,buffer))
+         (error "Buffer %s does not exist or has no process" ,buffer))
        (set-buffer ,buffer)
        ,@body)))
 (def-edebug-spec org-babel-comint-in-buffer (form body))
@@ -147,7 +147,7 @@ statement (not large blocks of code)."
 Don't return until FILE exists.  Code in STRING must ensure that
 FILE exists at end of evaluation."
   (unless (org-babel-comint-buffer-livep buffer)
-    (error "buffer %s doesn't exist or has no process" buffer))
+    (error "Buffer %s does not exist or has no process" buffer))
   (if (file-exists-p file) (delete-file file))
   (process-send-string
    (get-buffer-process buffer)

+ 3 - 3
lisp/ob-fortran.el

@@ -108,19 +108,19 @@ it's header arguments."
   "Wrap body in a \"program ... end program\" block if none exists."
   (if (string-match "^[ \t]*program[ \t]*.*" (capitalize body))
       (let ((vars (mapcar #'cdr (org-babel-get-header params :var))))
-	(if vars (error "cannot use :vars if 'program' statement is present"))
+	(if vars (error "Cannot use :vars if 'program' statement is present"))
 	body)
     (format "program main\n%s\nend program main\n" body)))
 
 (defun org-babel-prep-session:fortran (session params)
   "This function does nothing as fortran is a compiled language with no
 support for sessions"
-  (error "fortran is a compiled languages -- no support for sessions"))
+  (error "Fortran is a compiled languages -- no support for sessions"))
 
 (defun org-babel-load-session:fortran (session body params)
   "This function does nothing as fortran is a compiled language with no
 support for sessions"
-  (error "fortran is a compiled languages -- no support for sessions"))
+  (error "Fortran is a compiled languages -- no support for sessions"))
 
 ;; helper functions
 

+ 2 - 2
lisp/ob-js.el

@@ -152,9 +152,9 @@ then create.  Return the initialized session."
 	  (sit-for .5)
 	  (org-babel-js-initiate-session session))))
      ((string= "node" org-babel-js-cmd )
-      (error "session evaluation with node.js is not supported"))
+      (error "Session evaluation with node.js is not supported"))
      (t
-      (error "sessions are only supported with mozrepl add \":cmd mozrepl\"")))))
+      (error "Sessions are only supported with mozrepl add \":cmd mozrepl\"")))))
 
 (provide 'ob-js)
 

+ 1 - 1
lisp/ob-latex.el

@@ -132,7 +132,7 @@ This function is called by `org-babel-execute-src-block'."
 	      (when (file-exists-p transient-pdf-file)
 		(delete-file transient-pdf-file))))))
          ((string-match "\\.\\([^\\.]+\\)$" out-file)
-          (error "can not create %s files, please specify a .png or .pdf file or try the :imagemagick header argument"
+          (error "Can not create %s files, please specify a .png or .pdf file or try the :imagemagick header argument"
 		 (match-string 1 out-file))))
         nil) ;; signal that output has already been written to file
     body))

+ 1 - 1
lisp/ob-plantuml.el

@@ -52,7 +52,7 @@
 This function is called by `org-babel-execute-src-block'."
   (let* ((result-params (split-string (or (cdr (assoc :results params)) "")))
 	 (out-file (or (cdr (assoc :file params))
-		       (error "plantuml requires a \":file\" header argument")))
+		       (error "PlantUML requires a \":file\" header argument")))
 	 (cmdline (cdr (assoc :cmdline params)))
 	 (in-file (org-babel-temp-file "plantuml-"))
 	 (java (or (cdr (assoc :java params)) ""))

+ 2 - 2
lisp/ob-ref.el

@@ -170,7 +170,7 @@ the variable."
 	    ;;       buffer (marker-buffer id-loc)
 	    ;;       loc (marker-position id-loc))
 	    ;; (move-marker id-loc nil)
-	    (error "reference '%s' not found in this buffer" ref))
+	    (error "Reference '%s' not found in this buffer" ref))
 	  (cond
 	   (lob-info (setq type 'lob))
 	   (id (setq type 'id))
@@ -184,7 +184,7 @@ the variable."
 		(forward-line 1)
 		(beginning-of-line)
 		(if (or (= (point) (point-min)) (= (point) (point-max)))
-		    (error "reference not found")))))
+		    (error "Reference not found")))))
 	  (let ((params (append args '((:results . "silent")))))
 	    (setq result
 		  (case type

+ 2 - 2
lisp/ob-sql.el

@@ -93,7 +93,7 @@ This function is called by `org-babel-execute-src-block'."
 				  (org-babel-process-file-name in-file)
 				  (org-babel-process-file-name out-file)
 				  (or cmdline "")))
-                    (t (error "no support for the %s sql engine" engine)))))
+                    (t (error "No support for the %s SQL engine" engine)))))
     (with-temp-file in-file
       (insert
        (case (intern engine)
@@ -160,7 +160,7 @@ This function is called by `org-babel-execute-src-block'."
 
 (defun org-babel-prep-session:sql (session params)
   "Raise an error because Sql sessions aren't implemented."
-  (error "sql sessions not yet implemented"))
+  (error "SQL sessions not yet implemented"))
 
 (provide 'ob-sql)
 

+ 2 - 2
lisp/ob-sqlite.el

@@ -155,9 +155,9 @@ This function is called by `org-babel-execute-src-block'."
     table))
 
 (defun org-babel-prep-session:sqlite (session params)
-  "Raise an error because support for sqlite sessions isn't implemented.
+  "Raise an error because support for SQLite sessions isn't implemented.
 Prepare SESSION according to the header arguments specified in PARAMS."
-  (error "sqlite sessions not yet implemented"))
+  (error "SQLite sessions not yet implemented"))
 
 (provide 'ob-sqlite)
 

+ 4 - 4
lisp/ob-tangle.el

@@ -156,7 +156,7 @@ This function exports the source code using
 		 (> (funcall age file) (funcall age exported-file)))
       (org-babel-tangle-file file exported-file "emacs-lisp"))
     (load-file exported-file)
-    (message "loaded %s" exported-file)))
+    (message "Loaded %s" exported-file)))
 
 ;;;###autoload
 (defun org-babel-tangle-file (file &optional target-file lang)
@@ -268,7 +268,7 @@ exported source code blocks by language."
 		      (add-to-list 'path-collector file-name)))))
 	      specs)))
 	 (org-babel-tangle-collect-blocks lang))
-	(message "tangled %d code block%s from %s" block-counter
+	(message "Tangled %d code block%s from %s" block-counter
 		 (if (= block-counter 1) "" "s")
 		 (file-name-nondirectory
 		  (buffer-file-name (or (buffer-base-buffer) (current-buffer)))))
@@ -474,7 +474,7 @@ which enable the original code blocks to be found."
 	      (org-babel-update-block-body new-body)))
           (setq counter (+ 1 counter)))
         (goto-char end))
-      (prog1 counter (message "detangled %d code blocks" counter)))))
+      (prog1 counter (message "Detangled %d code blocks" counter)))))
 
 (defun org-babel-tangle-jump-to-org ()
   "Jump from a tangled code file to the related Org-mode file."
@@ -497,7 +497,7 @@ which enable the original code blocks to be found."
 				       " ends here") nil t)
 			      (setq end (point-at-bol))))))))
 	(unless (and start (< start mid) (< mid end))
-	  (error "not in tangled code"))
+	  (error "Not in tangled code"))
         (setq body (org-babel-trim (buffer-substring start end))))
       (when (string-match "::" path)
         (setq path (substring path 0 (match-beginning 0))))

+ 6 - 5
lisp/ob.el

@@ -27,6 +27,7 @@
   (require 'cl))
 (require 'ob-eval)
 (require 'org-macs)
+(require 'org-compat)
 
 (defconst org-babel-exeext
   (if (memq system-type '(windows-nt cygwin))
@@ -666,7 +667,7 @@ arguments and pop open the results in a preview buffer."
 	(when (and (not (string= header name))
 		   (<= (org-babel-edit-distance header name) too-close)
 		   (not (member header names)))
-	  (error "supplied header \"%S\" is suspiciously close to \"%S\""
+	  (error "Supplied header \"%S\" is suspiciously close to \"%S\""
 		 header name))))
     (message "No suspicious header arguments found.")))
 
@@ -1514,7 +1515,7 @@ If the point is not on a source block then return nil."
   "Go to the beginning of the current code block."
   (interactive)
   ((lambda (head)
-     (if head (goto-char head) (error "not currently in a code block")))
+     (if head (goto-char head) (error "Not currently in a code block")))
    (org-babel-where-is-src-block-head)))
 
 ;;;###autoload
@@ -2092,7 +2093,7 @@ file's directory then expand relative links."
 (defun org-babel-update-block-body (new-body)
   "Update the body of the current code block to NEW-BODY."
   (if (not (org-babel-where-is-src-block-head))
-      (error "not in source block")
+      (error "Not in a source block")
     (save-match-data
       (replace-match (concat (org-babel-trim new-body) "\n") nil t nil 5))
     (indent-rigidly (match-beginning 5) (match-end 5) 2)))
@@ -2160,7 +2161,7 @@ parameters when merging lists."
 					   (car (nth variable-index vars)))
 					  "=" (cdr pair)))
 		       (incf variable-index))
-		   (error "variable \"%s\" must be assigned a default value"
+		   (error "Variable \"%s\" must be assigned a default value"
 			  (cdr pair))))))
 	    (:results
 	     (setq results (funcall e-merge results-exclusive-groups
@@ -2463,7 +2464,7 @@ If the table is trivial, then return it as a scalar."
 	      (setq result (mapcar (lambda (row)
 				     (mapcar #'org-babel-string-read row))
 				   (org-table-to-lisp))))
-	  (error (message "error reading results: %s" err) nil)))
+	  (error (message "Error reading results: %s" err) nil)))
       (if (null (cdr result)) ;; if result is trivial vector, then scalarize it
 	  (if (consp (car result))
 	      (if (null (cdr (car result)))

+ 6 - 5
lisp/org-bibtex.el

@@ -111,6 +111,7 @@
 (require 'bibtex)
 (eval-when-compile
   (require 'cl))
+(require 'org-compat)
 
 (defvar org-bibtex-description nil) ; dynamically scoped from org.el
 (defvar org-id-locations)
@@ -277,7 +278,7 @@ not be exported."
 
 (defcustom org-bibtex-no-export-tags nil
   "List of tag(s) that should not be converted to keywords.
-This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t."
+This variable is relevant only if `org-bibtex-export-tags-as-keywords' is t."
   :group 'org-bibtex
   :version "24.1"
   :type '(repeat :tag "Tag" (string)))
@@ -373,7 +374,7 @@ This variable is relevant only if `org-bibtex-export-tags-as-keywords` is t."
 
 (defun org-bibtex-ask (field)
   (unless (assoc field org-bibtex-fields)
-    (error "field:%s is not known" field))
+    (error "Field:%s is not known" field))
   (save-window-excursion
     (let* ((name (substring (symbol-name field) 1))
 	   (buf-name (format "*Bibtex Help %s*" name)))
@@ -548,7 +549,7 @@ Headlines are exported using `org-bibtex-export-headline'."
 					    (error (throw 'bib (point)))))))))
        (with-temp-file filename
 	 (insert (mapconcat #'identity bibtex-entries "\n")))
-       (message "Successfully exported %d bibtex entries to %s"
+       (message "Successfully exported %d BibTeX entries to %s"
 		(length bibtex-entries) filename) nil))))
 
 (defun org-bibtex-check (&optional optional)
@@ -580,7 +581,7 @@ If nonew is t, add data to the headline of the entry at point."
 	 (type (if (keywordp type) type (intern (concat ":" type))))
 	 (org-bibtex-treat-headline-as-title (if nonew nil t)))
     (unless (assoc type org-bibtex-types)
-      (error "type:%s is not known" type))
+      (error "Type:%s is not known" type))
     (if nonew
 	(org-back-to-heading)
       (org-insert-heading)
@@ -661,7 +662,7 @@ This uses `bibtex-parse-entry'."
     (with-temp-buffer (yank 1) (setf entry (org-bibtex-read)))
     (if entry
 	(org-bibtex-write)
-      (error "yanked text does not appear to contain a bibtex entry"))))
+      (error "Yanked text does not appear to contain a BibTeX entry"))))
 
 (defun org-bibtex-export-to-kill-ring ()
   "Export current headline to kill ring as bibtex entry."

+ 1 - 1
lisp/org-clock.el

@@ -2455,7 +2455,7 @@ from the dynamic block definition."
 	 ((stringp formula)
 	  (insert "\n#+TBLFM: " formula)
 	  (setq recalc t))
-	 (t (error "invalid formula in clocktable")))
+	 (t (error "Invalid formula in clocktable")))
       ;; Should we rescue an old formula?
       (when (stringp (setq content (plist-get params :content)))
 	(when (string-match "^\\([ \t]*#\\+tblfm:.*\\)" content)

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

@@ -199,7 +199,7 @@ which defaults to the value of `org-export-blocks-witheld'."
 		  (decf balanced)
 		(incf balanced)))
 	    (when (not (zerop balanced))
-	      (error "unbalanced begin/end_%s blocks with %S"
+	      (error "Unbalanced begin/end_%s blocks with %S"
 		     type (buffer-substring match-start (point))))
 	    (setq match-end (copy-marker (match-end 0)))
 	    (unless preserve-indent

+ 1 - 1
lisp/org-irc.el

@@ -84,7 +84,7 @@
      ((eq org-irc-client 'erc)
       (org-irc-visit-erc link))
      (t
-      (error "erc only known client")))))
+      (error "ERC only known client")))))
 
 (defun org-irc-parse-link (link)
   "Parse an IRC LINK and return the attributes found.

+ 1 - 1
lisp/org-mobile.el

@@ -406,7 +406,7 @@ agenda view showing the flagged items."
       (error "Cannot write to encryption tempfile %s"
 	     org-mobile-encryption-tempfile))
     (unless (executable-find "openssl")
-      (error "openssl is needed to encrypt files"))))
+      (error "OpenSSL is needed to encrypt files"))))
 
 (defun org-mobile-create-index-file ()
   "Write the index file in the WebDAV directory."