all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* locate-library INTERACTIVE-CALL argument
@ 2003-07-31 17:00 Kevin Rodgers
  2003-08-02  4:47 ` Richard Stallman
       [not found] ` <mailman.11.1059814578.2377.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 6+ messages in thread
From: Kevin Rodgers @ 2003-07-31 17:00 UTC (permalink / raw)


locate-library's optional INTERACTIVE-CALL argument is completely unnecessary
given the interactive-p function, and no calls in the 21.3 source specify it.

Here's a patch (based on the original source, not my previous patch that
provides a default LIBRARY value):

*** emacs-21.3/lisp/help.el.orig	Thu Sep  5 16:47:16 2002
--- emacs-21.3/lisp/help.el	Thu Jul 31 10:36:45 2003
***************
*** 1023,1029 ****
   	(princ (format "%s is not on any key" definition)))))
     nil)

! (defun locate-library (library &optional nosuffix path interactive-call)
     "Show the precise file name of Emacs library LIBRARY.
   This command searches the directories in `load-path' like `M-x load-library'
   to find the file that `M-x load-library RET LIBRARY RET' would load.
--- 1023,1029 ----
   	(princ (format "%s is not on any key" definition)))))
     nil)

! (defun locate-library (library &optional nosuffix path)
     "Show the precise file name of Emacs library LIBRARY.
   This command searches the directories in `load-path' like `M-x load-library'
   to find the file that `M-x load-library RET LIBRARY RET' would load.
***************
*** 1033,1044 ****
   If the optional third arg PATH is specified, that list of directories
   is used instead of `load-path'.

! When called from a program, the file name is normaly returned as a
! string.  When run interactively, the argument INTERACTIVE-CALL is t,
! and the file name is displayed in the echo area."
     (interactive (list (read-string "Locate library: ")
! 		     nil nil
! 		     t))
     (let (result)
       (catch 'answer
         (mapc
--- 1033,1042 ----
   If the optional third arg PATH is specified, that list of directories
   is used instead of `load-path'.

! When called from a program, the file name is normaly returned as a string.
! When run interactively, the file name is displayed in the echo area."
     (interactive (list (read-string "Locate library: ")
! 		     nil nil))
     (let (result)
       (catch 'answer
         (mapc
***************
*** 1068,1074 ****
   		 
	 compressed))
   		basic)))))
          (or path load-path)))
!     (and interactive-call
   	 (if result
   	     (message "Library is file %s" result)
   	   (message "No library %s in search path" library)))
--- 1066,1072 ----
   		 
	 compressed))
   		basic)))))
          (or path load-path)))
!     (and (interactive-p)
   	 (if result
   	     (message "Library is file %s" result)
   	   (message "No library %s in search path" library)))

-- 
Kevin Rodgers

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

end of thread, other threads:[~2003-08-06 13:04 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-31 17:00 locate-library INTERACTIVE-CALL argument Kevin Rodgers
2003-08-02  4:47 ` Richard Stallman
     [not found] ` <mailman.11.1059814578.2377.bug-gnu-emacs@gnu.org>
2003-08-04 16:10   ` Kevin Rodgers
2003-08-05 19:14     ` Richard Stallman
     [not found]     ` <mailman.112.1060111669.29551.bug-gnu-emacs@gnu.org>
2003-08-05 22:35       ` Kevin Rodgers
2003-08-06 13:04         ` Richard Stallman

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.