GNU bug report logs - #6679
locate-library does not provide a default when called interactively

Previous Next

Package: emacs;

Reported by: Kevin Rodgers <kevin.d.rodgers <at> gmail.com>

Date: Tue, 20 Jul 2010 13:54:02 UTC

Severity: wishlist

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Kevin Rodgers <kevin.d.rodgers <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: locate-library does not provide a default when called interactively
Date: Tue, 20 Jul 2010 07:53:32 -0600
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 <at> 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





This bug report was last modified 5 years and 51 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.