summaryrefslogtreecommitdiff
path: root/lisp/eshell
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell')
-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
6 files changed, 41 insertions, 34 deletions
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)))