aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorPaul Eggert2015-08-31 15:10:07 -0700
committerPaul Eggert2015-08-31 15:10:37 -0700
commit244c417a5669eecca2a4930628ad438029466de1 (patch)
tree786b23a97c9fa3474e9d8d8e174d3e43a9cda3c9 /lisp
parent86f692009b949cedea9ae1e25868c54dece68318 (diff)
downloademacs-244c417a5669eecca2a4930628ad438029466de1.tar.gz
emacs-244c417a5669eecca2a4930628ad438029466de1.zip
Quoting fixes in ERC and Eshell
* lisp/erc/erc-autoaway.el (erc-autoaway-set-away): * lisp/erc/erc-backend.el (define-erc-response-handler): * lisp/erc/erc-fill.el (erc-fill-static-center): * lisp/eshell/em-dirs.el (eshell-save-some-last-dir): * lisp/eshell/em-glob.el (eshell-glob-entries): * lisp/eshell/em-hist.el (eshell-save-some-history): * lisp/eshell/em-unix.el (eshell-remove-entries, eshell/rm) (eshell-shuffle-files): * lisp/eshell/esh-cmd.el (eshell-do-eval): * lisp/eshell/esh-proc.el (eshell-process-interact) (eshell-query-kill-processes): Respect ‘text-quoting-style’ in diagnostics and doc strings.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/erc/erc-autoaway.el2
-rw-r--r--lisp/erc/erc-backend.el6
-rw-r--r--lisp/erc/erc-fill.el3
-rw-r--r--lisp/eshell/em-dirs.el5
-rw-r--r--lisp/eshell/em-glob.el2
-rw-r--r--lisp/eshell/em-hist.el5
-rw-r--r--lisp/eshell/em-unix.el46
-rw-r--r--lisp/eshell/esh-cmd.el8
-rw-r--r--lisp/eshell/esh-proc.el9
9 files changed, 47 insertions, 39 deletions
diff --git a/lisp/erc/erc-autoaway.el b/lisp/erc/erc-autoaway.el
index 981a2139ca6..c01cb3a4878 100644
--- a/lisp/erc/erc-autoaway.el
+++ b/lisp/erc/erc-autoaway.el
@@ -270,7 +270,7 @@ active server buffer available."
270 ;; existing process. 270 ;; existing process.
271 (when (or notest (erc-autoaway-some-open-server-buffer)) 271 (when (or notest (erc-autoaway-some-open-server-buffer))
272 (setq erc-autoaway-caused-away t) 272 (setq erc-autoaway-caused-away t)
273 (erc-cmd-GAWAY (format erc-autoaway-message idle-time)))) 273 (erc-cmd-GAWAY (format-message erc-autoaway-message idle-time))))
274 274
275(defun erc-autoaway-reset-indicators (&rest stuff) 275(defun erc-autoaway-reset-indicators (&rest stuff)
276 "Reset indicators used by the erc-autoaway module." 276 "Reset indicators used by the erc-autoaway module."
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index ee81113d208..db5f6a63519 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -1136,7 +1136,8 @@ Would expand to:
1136 aliases)) 1136 aliases))
1137 (let* ((hook-name (intern (format "erc-server-%s-functions" name))) 1137 (let* ((hook-name (intern (format "erc-server-%s-functions" name)))
1138 (fn-name (intern (format "erc-server-%s" name))) 1138 (fn-name (intern (format "erc-server-%s" name)))
1139 (hook-doc (format "%sHook called upon receiving a %%s server response. 1139 (hook-doc (format-message "\
1140%sHook called upon receiving a %%s server response.
1140Each function is called with two arguments, the process associated 1141Each function is called with two arguments, the process associated
1141with the response and the parsed response. If the function returns 1142with the response and the parsed response. If the function returns
1142non-nil, stop processing the hook. Otherwise, continue. 1143non-nil, stop processing the hook. Otherwise, continue.
@@ -1146,7 +1147,8 @@ See also `%s'."
1146 (concat extra-var-doc "\n\n") 1147 (concat extra-var-doc "\n\n")
1147 "") 1148 "")
1148 fn-name)) 1149 fn-name))
1149 (fn-doc (format "%sHandler for a %s server response. 1150 (fn-doc (format-message "\
1151%sHandler for a %s server response.
1150PROC is the server process which returned the response. 1152PROC is the server process which returned the response.
1151PARSED is the actual response as an `erc-response' struct. 1153PARSED is the actual response as an `erc-response' struct.
1152If you want to add responses don't modify this function, but rather 1154If you want to add responses don't modify this function, but rather
diff --git a/lisp/erc/erc-fill.el b/lisp/erc/erc-fill.el
index 97c466825f0..84816f80854 100644
--- a/lisp/erc/erc-fill.el
+++ b/lisp/erc/erc-fill.el
@@ -101,7 +101,7 @@ function is called."
101 101
102(defcustom erc-fill-static-center 27 102(defcustom erc-fill-static-center 27
103 "Column around which all statically filled messages will be 103 "Column around which all statically filled messages will be
104centered. This column denotes the point where the ' ' character 104centered. This column denotes the point where the ` ' character
105between <nickname> and the entered text will be put, thus aligning 105between <nickname> and the entered text will be put, thus aligning
106nick names right and text left." 106nick names right and text left."
107 :group 'erc-fill 107 :group 'erc-fill
@@ -195,4 +195,3 @@ You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'."
195;; Local Variables: 195;; Local Variables:
196;; indent-tabs-mode: nil 196;; indent-tabs-mode: nil
197;; End: 197;; End:
198
diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el
index ac1616d504f..1bd7fbcb90f 100644
--- a/lisp/eshell/em-dirs.el
+++ b/lisp/eshell/em-dirs.el
@@ -243,8 +243,9 @@ Thus, this does not include the current directory.")
243 eshell-ask-to-save-last-dir 243 eshell-ask-to-save-last-dir
244 (or (eq eshell-ask-to-save-last-dir 'always) 244 (or (eq eshell-ask-to-save-last-dir 'always)
245 (y-or-n-p 245 (y-or-n-p
246 (format "Save last dir ring for Eshell buffer `%s'? " 246 (format-message
247 (buffer-name buf))))) 247 "Save last dir ring for Eshell buffer `%s'? "
248 (buffer-name buf)))))
248 (eshell-write-last-dir-ring)))))) 249 (eshell-write-last-dir-ring))))))
249 250
250(defun eshell-lone-directory-p (file) 251(defun eshell-lone-directory-p (file)
diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el
index 8abdd0058fb..976882c14e2 100644
--- a/lisp/eshell/em-glob.el
+++ b/lisp/eshell/em-glob.el
@@ -289,7 +289,7 @@ the form:
289 glob (car globs) 289 glob (car globs)
290 len (length glob))))) 290 len (length glob)))))
291 (if (and recurse-p (not glob)) 291 (if (and recurse-p (not glob))
292 (error "'**' cannot end a globbing pattern")) 292 (error "** cannot end a globbing pattern"))
293 (let ((index 1)) 293 (let ((index 1))
294 (setq incl glob) 294 (setq incl glob)
295 (while (and (eq incl glob) 295 (while (and (eq incl glob)
diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el
index 9f070c33db3..499eda40dc3 100644
--- a/lisp/eshell/em-hist.el
+++ b/lisp/eshell/em-hist.el
@@ -306,8 +306,9 @@ element, regardless of any text on the command line. In that case,
306 eshell-save-history-on-exit 306 eshell-save-history-on-exit
307 (or (eq eshell-save-history-on-exit t) 307 (or (eq eshell-save-history-on-exit t)
308 (y-or-n-p 308 (y-or-n-p
309 (format "Save input history for Eshell buffer `%s'? " 309 (format-message
310 (buffer-name buf))))) 310 "Save input history for Eshell buffer `%s'? "
311 (buffer-name buf)))))
311 (eshell-write-history)))))) 312 (eshell-write-history))))))
312 313
313(defun eshell/history (&rest args) 314(defun eshell/history (&rest args)
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 210e74dc1b7..8ae81df92e5 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -206,23 +206,23 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine."
206 (not (file-symlink-p (car files)))) 206 (not (file-symlink-p (car files))))
207 (progn 207 (progn
208 (if em-verbose 208 (if em-verbose
209 (eshell-printn (format "rm: removing directory `%s'" 209 (eshell-printn (format-message "rm: removing directory `%s'"
210 (car files)))) 210 (car files))))
211 (unless 211 (unless
212 (or em-preview 212 (or em-preview
213 (and em-interactive 213 (and em-interactive
214 (not (y-or-n-p 214 (not (y-or-n-p
215 (format "rm: remove directory `%s'? " 215 (format-message "rm: remove directory `%s'? "
216 (car files)))))) 216 (car files))))))
217 (eshell-funcalln 'delete-directory (car files) t t))) 217 (eshell-funcalln 'delete-directory (car files) t t)))
218 (if em-verbose 218 (if em-verbose
219 (eshell-printn (format "rm: removing file `%s'" 219 (eshell-printn (format-message "rm: removing file `%s'"
220 (car files)))) 220 (car files))))
221 (unless (or em-preview 221 (unless (or em-preview
222 (and em-interactive 222 (and em-interactive
223 (not (y-or-n-p 223 (not (y-or-n-p
224 (format "rm: remove `%s'? " 224 (format-message "rm: remove `%s'? "
225 (car files)))))) 225 (car files))))))
226 (eshell-funcalln 'delete-file (car files) t)))) 226 (eshell-funcalln 'delete-file (car files) t))))
227 (setq files (cdr files)))) 227 (setq files (cdr files))))
228 228
@@ -260,28 +260,32 @@ Remove (unlink) the FILE(s).")
260 (cond 260 (cond
261 ((bufferp entry) 261 ((bufferp entry)
262 (if em-verbose 262 (if em-verbose
263 (eshell-printn (format "rm: removing buffer `%s'" entry))) 263 (eshell-printn (format-message "rm: removing buffer `%s'" entry)))
264 (unless (or em-preview 264 (unless (or em-preview
265 (and em-interactive 265 (and em-interactive
266 (not (y-or-n-p (format "rm: delete buffer `%s'? " 266 (not (y-or-n-p (format-message
267 entry))))) 267 "rm: delete buffer `%s'? "
268 entry)))))
268 (eshell-funcalln 'kill-buffer entry))) 269 (eshell-funcalln 'kill-buffer entry)))
269 ((eshell-processp entry) 270 ((eshell-processp entry)
270 (if em-verbose 271 (if em-verbose
271 (eshell-printn (format "rm: killing process `%s'" entry))) 272 (eshell-printn (format-message "rm: killing process `%s'" entry)))
272 (unless (or em-preview 273 (unless (or em-preview
273 (and em-interactive 274 (and em-interactive
274 (not (y-or-n-p (format "rm: kill process `%s'? " 275 (not (y-or-n-p (format-message
275 entry))))) 276 "rm: kill process `%s'? "
277 entry)))))
276 (eshell-funcalln 'kill-process entry))) 278 (eshell-funcalln 'kill-process entry)))
277 ((symbolp entry) 279 ((symbolp entry)
278 (if em-verbose 280 (if em-verbose
279 (eshell-printn (format "rm: uninterning symbol `%s'" entry))) 281 (eshell-printn (format-message
282 "rm: uninterning symbol `%s'" entry)))
280 (unless 283 (unless
281 (or em-preview 284 (or em-preview
282 (and em-interactive 285 (and em-interactive
283 (not (y-or-n-p (format "rm: unintern symbol `%s'? " 286 (not (y-or-n-p (format-message
284 entry))))) 287 "rm: unintern symbol `%s'? "
288 entry)))))
285 (eshell-funcalln 'unintern entry))) 289 (eshell-funcalln 'unintern entry)))
286 ((stringp entry) 290 ((stringp entry)
287 ;; -f should silently ignore missing files (bug#15373). 291 ;; -f should silently ignore missing files (bug#15373).
@@ -294,8 +298,8 @@ Remove (unlink) the FILE(s).")
294 (if (or em-preview 298 (if (or em-preview
295 (not em-interactive) 299 (not em-interactive)
296 (y-or-n-p 300 (y-or-n-p
297 (format "rm: descend into directory `%s'? " 301 (format-message "rm: descend into directory `%s'? "
298 entry))) 302 entry)))
299 (eshell-remove-entries (list entry) t)) 303 (eshell-remove-entries (list entry) t))
300 (eshell-error (format "rm: %s: is a directory\n" entry))) 304 (eshell-error (format "rm: %s: is a directory\n" entry)))
301 (eshell-remove-entries (list entry) t)))))) 305 (eshell-remove-entries (list entry) t))))))
@@ -369,8 +373,8 @@ Remove the DIRECTORY(ies), if they are empty.")
369 (equal (nth 10 attr-target) (nth 10 attr)) 373 (equal (nth 10 attr-target) (nth 10 attr))
370 (nth 11 attr-target) (nth 11 attr) 374 (nth 11 attr-target) (nth 11 attr)
371 (equal (nth 11 attr-target) (nth 11 attr))) 375 (equal (nth 11 attr-target) (nth 11 attr)))
372 (eshell-error (format "%s: `%s' and `%s' are the same file\n" 376 (eshell-error (format-message "%s: `%s' and `%s' are the same file\n"
373 command (car files) target))) 377 command (car files) target)))
374 (t 378 (t
375 (let ((source (car files)) 379 (let ((source (car files))
376 (target (if is-dir 380 (target (if is-dir
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index efd85826f27..535e169bcb3 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -1016,8 +1016,8 @@ be finished later after the completion of an asynchronous subprocess."
1016 ;; we can modify any `let' forms to evaluate only once. 1016 ;; we can modify any `let' forms to evaluate only once.
1017 (if (macrop (car form)) 1017 (if (macrop (car form))
1018 (let ((exp (eshell-copy-tree (macroexpand form)))) 1018 (let ((exp (eshell-copy-tree (macroexpand form))))
1019 (eshell-manipulate (format "expanding macro `%s'" 1019 (eshell-manipulate (format-message "expanding macro `%s'"
1020 (symbol-name (car form))) 1020 (symbol-name (car form)))
1021 (setcar form (car exp)) 1021 (setcar form (car exp))
1022 (setcdr form (cdr exp))))) 1022 (setcdr form (cdr exp)))))
1023 (let ((args (cdr form))) 1023 (let ((args (cdr form)))
@@ -1095,8 +1095,8 @@ be finished later after the completion of an asynchronous subprocess."
1095 (t 1095 (t
1096 (if (and args (not (memq (car form) '(run-hooks)))) 1096 (if (and args (not (memq (car form) '(run-hooks))))
1097 (eshell-manipulate 1097 (eshell-manipulate
1098 (format "evaluating arguments to `%s'" 1098 (format-message "evaluating arguments to `%s'"
1099 (symbol-name (car form))) 1099 (symbol-name (car form)))
1100 (while args 1100 (while args
1101 (setcar args (eshell-do-eval (car args) synchronous-p)) 1101 (setcar args (eshell-do-eval (car args) synchronous-p))
1102 (setq args (cdr args))))) 1102 (setq args (cdr args)))))
diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el
index 86559f04721..867d3b9145d 100644
--- a/lisp/eshell/esh-proc.el
+++ b/lisp/eshell/esh-proc.el
@@ -409,7 +409,8 @@ If QUERY is non-nil, query the user with QUERY before calling FUNC."
409 (or all 409 (or all
410 (not (nth 2 entry))) 410 (not (nth 2 entry)))
411 (or (not query) 411 (or (not query)
412 (y-or-n-p (format query (process-name (car entry)))))) 412 (y-or-n-p (format-message query
413 (process-name (car entry))))))
413 (setq result (funcall func (car entry)))) 414 (setq result (funcall func (car entry))))
414 (unless (memq (process-status (car entry)) 415 (unless (memq (process-status (car entry))
415 '(run stop open closed)) 416 '(run stop open closed))
@@ -480,11 +481,11 @@ See the variable `eshell-kill-processes-on-exit'."
480 (save-window-excursion 481 (save-window-excursion
481 (list-processes) 482 (list-processes)
482 (if (or (not (eq eshell-kill-processes-on-exit 'ask)) 483 (if (or (not (eq eshell-kill-processes-on-exit 'ask))
483 (y-or-n-p (format "Kill processes owned by `%s'? " 484 (y-or-n-p (format-message "Kill processes owned by `%s'? "
484 (buffer-name)))) 485 (buffer-name))))
485 (eshell-round-robin-kill 486 (eshell-round-robin-kill
486 (if (eq eshell-kill-processes-on-exit 'every) 487 (if (eq eshell-kill-processes-on-exit 'every)
487 "Kill Eshell child process `%s'? "))) 488 (format-message "Kill Eshell child process `%s'? "))))
488 (let ((buf (get-buffer "*Process List*"))) 489 (let ((buf (get-buffer "*Process List*")))
489 (if (and buf (buffer-live-p buf)) 490 (if (and buf (buffer-live-p buf))
490 (kill-buffer buf))) 491 (kill-buffer buf)))