From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.bugs Subject: locate-library INTERACTIVE-CALL argument Date: Thu, 31 Jul 2003 11:00:33 -0600 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3F294B31.30800@yahoo.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1059671258 25256 80.91.224.249 (31 Jul 2003 17:07:38 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 31 Jul 2003 17:07:38 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 31 19:07:34 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19iGtJ-0006WM-00 for ; Thu, 31 Jul 2003 19:07:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19iGtL-0005uo-HT for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Jul 2003 13:07:03 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19iGsS-00059j-D7 for bug-gnu-emacs@prep.ai.mit.edu; Thu, 31 Jul 2003 13:06:08 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19iGrQ-0004X1-Tp for bug-gnu-emacs@prep.ai.mit.edu; Thu, 31 Jul 2003 13:05:05 -0400 Original-Received: from horus.isnic.is ([193.4.58.12]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19iGn7-0002iO-Qf for bug-gnu-emacs@prep.ai.mit.edu; Thu, 31 Jul 2003 13:00:37 -0400 Original-Received: from mail.fu-berlin.de (root@mail.fu-berlin.de [160.45.11.165]) by horus.isnic.is (8.12.9/8.12.9/isnic) with ESMTP id h6VH0YgO000684 for ; Thu, 31 Jul 2003 17:00:35 GMT (envelope-from ihs_4664@yahoo.com) Original-Received: by mail.fu-berlin.de (Smail3.2.0.98) from Curry.ZEDAT.FU-Berlin.DE (160.45.10.36) with esmtp id ; Thu, 31 Jul 2003 19:00:33 +0200 (MEST) Original-Received: by Curry.ZEDAT.FU-Berlin.DE (Smail3.2.0.98) from news.fu-berlin.de with bsmtp id ; Thu, 31 Jul 2003 19:00:33 +0200 (MEST) Original-To: gnu-emacs-bug@moderators.isc.org Original-Path: 170.207.51.80!not-for-mail Original-Newsgroups: gnu.emacs.bug Original-Lines: 73 X-Orig-NNTP-Posting-Host: 170.207.51.80 X-Orig-X-Trace: news.uni-berlin.de 1059670832 23840156 170.207.51.80 (16 [82742]) User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5465 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5465 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