aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2017-08-21 00:26:45 +0300
committerDmitry Gutov2017-08-21 00:42:41 +0300
commit7ef0b5f611c2d56ac2edb8de287190f04c4b8f32 (patch)
tree094293cdc205309e53b263d79e30996b6eb8b6ad
parent9714545675af046d730352eb03dc00e93b6f7d3c (diff)
downloademacs-7ef0b5f611c2d56ac2edb8de287190f04c4b8f32.tar.gz
emacs-7ef0b5f611c2d56ac2edb8de287190f04c4b8f32.zip
Simplify eldoc-message
* lisp/emacs-lisp/eldoc.el (eldoc-message): Simplify. Don't use ARGS because no callers pass them. Discussed in bug#27230.
-rw-r--r--lisp/emacs-lisp/eldoc.el15
1 files changed, 4 insertions, 11 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index bca40ab87da..8c165461988 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -276,19 +276,12 @@ Otherwise work like `message'."
276 (force-mode-line-update))) 276 (force-mode-line-update)))
277 (apply 'message format-string args))) 277 (apply 'message format-string args)))
278 278
279(defun eldoc-message (&optional format-string &rest args) 279(defun eldoc-message (&optional string)
280 "Display FORMAT-STRING formatted with ARGS as an ElDoc message. 280 "Display STRING as an ElDoc message if it's non-nil.
281 281
282Store the message (if any) in `eldoc-last-message', and return it." 282Also store it in `eldoc-last-message' and return that value."
283 (let ((omessage eldoc-last-message)) 283 (let ((omessage eldoc-last-message))
284 (setq eldoc-last-message 284 (setq eldoc-last-message string)
285 (cond ((eq format-string eldoc-last-message) eldoc-last-message)
286 ((null format-string) nil)
287 ;; If only one arg, no formatting to do, so put it in
288 ;; eldoc-last-message so eq test above might succeed on
289 ;; subsequent calls.
290 ((null args) format-string)
291 (t (apply #'format-message format-string args))))
292 ;; In emacs 19.29 and later, and XEmacs 19.13 and later, all messages 285 ;; In emacs 19.29 and later, and XEmacs 19.13 and later, all messages
293 ;; are recorded in a log. Do not put eldoc messages in that log since 286 ;; are recorded in a log. Do not put eldoc messages in that log since
294 ;; they are Legion. 287 ;; they are Legion.