Mercurial > emacs
changeset 65582:4d1085b02d64
Message format spec fixes (1)
author | Deepak Goel <deego@gnufans.org> |
---|---|
date | Sun, 18 Sep 2005 12:25:02 +0000 |
parents | fd1833c3398a |
children | 703495630901 |
files | lisp/ChangeLog lisp/apropos.el lisp/bookmark.el lisp/desktop.el lisp/dired-aux.el lisp/dnd.el lisp/echistory.el lisp/ediff-util.el lisp/files.el lisp/hi-lock.el lisp/ibuf-macs.el lisp/image-mode.el lisp/isearch.el lisp/iswitchb.el lisp/log-edit.el lisp/pcomplete.el lisp/pcvs.el lisp/printing.el lisp/server.el lisp/ses.el lisp/simple.el lisp/startup.el lisp/strokes.el lisp/vc.el lisp/wdired.el lisp/woman.el |
diffstat | 26 files changed, 205 insertions(+), 39 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/ChangeLog Sun Sep 18 12:25:02 2005 +0000 @@ -1,3 +1,160 @@ +2005-09-18 D Goel <deego@gnufans.org> + + * apropos.el (apropos-command): Fix `message' call: first arg + should be a format spec. In this and all other cases that appear + below and elsewhere in the source code, I made a change only when + two conditions were satisfied: [1] I can think of a possibility + that the arguments would cause an error, for example, the code is + question relies on extarnal variables such as filenames. [2] I was + sure that the arg to `message' could not have been nil in the + code. + + * textmodes/tildify.el (tildify-region): Ditto. + + * textmodes/reftex-index.el (reftex-index-change-entry) + (reftex-index-phrase-selection-or-word) + (reftex-query-index-phrase): Ditto. + + * textmodes/reftex-dcr.el (reftex-echo-ref, reftex-echo-cite): Ditto. + + * textmodes/org.el (org-complete, org-deadline, org-schedule) + (org-priority, org-table-sum): Ditto. + + * textmodes/ispell.el (ispell-check-version) + (ispell-parse-output): Ditto. + + * textmodes/flyspell.el (flyspell-mode-on) + (flyspell-notify-misspell, flyspell-word) + (flyspell-display-next-corrections): Ditto. + + * textmodes/bibtex.el (bibtex-print-help-message): Ditto. + + * textmodes/artist.el (artist-key-set-point-poly): Ditto. + + * term/mac-win.el (mac-services-insert-text): Ditto. + + * progmodes/vhdl-mode.el (vhdl-warning, vhdl-print-warnings) + (vhdl-hooked-abbrev, vhdl-template-insert-fun) + (vhdl-port-paste-testbench, vhdl-compose-new-component) + (vhdl-compose-configuration): Ditto. + + * progmodes/sh-script.el (sh-blink, sh-show-indent) + (sh-set-indent, sh-learn-line-indent): Ditto. + + * progmodes/ps-mode.el (ps-mode-target-column): Ditto. + + * progmodes/idlwave.el (idlwave-make-tags) + (idlwave-scan-library-catalogs): Ditto. + + * progmodes/idlw-shell.el (idlwave-shell-parse-stack-and-display): Ditto. + + * progmodes/gud.el (gud-jdb-analyze-source): Ditto. + + * progmodes/flymake.el (flymake-log): Ditto. + + * progmodes/ebnf2ps.el (ebnf-generate-region): Ditto. + + * progmodes/cmacexp.el (c-macro-expansion): Ditto. + + * progmodes/ada-xref.el (ada-treat-cmd-string): Ditto. + + * progmodes/ada-mode.el (ada-create-case-exception-substring) + (ada-justified-indent-current, ada-batch-reformat): Ditto. + + * play/zone.el (zone): Ditto. + + * play/landmark.el (lm-move): Ditto. + + * play/decipher.el (decipher-show-alphabet): Ditto. + + * net/newsticker.el (newsticker--display-jump) + (newsticker--display-scroll): Ditto. + + * mail/rmail-spam-filter.el (rsf-add-subject-to-spam-list) + (rsf-add-sender-to-spam-list, rsf-add-region-to-spam-list): Ditto. + + * mail/feedmail.el (feedmail-dump-message-to-queue): Ditto. + + * eshell/esh-proc.el (eshell-remove-process-entry): Ditto. + + * emulation/ws-mode.el (ws-last-error): Ditto. + + * emulation/viper-macs.el (ex-map-read-args, ex-unmap-read-args) + (viper-record-kbd-macro): Ditto. + + * emulation/viper-ex.el (ex-pwd, viper-info-on-file): Ditto. + + * emacs-lisp/lisp-mnt.el (lm-report-bug): Ditto. + + * emacs-lisp/find-func.el (find-function-noselect): Ditto. + + * calendar/timeclock.el (timeclock-status-string) + (timeclock-workday-remaining-string) + (timeclock-workday-elapsed-string) + (timeclock-when-to-leave-string): Ditto. + + * calendar/icalendar.el (icalendar--convert-ical-to-diary): Ditto. + + * calc/calc-units.el (calc-enter-units-table): Ditto. + + * calc/calc-mode.el (calc-mode-record-mode): Ditto. + + * woman.el (woman-mini-help): Ditto. + + * wdired.el (wdired-change-to-wdired-mode): Ditto. + + * vc.el (vc-retrieve-snapshot): Ditto. + + * strokes.el (strokes-read-stroke, strokes-read-complex-stroke): Ditto. + + * startup.el (display-startup-echo-area-message): Ditto. + + * simple.el (set-goal-column): Ditto. + + * ses.el (ses-command-hook, ses-recalculate-cell): Ditto. + + * server.el (server-process-filter): Ditto. + + * printing.el (pr-interface-txt-print, pr-interface-printify) + (pr-interface-ps): Ditto. + + * pcvs.el (cvs-help): Ditto. + + * log-edit.el (log-edit, log-edit-mode-help): Ditto. + + * iswitchb.el (iswitchb-possible-new-buffer): Ditto. + + * isearch.el (isearch-edit-string): Ditto. + + * image-mode.el (image-mode, image-minor-mode): Ditto. + + * ibuf-macs.el (define-ibuffer-filter): Ditto. + + * hi-lock.el (hi-lock-find-patterns): Ditto. + + * files.el (toggle-read-only): Ditto. + + * ediff-util.el (ediff-copy-diff) + (ediff-write-merge-buffer-and-maybe-kill): Ditto. + + * echistory.el (Electric-history-undefined): Ditto. + + * dnd.el (dnd-insert-text): Ditto. + + * dired-aux.el (dired-query): Ditto. + + * desktop.el (desktop-restore-file-buffer) + (desktop-lazy-create-buffer): Ditto. + + * bookmark.el (bookmark-bmenu-locate): Ditto. + + * obsolete/fast-lock.el (@top-level): Ditto in the macro definition of `with-temp-message'. + + * pcomplete.el (pcomplete--help): Fix `message' format spec. Not + having a %s would be weird, though not technically wrong. + + + 2005-09-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> * term/mac-win.el (mac-add-charset-info): Doc fix.
--- a/lisp/apropos.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/apropos.el Sun Sep 18 12:25:02 2005 +0000 @@ -443,7 +443,7 @@ (setq p (cdr p)))) (and (apropos-print t nil) message - (message message)))) + (message "%s" message)))) ;;;###autoload
--- a/lisp/bookmark.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/bookmark.el Sun Sep 18 12:25:02 2005 +0000 @@ -2058,7 +2058,7 @@ (interactive) (if (bookmark-bmenu-check-position) (let ((bmrk (bookmark-bmenu-bookmark))) - (message (bookmark-location bmrk))))) + (message "%s" (bookmark-location bmrk))))) (defun bookmark-bmenu-relocate () "Change the file path of the bookmark on the current line,
--- a/lisp/desktop.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/desktop.el Sun Sep 18 12:25:02 2005 +0000 @@ -944,7 +944,7 @@ desktop-buffer-file-name))) (if desktop-missing-file-warning (y-or-n-p (concat msg " Re-create? ")) - (message msg) + (message "%s" msg) nil))) (let* ((auto-insert nil) ; Disable auto insertion (coding-system-for-read @@ -1101,7 +1101,7 @@ (msg (format "Desktop lazily opening %s (%s remaining)..." buffer-name remaining))) (when desktop-lazy-verbose - (message msg)) + (message "%s" msg)) (let ((desktop-first-buffer nil) (desktop-buffer-ok-count 0) (desktop-buffer-fail-count 0))
--- a/lisp/dired-aux.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/dired-aux.el Sun Sep 18 12:25:02 2005 +0000 @@ -845,7 +845,7 @@ (apply 'message qprompt qs-args) (setq char (set qs-var (read-char)))) ;; Display the question with the answer. - (message (concat (apply 'format qprompt qs-args) + (message "%s" (concat (apply 'format qprompt qs-args) (char-to-string char))) (memq (cdr elt) '(t y yes)))))))
--- a/lisp/dnd.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/dnd.el Sun Sep 18 12:25:02 2005 +0000 @@ -179,7 +179,7 @@ (not (windowp window))) (progn (kill-new text) - (message + (message "%s" (substitute-command-keys "The dropped text can be accessed with \\[yank]"))) (insert text))
--- a/lisp/echistory.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/echistory.el Sun Sep 18 12:25:02 2005 +0000 @@ -140,7 +140,7 @@ (defun Electric-history-undefined () (interactive) (ding) - (message (substitute-command-keys "Type \\[Helper-help] for help, ? for commands, C-c C-c to quit, Space to execute")) + (message "%s" (substitute-command-keys "Type \\[Helper-help] for help, ? for commands, C-c C-c to quit, Space to execute")) (sit-for 4)) (defun Electric-history-quit ()
--- a/lisp/ediff-util.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/ediff-util.el Sun Sep 18 12:25:02 2005 +0000 @@ -2075,7 +2075,7 @@ (ediff-clear-fine-differences n)) ;; Make sure that the message about saving and how to restore is seen ;; by the user - (message messg)) + (message "%s" messg)) )) ;; Save Nth diff of buffer BUF-TYPE \(A, B, or C\). @@ -2720,7 +2720,7 @@ (format "Another buffer is visiting file %s. Too dangerous to save the merge buffer" file))) (beep) - (message warn-message) + (message "%s" warn-message) (with-output-to-temp-buffer ediff-msg-buffer (princ "\n\n") (princ warn-message) @@ -3286,7 +3286,7 @@ (princ warn-message) (princ "\n\n")) (if (y-or-n-p - (message warn-message)) + (message "%s" warn-message)) (with-current-buffer buff (save-buffer) (kill-buffer (current-buffer)))
--- a/lisp/files.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/files.el Sun Sep 18 12:25:02 2005 +0000 @@ -3580,7 +3580,7 @@ (t (setq buffer-read-only (not buffer-read-only)) (force-mode-line-update))) (if (vc-backend buffer-file-name) - (message (substitute-command-keys + (message "%s" (substitute-command-keys (concat "File is under version-control; " "use \\[vc-next-action] to check in/out"))))))
--- a/lisp/hi-lock.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/hi-lock.el Sun Sep 18 12:25:02 2005 +0000 @@ -564,7 +564,7 @@ (hi-lock-current-line))))))) (when hi-lock-mode (hi-lock-set-file-patterns all-patterns)) (if (interactive-p) - (message (format "Hi-lock added %d patterns." (length all-patterns))))))) + (message "Hi-lock added %d patterns." (length all-patterns)))))) (defun hi-lock-font-lock-hook () "Add hi lock patterns to font-lock's."
--- a/lisp/ibuf-macs.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/ibuf-macs.el Sun Sep 18 12:25:02 2005 +0000 @@ -281,7 +281,7 @@ ,(concat (or documentation "This filter is not documented.")) (interactive (list ,reader)) (ibuffer-push-filter (cons ',name qualifier)) - (message + (message "%s" (format ,(concat (format "Filter by %s added: " description) " %s") qualifier))
--- a/lisp/image-mode.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/image-mode.el Sun Sep 18 12:25:02 2005 +0000 @@ -66,7 +66,7 @@ ;; variables were cleared by kill-all-local-variables (setq cursor-type nil truncate-lines t)) (run-mode-hooks 'image-mode-hook) - (message (concat (substitute-command-keys + (message "%s" (concat (substitute-command-keys "Type \\[image-toggle-display] to view the image as ") (if (get-text-property (point-min) 'display) "text" "an image") "."))) @@ -84,7 +84,7 @@ (if (get-text-property (point-min) 'display) (setq cursor-type nil truncate-lines t)) (add-hook 'change-major-mode-hook (lambda () (image-minor-mode -1)) nil t) - (message (concat (substitute-command-keys + (message "%s" (concat (substitute-command-keys "Type \\[image-toggle-display] to view the image as ") (if (get-text-property (point-min) 'display) "text" "an image") "."))))
--- a/lisp/isearch.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/isearch.el Sun Sep 18 12:25:02 2005 +0000 @@ -1016,7 +1016,7 @@ ;; read a key the normal way. ;; Word search does not apply (yet) to regexp searches, ;; no check is made here. - (message (isearch-message-prefix nil nil t)) + (message "%s" (isearch-message-prefix nil nil t)) (if (memq (lookup-key isearch-mode-map (vector e)) '(isearch-yank-word isearch-yank-word-or-char))
--- a/lisp/iswitchb.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/iswitchb.el Sun Sep 18 12:25:02 2005 +0000 @@ -1122,7 +1122,7 @@ (set-buffer-major-mode newbufcreated)) (iswitchb-visit-buffer newbufcreated)) ;; else wont create new buffer - (message (format "no buffer matching `%s'" buf))))) + (message "no buffer matching `%s'" buf)))) (defun iswitchb-window-buffer-p (buffer) "Return window pointer if BUFFER is visible in another frame.
--- a/lisp/log-edit.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/log-edit.el Sun Sep 18 12:25:02 2005 +0000 @@ -331,7 +331,7 @@ (set (make-local-variable 'log-edit-initial-files) (log-edit-files)) (when setup (run-hooks 'log-edit-hook)) (goto-char (point-min)) (push-mark (point-max)) - (message (substitute-command-keys + (message "%s" (substitute-command-keys "Press \\[log-edit-done] when you are done editing.")))) (define-derived-mode log-edit-mode text-mode "Log-Edit" @@ -426,7 +426,7 @@ (interactive) (if (eq last-command 'log-edit-mode-help) (describe-function major-mode) - (message + (message "%s" (substitute-command-keys "Type `\\[log-edit-done]' to finish commit. Try `\\[describe-function] log-edit-done' for more help."))))
--- a/lisp/pcomplete.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/pcomplete.el Sun Sep 18 12:25:02 2005 +0000 @@ -1138,7 +1138,7 @@ (fboundp 'Info-goto-node)) (listp pcomplete-help))) (if (listp pcomplete-help) - (message (eval pcomplete-help)) + (message "%s" (eval pcomplete-help)) (save-window-excursion (info)) (switch-to-buffer-other-window "*info*") (funcall (symbol-function 'Info-goto-node) pcomplete-help))
--- a/lisp/pcvs.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/pcvs.el Sun Sep 18 12:25:02 2005 +0000 @@ -1171,7 +1171,7 @@ (interactive) (if (eq last-command 'cvs-help) (describe-function 'cvs-mode) ; would need minor-mode for log-edit-mode - (message + (message "%s" (substitute-command-keys "`\\[cvs-help]':help `\\[cvs-mode-add]':add `\\[cvs-mode-commit]':commit \ `\\[cvs-mode-diff-map]':diff* `\\[cvs-mode-log]':log \
--- a/lisp/printing.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/printing.el Sun Sep 18 12:25:02 2005 +0000 @@ -4,7 +4,7 @@ ;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> ;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> -;; Time-stamp: <2005/06/11 19:51:32 vinicius> +;; Time-stamp: <2005-09-18 05:57:14 deego> ;; Keywords: wp, print, PostScript ;; Version: 6.8.4 ;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ @@ -6424,7 +6424,7 @@ ;; handlers ((quit error) (ding) - (message (error-message-string data))))) + (message "%s" (error-message-string data))))) (defun pr-interface-printify (&rest ignore) @@ -6449,7 +6449,7 @@ ;; handlers ((quit error) (ding) - (message (error-message-string data))))) + (message "%s" (error-message-string data))))) (defun pr-interface-ps-print (&rest ignore) @@ -6515,7 +6515,7 @@ ;; handlers ((quit error) (ding) - (message (error-message-string data))))) + (message "%s" (error-message-string data))))) (defun pr-i-ps-send ()
--- a/lisp/server.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/server.el Sun Sep 18 12:25:02 2005 +0000 @@ -371,7 +371,7 @@ (server-switch-buffer (nth 1 client)) (run-hooks 'server-switch-hook) (unless nowait - (message (substitute-command-keys + (message "%s" (substitute-command-keys "When done with a buffer, type \\[server-edit]"))))) ;; Avoid preserving the connection after the last real frame is deleted. (if tmp-frame (delete-frame tmp-frame))))
--- a/lisp/ses.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/ses.el Sun Sep 18 12:25:02 2005 +0000 @@ -1612,7 +1612,7 @@ (error (unless executing-kbd-macro (ding)) - (message (error-message-string err)))) + (message "%s" (error-message-string err)))) nil) ;Make coverage-tester happy (defun ses-create-header-string () @@ -1739,7 +1739,7 @@ (error (setq sig hold)))) (cond (sig - (message (error-message-string sig))) + (message "%s" (error-message-string sig))) ((consp ses--curcell) (message " ")) (t
--- a/lisp/simple.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/simple.el Sun Sep 18 12:25:02 2005 +0000 @@ -3668,9 +3668,18 @@ (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)
--- a/lisp/startup.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/startup.el Sun Sep 18 12:25:02 2005 +0000 @@ -1477,7 +1477,7 @@ (defun display-startup-echo-area-message () (let ((resize-mini-windows t)) - (message (startup-echo-area-message)))) + (message "%s" (startup-echo-area-message)))) (defun display-splash-screen ()
--- a/lisp/strokes.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/strokes.el Sun Sep 18 12:25:02 2005 +0000 @@ -738,7 +738,7 @@ (save-window-excursion (set-window-configuration strokes-window-configuration) (when prompt - (message prompt) + (message "%s" prompt) (setq event (read-event)) (or (strokes-button-press-event-p event) (error "You must draw with the mouse"))) @@ -769,7 +769,7 @@ (bury-buffer)))) ;; Otherwise, don't use strokes buffer and read stroke silently (when prompt - (message prompt) + (message "%s" prompt) (setq event (read-event)) (or (strokes-button-press-event-p event) (error "You must draw with the mouse"))) @@ -799,7 +799,7 @@ (grid-locs nil)) (if prompt (while (not (strokes-button-press-event-p event)) - (message prompt) + (message "%s" prompt) (setq event (read-event)))) (unwind-protect (track-mouse
--- a/lisp/vc.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/vc.el Sun Sep 18 12:25:02 2005 +0000 @@ -2333,10 +2333,10 @@ (format "Updating %s... " (abbreviate-file-name dir)) (format "Retrieving snapshot into %s... " (abbreviate-file-name dir))))) - (message msg) + (message "%s" msg) (vc-call-backend (vc-responsible-backend dir) 'retrieve-snapshot dir name update) - (message (concat msg "done")))) + (message "%s" (concat msg "done")))) (defun vc-default-retrieve-snapshot (backend dir name update) (if (string= name "")
--- a/lisp/wdired.el Sun Sep 18 05:43:17 2005 +0000 +++ b/lisp/wdired.el Sun Sep 18 12:25:02 2005 +0000 @@ -264,7 +264,7 @@ (set-buffer-modified-p nil) (setq buffer-undo-list nil) (run-mode-hooks 'wdired-mode-hook) - (message (substitute-command-keys "Press \\[wdired-finish-edit] when finished \ + (message "%s" (substitute-command-keys "Press \\[wdired-finish-edit] when finished \ or \\[wdired-abort-changes] to abort changes")))