>From f872315286949e9b428ee108c66a8bb5f1131953 Mon Sep 17 00:00:00 2001 From: "Charles A. Roelli" Date: Tue, 19 Sep 2017 22:00:54 +0200 Subject: [PATCH] Keep old calling convention of 'eldoc-message' * lisp/emacs-lisp/eldoc.el (eldoc-message): Keep its old calling convention, as it's used by other packages. See the discussion in Bug#27230, and the previous change 7ef0b5f6 ("Simplify eldoc-message") of 2017-08-21. --- lisp/emacs-lisp/eldoc.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el index cba9a00..7176eb8 100644 --- a/lisp/emacs-lisp/eldoc.el +++ b/lisp/emacs-lisp/eldoc.el @@ -276,12 +276,13 @@ eldoc-minibuffer-message (force-mode-line-update))) (apply 'message format-string args))) -(defun eldoc-message (&optional string) +(defun eldoc-message (&optional format-string &rest args) "Display STRING as an ElDoc message if it's non-nil. Also store it in `eldoc-last-message' and return that value." (let ((omessage eldoc-last-message)) - (setq eldoc-last-message string) + (setq eldoc-last-message + (if args (apply #'format-message format-string args) format-string)) ;; In emacs 19.29 and later, and XEmacs 19.13 and later, all messages ;; are recorded in a log. Do not put eldoc messages in that log since ;; they are Legion. -- 2.9.4