summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-08-31 15:10:07 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-08-31 15:10:37 -0700
commit244c417a5669eecca2a4930628ad438029466de1 (patch)
tree786b23a97c9fa3474e9d8d8e174d3e43a9cda3c9
parent86f692009b949cedea9ae1e25868c54dece68318 (diff)
downloademacs-244c417a5669eecca2a4930628ad438029466de1.tar.gz
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.
-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."
;; existing process.
(when (or notest (erc-autoaway-some-open-server-buffer))
(setq erc-autoaway-caused-away t)
- (erc-cmd-GAWAY (format erc-autoaway-message idle-time))))
+ (erc-cmd-GAWAY (format-message erc-autoaway-message idle-time))))
(defun erc-autoaway-reset-indicators (&rest stuff)
"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:
aliases))
(let* ((hook-name (intern (format "erc-server-%s-functions" name)))
(fn-name (intern (format "erc-server-%s" name)))
- (hook-doc (format "%sHook called upon receiving a %%s server response.
+ (hook-doc (format-message "\
+%sHook called upon receiving a %%s server response.
Each function is called with two arguments, the process associated
with the response and the parsed response. If the function returns
non-nil, stop processing the hook. Otherwise, continue.
@@ -1146,7 +1147,8 @@ See also `%s'."
(concat extra-var-doc "\n\n")
"")
fn-name))
- (fn-doc (format "%sHandler for a %s server response.
+ (fn-doc (format-message "\
+%sHandler for a %s server response.
PROC is the server process which returned the response.
PARSED is the actual response as an `erc-response' struct.
If 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."
(defcustom erc-fill-static-center 27
"Column around which all statically filled messages will be
-centered. This column denotes the point where the ' ' character
+centered. This column denotes the point where the ` ' character
between <nickname> and the entered text will be put, thus aligning
nick names right and text left."
:group 'erc-fill
@@ -195,4 +195,3 @@ You can put this on `erc-insert-modify-hook' and/or `erc-send-modify-hook'."
;; Local Variables:
;; indent-tabs-mode: nil
;; End:
-
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.")
eshell-ask-to-save-last-dir
(or (eq eshell-ask-to-save-last-dir 'always)
(y-or-n-p
- (format "Save last dir ring for Eshell buffer `%s'? "
- (buffer-name buf)))))
+ (format-message
+ "Save last dir ring for Eshell buffer `%s'? "
+ (buffer-name buf)))))
(eshell-write-last-dir-ring))))))
(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:
glob (car globs)
len (length glob)))))
(if (and recurse-p (not glob))
- (error "'**' cannot end a globbing pattern"))
+ (error "‘**’ cannot end a globbing pattern"))
(let ((index 1))
(setq incl glob)
(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,
eshell-save-history-on-exit
(or (eq eshell-save-history-on-exit t)
(y-or-n-p
- (format "Save input history for Eshell buffer `%s'? "
- (buffer-name buf)))))
+ (format-message
+ "Save input history for Eshell buffer `%s'? "
+ (buffer-name buf)))))
(eshell-write-history))))))
(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."
(not (file-symlink-p (car files))))
(progn
(if em-verbose
- (eshell-printn (format "rm: removing directory `%s'"
- (car files))))
+ (eshell-printn (format-message "rm: removing directory `%s'"
+ (car files))))
(unless
(or em-preview
(and em-interactive
(not (y-or-n-p
- (format "rm: remove directory `%s'? "
- (car files))))))
+ (format-message "rm: remove directory `%s'? "
+ (car files))))))
(eshell-funcalln 'delete-directory (car files) t t)))
(if em-verbose
- (eshell-printn (format "rm: removing file `%s'"
- (car files))))
+ (eshell-printn (format-message "rm: removing file `%s'"
+ (car files))))
(unless (or em-preview
(and em-interactive
(not (y-or-n-p
- (format "rm: remove `%s'? "
- (car files))))))
+ (format-message "rm: remove `%s'? "
+ (car files))))))
(eshell-funcalln 'delete-file (car files) t))))
(setq files (cdr files))))
@@ -260,28 +260,32 @@ Remove (unlink) the FILE(s).")
(cond
((bufferp entry)
(if em-verbose
- (eshell-printn (format "rm: removing buffer `%s'" entry)))
+ (eshell-printn (format-message "rm: removing buffer `%s'" entry)))
(unless (or em-preview
(and em-interactive
- (not (y-or-n-p (format "rm: delete buffer `%s'? "
- entry)))))
+ (not (y-or-n-p (format-message
+ "rm: delete buffer `%s'? "
+ entry)))))
(eshell-funcalln 'kill-buffer entry)))
((eshell-processp entry)
(if em-verbose
- (eshell-printn (format "rm: killing process `%s'" entry)))
+ (eshell-printn (format-message "rm: killing process `%s'" entry)))
(unless (or em-preview
(and em-interactive
- (not (y-or-n-p (format "rm: kill process `%s'? "
- entry)))))
+ (not (y-or-n-p (format-message
+ "rm: kill process `%s'? "
+ entry)))))
(eshell-funcalln 'kill-process entry)))
((symbolp entry)
(if em-verbose
- (eshell-printn (format "rm: uninterning symbol `%s'" entry)))
+ (eshell-printn (format-message
+ "rm: uninterning symbol `%s'" entry)))
(unless
(or em-preview
(and em-interactive
- (not (y-or-n-p (format "rm: unintern symbol `%s'? "
- entry)))))
+ (not (y-or-n-p (format-message
+ "rm: unintern symbol `%s'? "
+ entry)))))
(eshell-funcalln 'unintern entry)))
((stringp entry)
;; -f should silently ignore missing files (bug#15373).
@@ -294,8 +298,8 @@ Remove (unlink) the FILE(s).")
(if (or em-preview
(not em-interactive)
(y-or-n-p
- (format "rm: descend into directory `%s'? "
- entry)))
+ (format-message "rm: descend into directory `%s'? "
+ entry)))
(eshell-remove-entries (list entry) t))
(eshell-error (format "rm: %s: is a directory\n" entry)))
(eshell-remove-entries (list entry) t))))))
@@ -369,8 +373,8 @@ Remove the DIRECTORY(ies), if they are empty.")
(equal (nth 10 attr-target) (nth 10 attr))
(nth 11 attr-target) (nth 11 attr)
(equal (nth 11 attr-target) (nth 11 attr)))
- (eshell-error (format "%s: `%s' and `%s' are the same file\n"
- command (car files) target)))
+ (eshell-error (format-message "%s: `%s' and `%s' are the same file\n"
+ command (car files) target)))
(t
(let ((source (car files))
(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."
;; we can modify any `let' forms to evaluate only once.
(if (macrop (car form))
(let ((exp (eshell-copy-tree (macroexpand form))))
- (eshell-manipulate (format "expanding macro `%s'"
- (symbol-name (car form)))
+ (eshell-manipulate (format-message "expanding macro `%s'"
+ (symbol-name (car form)))
(setcar form (car exp))
(setcdr form (cdr exp)))))
(let ((args (cdr form)))
@@ -1095,8 +1095,8 @@ be finished later after the completion of an asynchronous subprocess."
(t
(if (and args (not (memq (car form) '(run-hooks))))
(eshell-manipulate
- (format "evaluating arguments to `%s'"
- (symbol-name (car form)))
+ (format-message "evaluating arguments to `%s'"
+ (symbol-name (car form)))
(while args
(setcar args (eshell-do-eval (car args) synchronous-p))
(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."
(or all
(not (nth 2 entry)))
(or (not query)
- (y-or-n-p (format query (process-name (car entry))))))
+ (y-or-n-p (format-message query
+ (process-name (car entry))))))
(setq result (funcall func (car entry))))
(unless (memq (process-status (car entry))
'(run stop open closed))
@@ -480,11 +481,11 @@ See the variable `eshell-kill-processes-on-exit'."
(save-window-excursion
(list-processes)
(if (or (not (eq eshell-kill-processes-on-exit 'ask))
- (y-or-n-p (format "Kill processes owned by `%s'? "
- (buffer-name))))
+ (y-or-n-p (format-message "Kill processes owned by `%s'? "
+ (buffer-name))))
(eshell-round-robin-kill
(if (eq eshell-kill-processes-on-exit 'every)
- "Kill Eshell child process `%s'? ")))
+ (format-message "Kill Eshell child process `%s'? "))))
(let ((buf (get-buffer "*Process List*")))
(if (and buf (buffer-live-p buf))
(kill-buffer buf)))