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: M-x locate-library doesn't provide default Date: Thu, 31 Jul 2003 09:36:27 -0600 Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3F29377B.6080903@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 1059666185 28413 80.91.224.249 (31 Jul 2003 15:43:05 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 31 Jul 2003 15:43:05 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 31 17:43:02 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 19iFXh-0007AK-00 for ; Thu, 31 Jul 2003 17:40:37 +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 19iFWb-0000ZV-PU for geb-bug-gnu-emacs@m.gmane.org; Thu, 31 Jul 2003 11:39:29 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19iFVZ-0000CE-Md for bug-gnu-emacs@prep.ai.mit.edu; Thu, 31 Jul 2003 11:38:25 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19iFTu-00082N-2Q for bug-gnu-emacs@prep.ai.mit.edu; Thu, 31 Jul 2003 11:36:52 -0400 Original-Received: from horus.isnic.is ([193.4.58.12]) by monty-python.gnu.org with esmtp (Exim 4.20) id 19iFTf-0007ZL-An for bug-gnu-emacs@prep.ai.mit.edu; Thu, 31 Jul 2003 11:36:27 -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 h6VFaLgO096910 for ; Thu, 31 Jul 2003 15:36:22 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 17:36:21 +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 17:36:18 +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: 37 X-Orig-NNTP-Posting-Host: 170.207.51.80 X-Orig-X-Trace: news.uni-berlin.de 1059665778 24278470 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:5462 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5462 If point is near "foo" in an expression like (load-library "foo") or (require 'foo) then `M-x locate-library' ought to provide it as the default. Here's a patch: *** emacs-21.3/lisp/help.el.orig Thu Sep 5 16:47:16 2002 --- emacs-21.3/lisp/help.el Thu Jul 31 09:35:03 2003 *************** *** 1036,1044 **** 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 --- 1036,1046 ---- 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 ! (let ((lib (current-word))) ! (list (read-string (format "Locate library (default %s): " lib) ! nil nil lib) ! nil nil t))) (let (result) (catch 'answer (mapc -- Kevin Rodgers