all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: minibuffer-completion-contents obsolete
Date: Sun, 21 Apr 2013 00:03:56 -0400	[thread overview]
Message-ID: <jwvfvyko7mn.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <jwvr4i4o9no.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Sat, 20 Apr 2013 23:28:53 -0400")

>> I use it in helm and eldoc-eval.
> That says where you use it, but not what you use it for.

E.g. why not use the patch below?


        Stefan


=== modified file 'packages/eldoc-eval/eldoc-eval.el'
--- packages/eldoc-eval/eldoc-eval.el	2013-01-13 20:20:14 +0000
+++ packages/eldoc-eval/eldoc-eval.el	2013-04-21 04:02:47 +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))
+      (let* ((sym (with-current-buffer buf
                           (unless (looking-back ")\\|\"")
                             (forward-char -1))
-                          (eldoc-current-symbol))))
+                    (eldoc-current-symbol)))
              (info-fn (eldoc-fnsym-in-current-sexp))
              (doc     (or (eldoc-get-var-docstring sym)
                           (eldoc-get-fnsym-args-string




  reply	other threads:[~2013-04-21  4:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-20  7:49 minibuffer-completion-contents obsolete Thierry Volpiatto
2013-04-20 14:38 ` Stefan Monnier
2013-04-20 15:21   ` Thierry Volpiatto
2013-04-21  3:28     ` Stefan Monnier
2013-04-21  4:03       ` Stefan Monnier [this message]
2013-04-21  5:31         ` Thierry Volpiatto
2013-04-21  6:07         ` Thierry Volpiatto
2013-04-21  5:14       ` Thierry Volpiatto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvfvyko7mn.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=thierry.volpiatto@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.