diff options
| author | Paul Eggert | 2015-09-20 09:40:35 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-09-20 09:42:05 -0700 |
| commit | ab11a1cf27ebe3791df45cccde3c851affd184dd (patch) | |
| tree | 026e179d182fed09a07cb0a395fe7543feacb958 /lisp/org | |
| parent | 2ad2f8b084111e1479374fa38450de234242afaf (diff) | |
| download | emacs-ab11a1cf27ebe3791df45cccde3c851affd184dd.tar.gz emacs-ab11a1cf27ebe3791df45cccde3c851affd184dd.zip | |
Use %s to format strings instead of splicing them
If FOO might contain quotes that are part of a file or variable
name, the quotes should not be translated when showing FOO’s name
in a diagnostic. So, for example, (message (concat (FOO ": bar")))
is not quite right, as it would translate FOO’s quotes.
Change it to (message "%s: bar" FOO) instead.
* lisp/allout.el (allout-process-exposed):
* lisp/calc/calc-ext.el (calc-do-prefix-help):
* lisp/calc/calc-store.el (calc-store-into):
* lisp/calendar/todo-mode.el (todo-category-completions):
* lisp/cedet/semantic/complete.el (semantic-completion-message):
* lisp/org/ob-latex.el (convert-pdf):
* lisp/org/org-crypt.el (org-crypt-check-auto-save):
* lisp/org/ox-latex.el (org-latex-compile):
* lisp/org/ox-man.el (org-man-compile):
* lisp/org/ox-odt.el (org-odt--export-wrap):
* lisp/org/ox-texinfo.el (org-texinfo-compile):
* lisp/progmodes/ruby-mode.el (ruby-in-ppss-context-p):
* lisp/progmodes/verilog-mode.el (verilog-batch-execute-func)
(verilog-signals-combine-bus, verilog-read-defines)
(verilog-getopt-file, verilog-expand-dirnames)
(verilog-modi-lookup, verilog-modi-modport-lookup-one):
* lisp/term/ns-win.el (ns-spi-service-call):
Use %s to avoid translating quotes of file names etc. in diagnostics.
Diffstat (limited to 'lisp/org')
| -rw-r--r-- | lisp/org/ob-latex.el | 2 | ||||
| -rw-r--r-- | lisp/org/org-crypt.el | 7 | ||||
| -rw-r--r-- | lisp/org/ox-latex.el | 4 | ||||
| -rw-r--r-- | lisp/org/ox-man.el | 4 | ||||
| -rw-r--r-- | lisp/org/ox-odt.el | 4 | ||||
| -rw-r--r-- | lisp/org/ox-texinfo.el | 4 |
6 files changed, 13 insertions, 12 deletions
diff --git a/lisp/org/ob-latex.el b/lisp/org/ob-latex.el index d0a413f1172..811c9ef92c6 100644 --- a/lisp/org/ob-latex.el +++ b/lisp/org/ob-latex.el | |||
| @@ -183,7 +183,7 @@ This function is called by `org-babel-execute-src-block'." | |||
| 183 | "Generate a file from a pdf file using imagemagick." | 183 | "Generate a file from a pdf file using imagemagick." |
| 184 | (let ((cmd (concat "convert " im-in-options " " pdffile " " | 184 | (let ((cmd (concat "convert " im-in-options " " pdffile " " |
| 185 | im-out-options " " out-file))) | 185 | im-out-options " " out-file))) |
| 186 | (message (concat "Converting pdffile file " cmd "...")) | 186 | (message "Converting pdffile file %s..." cmd) |
| 187 | (shell-command cmd))) | 187 | (shell-command cmd))) |
| 188 | 188 | ||
| 189 | (defun org-babel-latex-tex-to-pdf (file) | 189 | (defun org-babel-latex-tex-to-pdf (file) |
diff --git a/lisp/org/org-crypt.el b/lisp/org/org-crypt.el index f527673cbd4..2b3445e47cd 100644 --- a/lisp/org/org-crypt.el +++ b/lisp/org/org-crypt.el | |||
| @@ -133,9 +133,10 @@ See `org-crypt-disable-auto-save'." | |||
| 133 | (and | 133 | (and |
| 134 | (eq org-crypt-disable-auto-save 'ask) | 134 | (eq org-crypt-disable-auto-save 'ask) |
| 135 | (y-or-n-p "org-decrypt: auto-save-mode may cause leakage. Disable it for current buffer? "))) | 135 | (y-or-n-p "org-decrypt: auto-save-mode may cause leakage. Disable it for current buffer? "))) |
| 136 | (message (concat "org-decrypt: Disabling auto-save-mode for " (or (buffer-file-name) (current-buffer)))) | 136 | (message "org-decrypt: Disabling auto-save-mode for %s" |
| 137 | ; The argument to auto-save-mode has to be "-1", since | 137 | (or (buffer-file-name) (current-buffer))) |
| 138 | ; giving a "nil" argument toggles instead of disabling. | 138 | ;; The argument to auto-save-mode has to be "-1", since |
| 139 | ;; giving a "nil" argument toggles instead of disabling. | ||
| 139 | (auto-save-mode -1)) | 140 | (auto-save-mode -1)) |
| 140 | ((eq org-crypt-disable-auto-save nil) | 141 | ((eq org-crypt-disable-auto-save nil) |
| 141 | (message "org-decrypt: Decrypting entry with auto-save-mode enabled. This may cause leakage.")) | 142 | (message "org-decrypt: Decrypting entry with auto-save-mode enabled. This may cause leakage.")) |
diff --git a/lisp/org/ox-latex.el b/lisp/org/ox-latex.el index 91a864eee6e..51f7b17a8bf 100644 --- a/lisp/org/ox-latex.el +++ b/lisp/org/ox-latex.el | |||
| @@ -2876,8 +2876,8 @@ Return PDF file name or an error if it couldn't be produced." | |||
| 2876 | ;; Check for process failure. Provide collected errors if | 2876 | ;; Check for process failure. Provide collected errors if |
| 2877 | ;; possible. | 2877 | ;; possible. |
| 2878 | (if (not (file-exists-p pdffile)) | 2878 | (if (not (file-exists-p pdffile)) |
| 2879 | (error (concat (format "PDF file %s wasn't produced" pdffile) | 2879 | (error "PDF file %s wasn't produced%s" pdffile |
| 2880 | (when errors (concat ": " errors)))) | 2880 | (if errors (concat ": " errors) "")) |
| 2881 | ;; Else remove log files, when specified, and signal end of | 2881 | ;; Else remove log files, when specified, and signal end of |
| 2882 | ;; process to user, along with any error encountered. | 2882 | ;; process to user, along with any error encountered. |
| 2883 | (when (and (not snippet) org-latex-remove-logfiles) | 2883 | (when (and (not snippet) org-latex-remove-logfiles) |
diff --git a/lisp/org/ox-man.el b/lisp/org/ox-man.el index d7adcd5486d..09ad1866c0e 100644 --- a/lisp/org/ox-man.el +++ b/lisp/org/ox-man.el | |||
| @@ -1219,8 +1219,8 @@ Return PDF file name or an error if it couldn't be produced." | |||
| 1219 | ;; Check for process failure. Provide collected errors if | 1219 | ;; Check for process failure. Provide collected errors if |
| 1220 | ;; possible. | 1220 | ;; possible. |
| 1221 | (if (not (file-exists-p pdffile)) | 1221 | (if (not (file-exists-p pdffile)) |
| 1222 | (error (concat (format "PDF file %s wasn't produced" pdffile) | 1222 | (error "PDF file %s wasn't produced%s" pdffile |
| 1223 | (when errors (concat ": " errors)))) | 1223 | (if errors (concat ": " errors) "")) |
| 1224 | ;; Else remove log files, when specified, and signal end of | 1224 | ;; Else remove log files, when specified, and signal end of |
| 1225 | ;; process to user, along with any error encountered. | 1225 | ;; process to user, along with any error encountered. |
| 1226 | (when org-man-remove-logfiles | 1226 | (when org-man-remove-logfiles |
diff --git a/lisp/org/ox-odt.el b/lisp/org/ox-odt.el index 1ee201ba23f..9abda33f59d 100644 --- a/lisp/org/ox-odt.el +++ b/lisp/org/ox-odt.el | |||
| @@ -4089,8 +4089,8 @@ contextual information." | |||
| 4089 | nil standard-output nil (cdr cmd))))) | 4089 | nil standard-output nil (cdr cmd))))) |
| 4090 | (or (zerop exitcode) | 4090 | (or (zerop exitcode) |
| 4091 | (error (concat "Unable to create OpenDocument file." | 4091 | (error (concat "Unable to create OpenDocument file." |
| 4092 | (format " Zip failed with error (%s)" | 4092 | " Zip failed with error (%s)") |
| 4093 | err-string))))) | 4093 | err-string))) |
| 4094 | cmds))) | 4094 | cmds))) |
| 4095 | ;; Move the zip file from temporary work directory to | 4095 | ;; Move the zip file from temporary work directory to |
| 4096 | ;; user-mandated location. | 4096 | ;; user-mandated location. |
diff --git a/lisp/org/ox-texinfo.el b/lisp/org/ox-texinfo.el index 5130329d4b4..67daf6f979e 100644 --- a/lisp/org/ox-texinfo.el +++ b/lisp/org/ox-texinfo.el | |||
| @@ -1534,8 +1534,8 @@ Return INFO file name or an error if it couldn't be produced." | |||
| 1534 | ;; Check for process failure. Provide collected errors if | 1534 | ;; Check for process failure. Provide collected errors if |
| 1535 | ;; possible. | 1535 | ;; possible. |
| 1536 | (if (not (file-exists-p infofile)) | 1536 | (if (not (file-exists-p infofile)) |
| 1537 | (error (concat (format "INFO file %s wasn't produced" infofile) | 1537 | (error "INFO file %s wasn't produced%s" infofile |
| 1538 | (when errors (concat ": " errors)))) | 1538 | (if errors (concat ": " errors) "")) |
| 1539 | ;; Else remove log files, when specified, and signal end of | 1539 | ;; Else remove log files, when specified, and signal end of |
| 1540 | ;; process to user, along with any error encountered. | 1540 | ;; process to user, along with any error encountered. |
| 1541 | (when org-texinfo-remove-logfiles | 1541 | (when org-texinfo-remove-logfiles |