all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* find-library-name perhaps should try .emacs
@ 2008-01-21  3:05 jidanni
  0 siblings, 0 replies; 2+ messages in thread
From: jidanni @ 2008-01-21  3:05 UTC (permalink / raw)
  To: bug-gnu-emacs

  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.

(I use (add-hook 'emacs-lisp-mode-hook '(lambda () (add-hook
 'after-save-hook '(lambda () (byte-compile-file buffer-file-name) )
 nil t))) to make it.) emacs-version "22.1.1"




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: find-library-name perhaps should try .emacs
@ 2008-01-26 18:17 martin rudalics
  0 siblings, 0 replies; 2+ messages in thread
From: martin rudalics @ 2008-01-26 18:17 UTC (permalink / raw)
  To: jidanni; +Cc: Bug-Gnu-Emacs

[-- Attachment #1: Type: text/plain, Size: 482 bytes --]

 >   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).

[-- Attachment #2: find-func.patch --]
[-- Type: text/plain, Size: 1228 bytes --]

*** 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)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-26 18:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-21  3:05 find-library-name perhaps should try .emacs jidanni
  -- strict thread matches above, loose matches on Subject: below --
2008-01-26 18:17 martin rudalics

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.