;; 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."
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.
(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
(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
;; Local Variables:
;; indent-tabs-mode: nil
;; End:
-
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)
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)
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)
(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))))
(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).
(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))))))
(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
;; 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)))
(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)))))
(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))
(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)))