unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#6679: locate-library does not provide a default when called interactively
@ 2010-07-20 13:53 Kevin Rodgers
  2010-07-21  3:14 ` Kevin Rodgers
  0 siblings, 1 reply; 4+ messages in thread
From: Kevin Rodgers @ 2010-07-20 13:53 UTC (permalink / raw)
  To: 6679

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






^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-03 12:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-20 13:53 bug#6679: locate-library does not provide a default when called interactively Kevin Rodgers
2010-07-21  3:14 ` Kevin Rodgers
2020-03-28 21:59   ` Štěpán Němec
2020-04-03 12:01     ` bug#6652: " Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).