diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2017-08-21 00:26:45 +0300 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2017-08-21 00:42:41 +0300 |
commit | 7ef0b5f611c2d56ac2edb8de287190f04c4b8f32 (patch) | |
tree | 094293cdc205309e53b263d79e30996b6eb8b6ad /lisp/emacs-lisp/eldoc.el | |
parent | 9714545675af046d730352eb03dc00e93b6f7d3c (diff) | |
download | emacs-7ef0b5f611c2d56ac2edb8de287190f04c4b8f32.tar.gz emacs-7ef0b5f611c2d56ac2edb8de287190f04c4b8f32.tar.bz2 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.
Diffstat (limited to 'lisp/emacs-lisp/eldoc.el')
-rw-r--r-- | lisp/emacs-lisp/eldoc.el | 15 |
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'." (force-mode-line-update))) (apply 'message format-string args))) -(defun eldoc-message (&optional format-string &rest args) - "Display FORMAT-STRING formatted with ARGS as an ElDoc message. +(defun eldoc-message (&optional string) + "Display STRING as an ElDoc message if it's non-nil. -Store the message (if any) in `eldoc-last-message', and return it." +Also store it in `eldoc-last-message' and return that value." (let ((omessage eldoc-last-message)) - (setq eldoc-last-message - (cond ((eq format-string eldoc-last-message) eldoc-last-message) - ((null format-string) nil) - ;; If only one arg, no formatting to do, so put it in - ;; eldoc-last-message so eq test above might succeed on - ;; subsequent calls. - ((null args) format-string) - (t (apply #'format-message format-string args)))) + (setq eldoc-last-message 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. |