Fix possibly buggy calls to `message'.

This commit is contained in:
Deepak Goel 2007-12-06 00:17:56 +00:00
parent 8aa8da0595
commit f6e7ec0248
8 changed files with 30 additions and 12 deletions

View file

@ -1,5 +1,23 @@
2007-12-05 D. Goel <deego3@gmail.com>
* simple.el (undo): Ditto.
* image-dired.el (image-dired-display-thumb-properties): Ditto.
(image-dired-modify-mark-on-thumb-original-file): Ditto.
(image-dired-dired-display-properties): Ditto.
* help.el (help-window-display-message): Ditto.
* files.el (hack-local-variables-confirm): Ditto.
* ediff.el (ediff-version): Ditto.
* complete.el (pc-chunk-after): Ditto.
(PC-temp-minibuffer-message): Ditto.
* apropos.el (apropos-command): `message' and `error': Ensure that first arg is
a format string.
* emacs-lisp/find-func.el (find-library-name): Prefer files with
".el" suffix over "".

View file

@ -449,7 +449,7 @@ while a list of strings is used as a word list."
"command or function" "command"))
current-prefix-arg))
(apropos-parse-pattern pattern)
(let ((message
(let ((message "%s"
(let ((standard-output (get-buffer-create "*Apropos*")))
(print-help-return-message 'identity))))
(or do-all (setq do-all apropos-do-all))

View file

@ -381,9 +381,9 @@ of `minibuffer-completion-table' and the minibuffer contents.")
;; Returns the sequence of non-delimiter characters that follow regexp in string.
(defun PC-chunk-after (string regexp)
(if (not (string-match regexp string))
(let ((message (format "String %s didn't match regexp %s" string regexp)))
(message message)
(error message)))
(let ((message "String %s didn't match regexp %s"))
(message message string regexp)
(error message string regexp)))
(let ((result (substring string (match-end 0))))
;; result may contain multiple chunks
(if (string-match PC-delim-regex result)
@ -869,7 +869,7 @@ GOTO-END is non-nil, however, it instead replaces up to END."
(defun PC-temp-minibuffer-message (message)
"A Lisp version of `temp_minibuffer_message' from minibuf.c."
(cond (PC-not-minibuffer
(message message)
(message "%s" message)
(sit-for 2)
(message ""))
((fboundp 'temp-minibuffer-message)

View file

@ -1423,7 +1423,7 @@ Uses `vc.el' or `rcs.el' depending on `ediff-version-control-package'."
When called interactively, displays the version."
(interactive)
(if (interactive-p)
(message (ediff-version))
(message "%s" (ediff-version))
(format "Ediff %s of %s" ediff-version ediff-date)))
;; info is run first, and will autoload info.el.

View file

@ -2632,7 +2632,7 @@ n -- to ignore the local variables list.")
(if offer-save '(?! ?y ?n ?\s ?\C-g) '(?y ?n ?\s ?\C-g)))
done)
(while (not done)
(message prompt)
(message "%s" prompt)
(setq char (read-event))
(if (numberp char)
(cond ((eq char ?\C-v)

View file

@ -1029,7 +1029,7 @@ scroll the \"other\" window."
".")
(other ", \\[scroll-other-window] to scroll help.")
(t ", \\[scroll-up] to scroll help."))))
(message
(message "%s"
(substitute-command-keys (concat quit-part scroll-part)))))
(defun help-window-setup-finish (window &optional reuse keep-frame)

View file

@ -1184,7 +1184,7 @@ comment."
", "))
(comment (get-text-property (point) 'comment)))
(if file-name
(message
(message "%s"
(image-dired-format-properties-string
dired-buf
file-name
@ -1208,7 +1208,7 @@ dired."
(if (not (and dired-buf file-name))
(message "No image, or image with correct properties, at point.")
(with-current-buffer dired-buf
(message file-name)
(message "%s" file-name)
(setq file-name (file-name-nondirectory file-name))
(goto-char (point-min))
(if (search-forward file-name nil t)
@ -2239,7 +2239,7 @@ non-nil."
", "))
(comment (image-dired-get-comment file)))
(if file-name
(message
(message "%s"
(image-dired-format-properties-string
dired-buf
file-name

View file

@ -1633,7 +1633,7 @@ as an argument limits undo to changes within the current region."
(delete-auto-save-file-if-necessary recent-save))
;; Display a message announcing success.
(if message
(message message))))
(message "%s" message))))
(defun buffer-disable-undo (&optional buffer)
"Make BUFFER stop keeping undo information.