From f6e7ec024870e8ccaaed5bc2e0d92fde7554e16b Mon Sep 17 00:00:00 2001 From: Deepak Goel Date: Thu, 6 Dec 2007 00:17:56 +0000 Subject: [PATCH] Fix possibly buggy calls to `message'. --- lisp/ChangeLog | 18 ++++++++++++++++++ lisp/apropos.el | 2 +- lisp/complete.el | 8 ++++---- lisp/ediff.el | 2 +- lisp/files.el | 2 +- lisp/help.el | 2 +- lisp/image-dired.el | 6 +++--- lisp/simple.el | 2 +- 8 files changed, 30 insertions(+), 12 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d4b5237b479..733fba10ebe 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,23 @@ 2007-12-05 D. Goel + * 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 "". diff --git a/lisp/apropos.el b/lisp/apropos.el index 9fddf0103fb..f9720e1bcdb 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -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)) diff --git a/lisp/complete.el b/lisp/complete.el index e1d0ef07df4..b3a4928dd53 100644 --- a/lisp/complete.el +++ b/lisp/complete.el @@ -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) diff --git a/lisp/ediff.el b/lisp/ediff.el index 5974f23d64a..a53b93aee5b 100644 --- a/lisp/ediff.el +++ b/lisp/ediff.el @@ -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. diff --git a/lisp/files.el b/lisp/files.el index 274b6b7cd01..8d5fcfda8c2 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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) diff --git a/lisp/help.el b/lisp/help.el index ac6af2d9e50..c6650e1cf21 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -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) diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 82bfbfb20af..cca9686f237 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -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 diff --git a/lisp/simple.el b/lisp/simple.el index f49921e60dc..22f29ab0464 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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. -- 2.39.2