From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: Re: find-library-name fails if file (with no extension) exists. Date: Wed, 22 Nov 2006 13:14:27 +0100 Message-ID: References: <8764d8u085.fsf@pacem.orebokech.com> <873b8c7ecr.fsf@pacem.orebokech.com> <87vel8549g.fsf@pacem.orebokech.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1164199406 19763 80.91.229.2 (22 Nov 2006 12:43:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 22 Nov 2006 12:43:26 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 22 13:43:22 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GmrRH-0001Im-8J for ged-emacs-devel@m.gmane.org; Wed, 22 Nov 2006 13:42:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GmrRG-0003bx-AM for ged-emacs-devel@m.gmane.org; Wed, 22 Nov 2006 07:42:54 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GmrR3-0003bj-Qg for emacs-devel@gnu.org; Wed, 22 Nov 2006 07:42:41 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GmrR3-0003bU-DB for emacs-devel@gnu.org; Wed, 22 Nov 2006 07:42:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GmrR3-0003bQ-6n for emacs-devel@gnu.org; Wed, 22 Nov 2006 07:42:41 -0500 Original-Received: from [64.233.166.176] (helo=py-out-1112.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1Gmr0H-0006w7-Dy for emacs-devel@gnu.org; Wed, 22 Nov 2006 07:15:01 -0500 Original-Received: by py-out-1112.google.com with SMTP id a25so84782pyi for ; Wed, 22 Nov 2006 04:14:27 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nSCcxV/4bO8bCdRyQ8O7GiVKemmKcIyCMHjI6vRzGof1gzRbdYZqoQo24F0j1aGM5P1s8cufAOEI3R2l1g/sGcZJ9Il5eEgr9vT9GK95ckltv3CLZFBaHZjVCt87BtXkXc0UsSr1RYfAC4FOeBthYIM98FDhEwFiteFWkNqd60c= Original-Received: by 10.35.80.20 with SMTP id h20mr844235pyl.1164197667199; Wed, 22 Nov 2006 04:14:27 -0800 (PST) Original-Received: by 10.35.95.18 with HTTP; Wed, 22 Nov 2006 04:14:27 -0800 (PST) Original-To: "Romain Francoise" In-Reply-To: <87vel8549g.fsf@pacem.orebokech.com> Content-Disposition: inline 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:62658 Archived-At: On 11/22/06, Romain Francoise wrote: > As noted in <8764d8u085.fsf@pacem.orebokech.com>: > > Note that the same problem existed before my change with files > ending in ".elc". > > This problem is still there, since I just reverted my change. > > But frankly, I doubt it'll bother anyone. This simple patch does fix the problem. Am I overlooking something obvious? (The patch is really one-line; the change in the regexp is just to remove leftover parentheses.) /L/e/k/t/u Index: lisp/emacs-lisp/find-func.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/find-func.el,v retrieving revision 1.78 diff -u -2 -r1.78 find-func.el --- lisp/emacs-lisp/find-func.el 21 Nov 2006 20:06:53 -0000 1.78 +++ lisp/emacs-lisp/find-func.el 22 Nov 2006 12:05:07 -0000 @@ -150,6 +150,6 @@ ;; If the library is byte-compiled, try to find a source library by ;; the same name. - (if (string-match "\\.el\\(c\\(\\..*\\)?\\)\\'" library) - (setq library (replace-match "" t t library))) + (if (string-match "\\.elc\\(\\..*\\)?\\'" library) + (setq library (replace-match ".el" t t library))) (or (locate-file library (or find-function-source-path load-path)