summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/eldoc.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2013-12-03 23:42:01 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2013-12-03 23:42:01 -0500
commit8497f93806be83e1fc8e496c1134c6e1680fea29 (patch)
treec0b3ecaf39afdf99b4ffc8655041ec522da66c55 /lisp/emacs-lisp/eldoc.el
parentdda619164336f0a4b18c785e28f2ab0d7c6e65d9 (diff)
Fix eldoc-in-minibuffer's modeline update.
* lisp/emacs-lisp/eldoc.el (eldoc-minibuffer-message): Call force-mode-line-update is the proper buffer. Fixes: debbugs:16042
Diffstat (limited to 'lisp/emacs-lisp/eldoc.el')
-rw-r--r--lisp/emacs-lisp/eldoc.el19
1 files changed, 8 insertions, 11 deletions
diff --git a/lisp/emacs-lisp/eldoc.el b/lisp/emacs-lisp/eldoc.el
index 250f93800e..8ec6b41efe 100644
--- a/lisp/emacs-lisp/eldoc.el
+++ b/lisp/emacs-lisp/eldoc.el
@@ -216,6 +216,9 @@ expression point is on."
Otherwise work like `message'."
(if (minibufferp)
(progn
+ (add-hook 'minibuffer-exit-hook
+ (lambda () (setq eldoc-mode-line-string nil))
+ nil t)
(with-current-buffer
(window-buffer
(or (window-in-direction 'above (minibuffer-window))
@@ -226,17 +229,11 @@ Otherwise work like `message'."
(setq mode-line-format
(list "" '(eldoc-mode-line-string
(" " eldoc-mode-line-string " "))
- mode-line-format))))
- (add-hook 'minibuffer-exit-hook
- (lambda () (setq eldoc-mode-line-string nil))
- nil t)
- (cond
- ((null format-string)
- (setq eldoc-mode-line-string nil))
- ((stringp format-string)
- (setq eldoc-mode-line-string
- (apply 'format format-string args))))
- (force-mode-line-update))
+ mode-line-format)))
+ (setq eldoc-mode-line-string
+ (when (stringp format-string)
+ (apply 'format format-string args)))
+ (force-mode-line-update)))
(apply 'message format-string args)))
(defun eldoc-message (&rest args)