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

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

Re: find-library-name perhaps should try .emacs


From: martin rudalics
Subject: Re: find-library-name perhaps should try .emacs
Date: Sat, 26 Jan 2008 19:17:39 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

>   C-h k runs the command describe-key
> which showed me
>   C-x t runs the command jidanni-tidy-buffer
>   which is an interactive compiled Lisp function in 
`/home/jidanni/.emacs.elc'.
> But when I clicked that filename, I got
>   find-library-name: Can't find library /home/jidanni/.emacs.el
> Why of course. It's in .emacs, not .emacs.el.

Could you please test the attached patch (it should work regardless of
whether your dot-emacs file is called .emacs or .emacs.el).
*** emacs-lisp/find-func.el.~1.87.~     Fri Jan 25 18:39:20 2008
--- emacs-lisp/find-func.el     Sat Jan 26 19:14:00 2008
***************
*** 239,246 ****
      (setq symbol (get symbol 'definition-name)))
    (if (string-match "\\`src/\\(.*\\.c\\)\\'" library)
        (find-function-C-source symbol (match-string 1 library) type)
!     (if (string-match "\\.el\\(c\\)\\'" library)
!       (setq library (substring library 0 (match-beginning 1))))
      (let* ((filename (find-library-name library))
           (regexp-symbol (cdr (assq type find-function-regexp-alist))))
        (with-current-buffer (find-file-noselect filename)
--- 239,248 ----
      (setq symbol (get symbol 'definition-name)))
    (if (string-match "\\`src/\\(.*\\.c\\)\\'" library)
        (find-function-C-source symbol (match-string 1 library) type)
!     (when (string-match "\\.el\\(c\\)\\'" library)
!       (setq library (substring library 0 (match-beginning 1))))
!     (when (string-match "\\.emacs\\(.el\\)" library)
!       (setq library (substring library 0 (match-beginning 1))))
      (let* ((filename (find-library-name library))
           (regexp-symbol (cdr (assq type find-function-regexp-alist))))
        (with-current-buffer (find-file-noselect filename)

reply via email to

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