changeset 65583:703495630901

Message format spec fixes (2)
author Deepak Goel <deego@gnufans.org>
date Sun, 18 Sep 2005 12:28:30 +0000
parents 4d1085b02d64
children 6dbba0bd58df
files lisp/textmodes/artist.el lisp/textmodes/bibtex.el lisp/textmodes/flyspell.el lisp/textmodes/ispell.el lisp/textmodes/org.el lisp/textmodes/reftex-dcr.el lisp/textmodes/reftex-index.el lisp/textmodes/tildify.el
diffstat 8 files changed, 26 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/artist.el	Sun Sep 18 12:25:02 2005 +0000
+++ b/lisp/textmodes/artist.el	Sun Sep 18 12:28:30 2005 +0000
@@ -4162,7 +4162,7 @@
 	  (setq artist-key-is-drawing t)
 
 	  ;; Feedback
-	  (message (substitute-command-keys
+	  (message "%s" (substitute-command-keys
 		    (concat "First point set. "
 			    "Set next with \\[artist-key-set-point], "
 			    "set last with C-u \\[artist-key-set-point]"))))
--- a/lisp/textmodes/bibtex.el	Sun Sep 18 12:25:02 2005 +0000
+++ b/lisp/textmodes/bibtex.el	Sun Sep 18 12:28:30 2005 +0000
@@ -3007,7 +3007,7 @@
 					  (cdr field-list))
 				  t)))
       (if comment
-          (message (nth 1 comment))
+          (message "%s" (nth 1 comment))
         (message "No comment available")))))
 
 (defun bibtex-make-field (field &optional move interactive)
--- a/lisp/textmodes/flyspell.el	Sun Sep 18 12:25:02 2005 +0000
+++ b/lisp/textmodes/flyspell.el	Sun Sep 18 12:28:30 2005 +0000
@@ -566,7 +566,7 @@
 	   (interactive-p))
       (let ((binding (where-is-internal 'flyspell-auto-correct-word
 					nil 'non-ascii)))
-	(message
+	(message "%s"
 	 (if binding
 	     (format "Welcome to flyspell. Use %s or Mouse-2 to correct words."
 		     (key-description binding))
@@ -942,7 +942,7 @@
 			    (sort (car (cdr (cdr poss))) 'string<)
 			  (car (cdr (cdr poss)))))))
     (if flyspell-issue-message-flag
-	(message (format "mispelling `%s'  %S" word replacements)))))
+	(message "mispelling `%s'  %S" word replacements))))
 
 ;*---------------------------------------------------------------------*/
 ;*    flyspell-word-search-backward ...                                */
@@ -1090,7 +1090,7 @@
 			      (if flyspell-highlight-flag
 				  (flyspell-highlight-duplicate-region
 				   start end poss)
-				(message (format "duplicate `%s'" word)))
+				(message "duplicate `%s'" word))
 			      nil)
 			     (t
 			      (setq flyspell-word-cache-result nil)
@@ -1679,7 +1679,7 @@
       (setq pos (cdr pos)))
     (if (fboundp 'display-message)
 	(display-message 'no-log string)
-      (message string))))
+      (message "%s" string))))
 
 ;*---------------------------------------------------------------------*/
 ;*    flyspell-abbrev-table ...                                        */
--- a/lisp/textmodes/ispell.el	Sun Sep 18 12:25:02 2005 +0000
+++ b/lisp/textmodes/ispell.el	Sun Sep 18 12:28:30 2005 +0000
@@ -788,7 +788,7 @@
 								 (point))
 				 ", "
 				 ispell-version))
-	    (message result))
+	    (message "%s" result))
 	;; return library directory.
 	(if (re-search-forward "LIBDIR = \\\"\\([^ \t\n]*\\)\\\"" nil t)
 	    (setq result (buffer-substring (match-beginning 1) (match-end 1)))))
