------------------------------------------------------------
revno: 435
revision-id: monn...@iro.umontreal.ca-20130809215512-o4fqfx1evtbpnrlv
parent: monn...@iro.umontreal.ca-20130809215250-lqyfvls3iqfdbui9
committer: Stefan Monnier <monn...@iro.umontreal.ca>
branch nick: elpa
timestamp: Fri 2013-08-09 17:55:12 -0400
message:
  * packages/eldoc-eval/eldoc-eval.el (eldoc-mode-in-minibuffer): Operate on
  current buffer rather than minibuffer-completion-contents.
modified:
  packages/eldoc-eval/eldoc-eval.el 
eldoceval.el-20110925210758-7hzdscr3i29577xr-2
=== modified file 'packages/eldoc-eval/eldoc-eval.el'
--- a/packages/eldoc-eval/eldoc-eval.el	2013-01-13 20:20:14 +0000
+++ b/packages/eldoc-eval/eldoc-eval.el	2013-08-09 21:55:12 +0000
@@ -149,21 +149,15 @@
 
 (defun eldoc-mode-in-minibuffer ()
   "Show eldoc for current minibuffer input."
-  (let ((buf (with-selected-window (minibuffer-window)
-               (buffer-name))))
+  (let ((buf (window-buffer (minibuffer-window))))
     ;; If this minibuffer have been started with
     ;;`with-eldoc-in-minibuffer' give it eldoc support
     ;; and update mode-line, otherwise do nothing.
     (when (member buf eldoc-active-minibuffers-list)
-      (let* ((str-all (with-current-buffer buf
-                        (minibuffer-completion-contents)))
-             (sym     (when str-all
-                        (with-temp-buffer
-                          (insert str-all)
-                          (goto-char (point-max))
-                          (unless (looking-back ")\\|\"")
-                            (forward-char -1))
-                          (eldoc-current-symbol))))
+      (let* ((sym (with-current-buffer buf
+                    (unless (looking-back ")\\|\"")
+                      (forward-char -1))
+                    (eldoc-current-symbol)))
              (info-fn (eldoc-fnsym-in-current-sexp))
              (doc     (or (eldoc-get-var-docstring sym)
                           (eldoc-get-fnsym-args-string

Reply via email to