changeset 87096:a99a2e8bc21e

Fix possibly buggy calls to `message'.
author Deepak Goel <deego@gnufans.org>
date Thu, 06 Dec 2007 00:17:56 +0000
parents 8f23eba1a316
children 781256628613
files lisp/ChangeLog lisp/apropos.el lisp/complete.el lisp/ediff.el lisp/files.el lisp/help.el lisp/image-dired.el lisp/simple.el
diffstat 8 files changed, 30 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Dec 05 22:16:17 2007 +0000
+++ b/lisp/ChangeLog	Thu Dec 06 00:17:56 2007 +0000
@@ -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 "".
 
--- a/lisp/apropos.el	Wed Dec 05 22:16:17 2007 +0000
+++ b/lisp/apropos.el	Thu Dec 06 00:17:56 2007 +0000
@@ -449,7 +449,7 @@
 			  "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))
--- a/lisp/complete.el	Wed Dec 05 22:16:17 2007 +0000
+++ b/lisp/complete.el	Thu Dec 06 00:17:56 2007 +0000
@@ -381,9 +381,9 @@
 ;; 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 @@
 (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)
--- a/lisp/ediff.el	Wed Dec 05 22:16:17 2007 +0000
+++ b/lisp/ediff.el	Thu Dec 06 00:17:56 2007 +0000
@@ -1423,7 +1423,7 @@
 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.
--- a/lisp/files.el	Wed Dec 05 22:16:17 2007 +0000
+++ b/lisp/files.el	Thu Dec 06 00:17:56 2007 +0000
@@ -2632,7 +2632,7 @@
 		 (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)
--- a/lisp/help.el	Wed Dec 05 22:16:17 2007 +0000
+++ b/lisp/help.el	Thu Dec 06 00:17:56 2007 +0000
@@ -1029,7 +1029,7 @@
 	   ".")
 	  (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)
--- a/lisp/image-dired.el	Wed Dec 05 22:16:17 2007 +0000
+++ b/lisp/image-dired.el	Thu Dec 06 00:17:56 2007 +0000
@@ -1184,7 +1184,7 @@
                     ", "))
             (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 @@
     (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 @@
                  ", "))
          (comment (image-dired-get-comment file)))
     (if file-name
-        (message
+        (message "%s"
          (image-dired-format-properties-string
           dired-buf
           file-name
--- a/lisp/simple.el	Wed Dec 05 22:16:17 2007 +0000
+++ b/lisp/simple.el	Thu Dec 06 00:17:56 2007 +0000
@@ -1633,7 +1633,7 @@
 	 (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.