summaryrefslogtreecommitdiff
path: root/lisp
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
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')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/emacs-lisp/eldoc.el19
2 files changed, 13 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b18de86df2..18b404f536 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-04 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/eldoc.el (eldoc-minibuffer-message):
+ Call force-mode-line-update is the proper buffer (bug#16042).
+
2013-12-04 Dmitry Gutov <dgutov@yandex.ru>
* vc/log-edit.el (log-edit-add-new-comment): Rename to
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)