@@ -2387,7 +2387,7 @@
     (substring output 2))		; return root word
    ((equal 0 (string-match "[\ra-zA-Z]" output))
     (ding)				; error message from ispell!
-    (message (concat "Ispell error: " output))
+    (message "Ispell error: %s" output)
     (sit-for 5)
     nil)
    (t					; need to process &, ?, and #'s
--- a/lisp/textmodes/org.el	Sun Sep 18 12:25:02 2005 +0000
+++ b/lisp/textmodes/org.el	Sun Sep 18 12:28:30 2005 +0000
@@ -2805,7 +2805,7 @@
 		      (assoc completion table))
 		 (insert " "))
 	     (if (and (equal type :opt) (assoc completion table))
-		 (message (substitute-command-keys
+		 (message "%s" (substitute-command-keys
 			   "Press \\[org-complete] again to insert example settings"))))
 	    (t
 	     (message "Making completion list...")
@@ -2912,7 +2912,7 @@
    org-deadline-string " "
    (format-time-string (car org-time-stamp-formats)
 		       (org-read-date nil 'to-time)))
-  (message (substitute-command-keys
+  (message "%s" (substitute-command-keys
 	    "Use \\[org-timestamp-up-day] and \\[org-timestamp-down-day] to change the date.")))
 
 (defun org-schedule ()
@@ -2924,7 +2924,7 @@
    org-scheduled-string " "
    (format-time-string (car org-time-stamp-formats)
 		       (org-read-date nil 'to-time)))
-  (message (substitute-command-keys
+  (message "%s" (substitute-command-keys
 	    "Use \\[org-timestamp-up-day] and \\[org-timestamp-down-day] to change the date.")))
 
 
@@ -2997,7 +2997,7 @@
 	(setq current org-default-priority))
       (cond
        ((eq action 'set)
-	(message (format "Priority A-%c, SPC to remove: " org-lowest-priority))
+	(message "Priority A-%c, SPC to remove: " org-lowest-priority)
 	(setq new (read-char-exclusive))
 	(cond ((equal new ?\ ) (setq remove t))
 	      ((or (< (upcase new) ?A) (> (upcase new) org-lowest-priority))
@@ -7014,9 +7014,13 @@
 		     (format "%d:%02d:%02d" h m s))))
 	(kill-new sres)
 	(if (interactive-p)
-	    (message (substitute-command-keys
-		      (format "Sum of %d items: %-20s     (\\[yank] will insert result into buffer)"
-			      (length numbers) sres))))
+	    (message "%s"
+		     (concat
+		      (format "Sum of %d items: %-20s     "  (length numbers) sres)
+		      (substitute-command-keys
+		       "(\\[yank] will insert result into buffer)")
+		      ))
+	  )
 	sres))))
 
 (defun org-table-get-number-for-summing (s)
--- a/lisp/textmodes/reftex-dcr.el	Sun Sep 18 12:25:02 2005 +0000
+++ b/lisp/textmodes/reftex-dcr.el	Sun Sep 18 12:28:30 2005 +0000
@@ -267,7 +267,7 @@
   ;; Display crossref info in echo area.
   (cond
    ((null docstruct)
-    (message (substitute-command-keys (format reftex-no-info-message "ref"))))
+    (message "%s" (substitute-command-keys (format reftex-no-info-message "ref"))))
    ((null entry)
     (message "ref: unknown label: %s" label))
    (t
@@ -300,7 +300,7 @@
               (error
                (if (and files (= (length all-files) (length files)))
                    (message "cite: no such database entry: %s" key)
-                 (message (substitute-command-keys 
+                 (message "%s" (substitute-command-keys 
                            (format reftex-no-info-message "cite"))))
                nil)))
       (when entry
--- a/lisp/textmodes/reftex-index.el	Sun Sep 18 12:25:02 2005 +0000
+++ b/lisp/textmodes/reftex-index.el	Sun Sep 18 12:28:30 2005 +0000
@@ -1022,7 +1022,7 @@
         (reftex-insert-index (list data) reftex-index-tag t
                              "EDITED")))
     (setq reftex-last-follow-point 1)
-    (and message (message message))))
+    (and message (message "%s" message))))
 
 ;; Index map
 (define-key reftex-index-map (if (featurep 'xemacs) [(button2)] [(mouse-2)])
@@ -1187,7 +1187,7 @@
   (set-marker reftex-index-return-marker (point))
   (reftex-index-selection-or-word arg 'phrase)
   (if (eq major-mode 'reftex-index-phrases-mode)
-      (message 
+      (message "%s" 
        (substitute-command-keys
         "Return to LaTeX with \\[reftex-index-phrases-save-and-return]"))))
 
@@ -1910,7 +1910,7 @@
                           ;; Recursive edit
                           (save-match-data
                             (save-excursion
-                              (message 
+                              (message "%s" 
                                (substitute-command-keys
                                 "Recursive edit.  Resume with \\[exit-recursive-edit]"))
                               (recursive-edit))))
--- a/lisp/textmodes/tildify.el	Sun Sep 18 12:25:02 2005 +0000
+++ b/lisp/textmodes/tildify.el	Sun Sep 18 12:28:30 2005 +0000
@@ -222,11 +222,11 @@
 		      (if (> (point) (marker-position marker-end))
 			  (setq finish t))
 		    (message
-		     (format "End of environment not found: %s" end-env))
+		     "End of environment not found: %s" end-env)
 		    (setq finish t))))))
       ;; No ignored environments, tildify directly
       (tildify-tildify beg end ask)))
-  (message (format "%d spaces replaced." tildify-count)))
+  (message "%d spaces replaced." tildify-count))
 
 ;;;###autoload
 (defun tildify-buffer ()