all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kevin Rodgers <kevin.d.rodgers@gmail.com>
To: 6679@debbugs.gnu.org
Subject: bug#6679: locate-library does not provide a default when called interactively
Date: Tue, 20 Jul 2010 07:53:32 -0600	[thread overview]
Message-ID: <i249ol$o2q$1@dough.gmane.org> (raw)

See bug 6652 for a use case.

Here's a patch -- should the default be included in the prompt, or
is the user expected to know to try M-n?

2010-07-20  Kevin Rodgers  <kevin.d.rodgers@gmail.com>

	* subr.el (locate-library):  Provide a default LIBRARY
	when called interactively.


*** emacs-23.2/lisp/subr.el~	Sat Apr  3 16:26:12 2010
--- emacs-23.2/lisp/subr.el	Tue Jul 20 07:38:58 2010
***************
*** 1583,1589 ****
     (interactive (list (completing-read "Locate library: "
   				      (apply-partially
                                          'locate-file-completion-table
!                                        load-path (get-load-suffixes)))
   		     nil nil
   		     t))
     (let ((file (locate-file library
--- 1583,1594 ----
     (interactive (list (completing-read "Locate library: "
   				      (apply-partially
                                          'locate-file-completion-table
!                                        load-path (get-load-suffixes))
! 				      nil nil nil nil
! 				      ;; discard text props from default
! 				      ;; to avoid side-effects (visiting file):
! 				      (substring-no-properties
! 				       (thing-at-point 'filename)))
   		     nil nil
   		     t))
     (let ((file (locate-file library


-- 
Kevin Rodgers
Denver, Colorado, USA






             reply	other threads:[~2010-07-20 13:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-20 13:53 Kevin Rodgers [this message]
2010-07-21  3:14 ` bug#6679: locate-library does not provide a default when called interactively Kevin Rodgers
2020-03-28 21:59   ` Štěpán Němec
2020-04-03 12:01     ` bug#6652: " Eli Zaretskii

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='i249ol$o2q$1@dough.gmane.org' \
    --to=kevin.d.rodgers@gmail.com \
    --cc=6679@debbugs.gnu.org \
    /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.