Subject: Re: bug#27230: eldoc doc

From: [email-masked] (Charles A. Roelli)
Date: Wed, 20 Sep 2017 20:12:38 +0200

Sorry, I had forgotten to update the docstring.  Updated patch
attached.

>From 576fced66c8960a91a1fcfd51efc700413a810b4 Mon Sep 17 00:00:00 2001
From: "Charles A. Roelli" <[email-masked]>
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 | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index cba9a00..1440fb1 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -276,12 +276,16 @@ eldoc-minibuffer-message
           (force-mode-line-update)))
     (apply 'message format-string args)))
 
-(defun eldoc-message (&optional string)
-  "Display STRING as an ElDoc message if it's non-nil.
+(defun eldoc-message (&optional format-string &rest args)
+  "Display FORMAT-STRING as an ElDoc message if it's non-nil.
+
+If ARGS are given, FORMAT-STRING and ARGS are first passed to
+`format-message'.
 
 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