From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Should autoloaded functions show LIB.el for its location? Date: Sun, 18 Dec 2005 13:04:22 -0500 Message-ID: <87u0d6l1vb.fsf-monnier+emacs@gnu.org> References: <43A41242.9070709@student.lu.se> <43A4128B.9090203@student.lu.se> <43A53016.1030904@student.lu.se> <871x0apji1.fsf-monnier+emacs@gnu.org> <43A59B15.7000103@student.lu.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1134929376 25501 80.91.229.2 (18 Dec 2005 18:09:36 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 18 Dec 2005 18:09:36 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Dec 18 19:09:34 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Eo2y3-0002WS-0O for ged-emacs-devel@m.gmane.org; Sun, 18 Dec 2005 19:09:07 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eo2yq-0003XO-MX for ged-emacs-devel@m.gmane.org; Sun, 18 Dec 2005 13:09:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Eo2uZ-0000li-Ot for emacs-devel@gnu.org; Sun, 18 Dec 2005 13:05:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Eo2uW-0000ke-3E for emacs-devel@gnu.org; Sun, 18 Dec 2005 13:05:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eo2uV-0000kE-0i for emacs-devel@gnu.org; Sun, 18 Dec 2005 13:05:27 -0500 Original-Received: from [209.226.175.4] (helo=tomts16-srv.bellnexxia.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Eo2xD-0003DT-UQ; Sun, 18 Dec 2005 13:08:16 -0500 Original-Received: from alfajor ([65.92.242.250]) by tomts16-srv.bellnexxia.net (InterMail vM.5.01.06.13 201-253-122-130-113-20050324) with ESMTP id <20051218180422.HJAT9608.tomts16-srv.bellnexxia.net@alfajor>; Sun, 18 Dec 2005 13:04:22 -0500 Original-Received: by alfajor (Postfix, from userid 1000) id 35C9FD7611; Sun, 18 Dec 2005 13:04:22 -0500 (EST) Original-To: Lennart Borgman In-Reply-To: <43A59B15.7000103@student.lu.se> (Lennart Borgman's message of "Sun, 18 Dec 2005 18:23:33 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) X-Originating-IP: [0] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:48006 Archived-At: > + (unless (file-name-extension file-name) > + (let ((ext (file-name-extension > + (locate-library file-name)))) > + (when (equal ext "elc") (setq ext "el")) > + (setq file-name (concat file-name "." ext)))) I suspect that if file-name equals "foo.el", you'll get "foo.el.el" with the above code. Since you want consistency, why not apply to the result of (locate-library file-name) the same code as the one used to turn the filename extracted from load-history into "foo.el"? Stefan