bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

locate-library INTERACTIVE-CALL argument


From: Kevin Rodgers
Subject: locate-library INTERACTIVE-CALL argument
Date: Thu, 31 Jul 2003 11:00:33 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]