]> code.delx.au - gnu-emacs/blobdiff - lisp/simple.el
message format spec fixes, commit # 10
[gnu-emacs] / lisp / simple.el
index fe58a47610eed33c86cf8034e6fadb26adfe2b42..f06a279c9c2a4374ec954c5f7b948ca4852eb9a9 100644 (file)
@@ -3668,9 +3668,18 @@ The goal column is stored in the variable `goal-column'."
         (setq goal-column nil)
         (message "No goal column"))
     (setq goal-column (current-column))
-    (message (substitute-command-keys
-             "Goal column %d (use \\[set-goal-column] with an arg to unset it)")
-            goal-column))
+    ;; The older method below can be erroneous if `set-goal-column' is bound
+    ;; to a sequence containing %
+    ;;(message (substitute-command-keys
+    ;;"Goal column %d (use \\[set-goal-column] with an arg to unset it)")
+    ;;goal-column)
+    (message "%s"
+            (concat 
+             (format "Goal column %d " goal-column)
+             (substitute-command-keys
+              "(use \\[set-goal-column] with an arg to unset it)")))
+    
+    )
   nil)
 \f