From 49784222783b2c3f1831c3640057d3d1402dbade Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sun, 19 Sep 2010 14:22:23 +0200 Subject: [PATCH] Pass proper format strings to gnus-message. 2010-09-19 Lars Magne Ingebrigtsen * gnus-art.el (gnus-article-describe-briefly): Fix up typo in last patch, found by Knut Anders Hatlen. 2010-09-19 Andreas Schwab * gnus-agent.el (gnus-agent-batch-confirmation) (gnus-agent-expire-group, gnus-agent-expire): Pass proper format string to gnus-message. * gnus-art.el (gnus-article-describe-briefly): Likewise. * gnus-group.el (gnus-group-list-groups, gnus-group-describe-group) (gnus-group-edit-global-kill, gnus-group-describe-briefly): Likewise. * gnus-int.el (gnus-open-server): Likewise. * gnus-score.el (gnus-score-edit-current-scores, gnus-score-edit-file) (gnus-score-check-syntax): Likewise. * gnus-srvr.el (gnus-browse-describe-briefly): Likewise. * gnus-start.el (gnus-read-active-file-1, gnus-read-active-file-1): Likewise. * gnus-sum.el (gnus-summary-describe-briefly): Likewise. --- lisp/ChangeLog | 21 +++++++++++++++++++++ lisp/gnus-agent.el | 6 +++--- lisp/gnus-art.el | 2 +- lisp/gnus-group.el | 14 ++++++-------- lisp/gnus-int.el | 5 ++--- lisp/gnus-score.el | 10 +++++----- lisp/gnus-srvr.el | 2 +- lisp/gnus-start.el | 4 ++-- lisp/gnus-sum.el | 2 +- 9 files changed, 42 insertions(+), 24 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 05edd0bc1..5d4505504 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,24 @@ +2010-09-19 Lars Magne Ingebrigtsen + + * gnus-art.el (gnus-article-describe-briefly): Fix up typo in last + patch, found by Knut Anders Hatlen. + +2010-09-19 Andreas Schwab + + * gnus-agent.el (gnus-agent-batch-confirmation) + (gnus-agent-expire-group, gnus-agent-expire): Pass proper format string + to gnus-message. + * gnus-art.el (gnus-article-describe-briefly): Likewise. + * gnus-group.el (gnus-group-list-groups, gnus-group-describe-group) + (gnus-group-edit-global-kill, gnus-group-describe-briefly): Likewise. + * gnus-int.el (gnus-open-server): Likewise. + * gnus-score.el (gnus-score-edit-current-scores, gnus-score-edit-file) + (gnus-score-check-syntax): Likewise. + * gnus-srvr.el (gnus-browse-describe-briefly): Likewise. + * gnus-start.el (gnus-read-active-file-1, gnus-read-active-file-1): + Likewise. + * gnus-sum.el (gnus-summary-describe-briefly): Likewise. + 2010-09-19 Lars Magne Ingebrigtsen * gnus-html.el (gnus-html-prefetch-images): Fix up the url-retrieve diff --git a/lisp/gnus-agent.el b/lisp/gnus-agent.el index 781ea3b1a..2a586e627 100644 --- a/lisp/gnus-agent.el +++ b/lisp/gnus-agent.el @@ -2377,7 +2377,7 @@ modified) original contents, they are first saved to their own file." (defun gnus-agent-batch-confirmation (msg) "Show error message and return t." - (gnus-message 1 msg) + (gnus-message 1 "%s" msg) t) ;;;###autoload @@ -3123,7 +3123,7 @@ FORCE is equivalent to setting the expiration predicates to true." group overview (gnus-gethash-safe group orig) articles force)))) (kill-buffer overview)))) - (gnus-message 4 (gnus-agent-expire-done-message))))) + (gnus-message 4 "%s" (gnus-agent-expire-done-message))))) (defun gnus-agent-expire-group-1 (group overview active articles force) ;; Internal function - requires caller to have set @@ -3548,7 +3548,7 @@ articles in every agentized group? ")) expiring-group overview active articles force)))))))) (kill-buffer overview)) (gnus-agent-expire-unagentized-dirs) - (gnus-message 4 (gnus-agent-expire-done-message)))))) + (gnus-message 4 "%s" (gnus-agent-expire-done-message)))))) (defun gnus-agent-expire-done-message () (if (and (> gnus-verbose 4) diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index bfdb9bd6b..7e51abb56 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -6406,7 +6406,7 @@ not have a face in `gnus-article-boring-faces'." (defun gnus-article-describe-briefly () "Describe article mode commands briefly." (interactive) - (gnus-message 6 (substitute-command-keys "\\\\[gnus-article-goto-next-page]:Next page \\[gnus-article-goto-prev-page]:Prev page \\[gnus-article-show-summary]:Show summary \\[gnus-info-find-node]:Run Info \\[gnus-article-describe-briefly]:This help"))) + (gnus-message 6 "%s" (substitute-command-keys "\\\\[gnus-article-goto-next-page]:Next page \\[gnus-article-goto-prev-page]:Prev page \\[gnus-article-show-summary]:Show summary \\[gnus-info-find-node]:Run Info \\[gnus-article-describe-briefly]:This help"))) (defun gnus-article-check-buffer () "Beep if not in an article buffer." diff --git a/lisp/gnus-group.el b/lisp/gnus-group.el index 5cc4ef68b..fa6ae5188 100644 --- a/lisp/gnus-group.el +++ b/lisp/gnus-group.el @@ -1273,7 +1273,7 @@ Also see the `gnus-group-use-permanent-levels' variable." (zerop number)) (zerop (buffer-size))) ;; No groups in the buffer. - (gnus-message 5 gnus-no-groups-message)) + (gnus-message 5 "%s" gnus-no-groups-message)) ;; We have some groups displayed. (goto-char (point-max)) (when (or (not gnus-group-goto-next-group-function) @@ -4136,7 +4136,7 @@ If given a prefix argument, prompt for a group." (gnus-gethash mname gnus-description-hashtb)) (setq desc (gnus-group-get-description group)) (gnus-read-descriptions-file method)) - (gnus-message 1 + (gnus-message 1 "%s" (or desc (gnus-gethash group gnus-description-hashtb) "No description available"))))) @@ -4297,11 +4297,9 @@ If GROUP, edit that local kill file instead." (interactive "P") (setq gnus-current-kill-article article) (gnus-kill-file-edit-file group) - (gnus-message - 6 - (substitute-command-keys - (format "Editing a %s kill file (Type \\[gnus-kill-file-exit] to exit)" - (if group "local" "global"))))) + (gnus-message 6 "Editing a %s kill file (Type %s to exit)" + (if group "local" "global") + (substitute-command-keys "\\[gnus-kill-file-exit]"))) (defun gnus-group-edit-local-kill (article group) "Edit a local kill file." @@ -4392,7 +4390,7 @@ The hook `gnus-exit-gnus-hook' is called before actually exiting." (defun gnus-group-describe-briefly () "Give a one line description of the group mode commands." (interactive) - (gnus-message 7 (substitute-command-keys "\\\\[gnus-group-read-group]:Select \\[gnus-group-next-unread-group]:Forward \\[gnus-group-prev-unread-group]:Backward \\[gnus-group-exit]:Exit \\[gnus-info-find-node]:Run Info \\[gnus-group-describe-briefly]:This help"))) + (gnus-message 7 "%s" (substitute-command-keys "\\\\[gnus-group-read-group]:Select \\[gnus-group-next-unread-group]:Forward \\[gnus-group-prev-unread-group]:Backward \\[gnus-group-exit]:Exit \\[gnus-info-find-node]:Run Info \\[gnus-group-describe-briefly]:This help"))) (defun gnus-group-browse-foreign-server (method) "Browse a foreign news server. diff --git a/lisp/gnus-int.el b/lisp/gnus-int.el index bcfc015c2..f245907ed 100644 --- a/lisp/gnus-int.el +++ b/lisp/gnus-int.el @@ -245,9 +245,8 @@ If it is down, start it up (again)." (nth 1 gnus-command-method) (nthcdr 2 gnus-command-method)) (error - (gnus-message 1 (format - "Unable to open server %s due to: %s" - server (error-message-string err))) + (gnus-message 1 "Unable to open server %s due to: %s" + server (error-message-string err)) nil) (quit (gnus-message 1 "Quit trying to open server %s" server) diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index 5cd60ddaa..03ff30d2b 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -1114,8 +1114,8 @@ EXTRA is the possible non-standard header." (make-local-variable 'gnus-prev-winconf) (setq gnus-prev-winconf winconf)) (gnus-message - 4 (substitute-command-keys - "\\\\[gnus-score-edit-exit] to save edits")))) + 4 "%s" (substitute-command-keys + "\\\\[gnus-score-edit-exit] to save edits")))) (defun gnus-score-edit-all-score () "Edit the all.SCORE file." @@ -1142,8 +1142,8 @@ EXTRA is the possible non-standard header." (make-local-variable 'gnus-prev-winconf) (setq gnus-prev-winconf winconf)) (gnus-message - 4 (substitute-command-keys - "\\\\[gnus-score-edit-exit] to save edits"))) + 4 "%s" (substitute-command-keys + "\\\\[gnus-score-edit-exit] to save edits"))) (defun gnus-score-edit-file-at-point (&optional format) "Edit score file at point in Score Trace buffers. @@ -1391,7 +1391,7 @@ If FORMAT, also format the current score file." (if err (progn (ding) - (gnus-message 3 err) + (gnus-message 3 "%s" err) (sit-for 2) nil) alist))))) diff --git a/lisp/gnus-srvr.el b/lisp/gnus-srvr.el index dd5e51885..2966212de 100644 --- a/lisp/gnus-srvr.el +++ b/lisp/gnus-srvr.el @@ -976,7 +976,7 @@ If NUMBER, fetch this number of articles." (defun gnus-browse-describe-briefly () "Give a one line description of the group mode commands." (interactive) - (gnus-message 6 + (gnus-message 6 "%s" (substitute-command-keys "\\\\[gnus-group-next-group]:Forward \\[gnus-group-prev-group]:Backward \\[gnus-browse-exit]:Exit \\[gnus-info-find-node]:Run Info \\[gnus-browse-describe-briefly]:This help"))) (defun gnus-server-regenerate-server () diff --git a/lisp/gnus-start.el b/lisp/gnus-start.el index 18553071b..d78a2f8d9 100644 --- a/lisp/gnus-start.el +++ b/lisp/gnus-start.el @@ -2054,7 +2054,7 @@ If SCAN, request a scan of that group as well." (if (and where (not (zerop (length where)))) (concat " from " where) "") (car method))) - (gnus-message 5 mesg) + (gnus-message 5 "%s" mesg) (when (gnus-check-server method) ;; Request that the backend scan its incoming messages. (when (and (or (and gnus-agent @@ -2089,7 +2089,7 @@ If SCAN, request a scan of that group as well." (unless (equal method gnus-message-archive-method) (gnus-error 1 "Cannot read active file from %s server" (car method))) - (gnus-message 5 mesg) + (gnus-message 5 "%s" mesg) (gnus-active-to-gnus-format method gnus-active-hashtb nil t) ;; We mark this active file as read. (push method gnus-have-read-active-file) diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 3c3a05905..e09c3a51a 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -7330,7 +7330,7 @@ in." (defun gnus-summary-describe-briefly () "Describe summary mode commands briefly." (interactive) - (gnus-message 6 (substitute-command-keys "\\\\[gnus-summary-next-page]:Select \\[gnus-summary-next-unread-article]:Forward \\[gnus-summary-prev-unread-article]:Backward \\[gnus-summary-exit]:Exit \\[gnus-info-find-node]:Run Info \\[gnus-summary-describe-briefly]:This help"))) + (gnus-message 6 "%s" (substitute-command-keys "\\\\[gnus-summary-next-page]:Select \\[gnus-summary-next-unread-article]:Forward \\[gnus-summary-prev-unread-article]:Backward \\[gnus-summary-exit]:Exit \\[gnus-info-find-node]:Run Info \\[gnus-summary-describe-briefly]:This help"))) ;; Walking around group mode buffer from summary mode. -- 2.25.1