changeset 65589:0670efd1e2df

message format spec fixes, commit # 8
author Deepak Goel <deego@gnufans.org>
date Sun, 18 Sep 2005 12:39:40 +0000
parents 7ac02cfe1025
children c45ae2a74f0f
files lisp/emulation/viper-ex.el lisp/emulation/viper-macs.el lisp/emulation/ws-mode.el
diffstat 3 files changed, 10 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emulation/viper-ex.el	Sun Sep 18 12:38:39 2005 +0000
+++ b/lisp/emulation/viper-ex.el	Sun Sep 18 12:39:40 2005 +0000
@@ -1590,7 +1590,7 @@
 
 ;; Ex print working directory
 (defun ex-pwd ()
-  (message default-directory))
+  (message "%s" default-directory))
 
 ;; Ex quit command
 (defun ex-quit ()
@@ -2230,7 +2230,7 @@
 		       (if (buffer-modified-p) "[Modified]" "[Unchanged]")))
     (if (< (+ 1 (length info) (length file))
 	   (window-width (minibuffer-window)))
-	(message (concat file " " info))
+	(message "%s" (concat file " " info))
       (save-window-excursion
 	(with-output-to-temp-buffer " *viper-info*"
 	  (princ (concat "\n" file "\n\n\t" info "\n\n")))
--- a/lisp/emulation/viper-macs.el	Sun Sep 18 12:38:39 2005 +0000
+++ b/lisp/emulation/viper-macs.el	Sun Sep 18 12:39:40 2005 +0000
@@ -186,7 +186,7 @@
 	       variant (if (> (length key-seq) 0)
 			   (prin1-to-string (viper-display-macro key-seq))
 			 "")))
-	(message message)
+	(message "%s" message)
 	(setq event (viper-read-key))
 	;;(setq event (viper-read-event))
 	(setq key
@@ -263,7 +263,7 @@
 			   (prin1-to-string
 			    (viper-display-macro key-seq))
 			 "")))
-	(message message)
+	(message "%s" message)
 	(setq event (viper-read-key))
 	;;(setq event (viper-read-event))
 	(setq key
@@ -442,7 +442,11 @@
 		       scope)
 	       viper-custom-file-name))
 
-	  (message msg)
+	  ;; 2005-09-18 T06:41:22-0400 (Sunday)    D. Goel
+	  ;; From careful parsing of the above code, it looks like msg
+	  ;; couldn't be nil when we reach here. Since it is a string,
+	  ;; and a complicated one too, we might as well provide it a "%s"
+	  (message "%s" msg)
 	  ))
 
     (setq new-elt
--- a/lisp/emulation/ws-mode.el	Sun Sep 18 12:38:39 2005 +0000
+++ b/lisp/emulation/ws-mode.el	Sun Sep 18 12:39:40 2005 +0000
@@ -691,7 +691,7 @@
 This will only work for errors raised by WordStar mode functions."
   (interactive)
   (if ws-last-errormessage
-      (message ws-last-errormessage)
+      (message "%s" ws-last-errormessage)
     (message "No WordStar error yet.")))
 
 (defun ws-kill-eol ()