unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* Re: find-library-name perhaps should try .emacs
@ 2008-01-26 18:17 martin rudalics
  2008-01-30  2:22 ` emacs -l should put "Loading..." into *Messages* perhaps jidanni
  0 siblings, 1 reply; 3+ 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] 3+ messages in thread

* emacs -l should put "Loading..." into *Messages* perhaps
  2008-01-26 18:17 find-library-name perhaps should try .emacs martin rudalics
@ 2008-01-30  2:22 ` jidanni
  2008-01-31 18:13   ` martin rudalics
  0 siblings, 1 reply; 3+ messages in thread
From: jidanni @ 2008-01-30  2:22 UTC (permalink / raw)
  To: bug-gnu-emacs

mr> Could you please test the attached patch
Works.  By the way I notice
$ k=find-func.el; stat $k;emacs -Q -l $k; stat $k
is needed to confirm -l worked, as C-h e just gives
("emacs" "-Q" "-l" "find-func.el")
Loading subst-jis...done
Loading subst-ksc...done
Loading subst-gb2312...done
Loading subst-big5...done

I.e., no "Loading find-func.el...done" message.




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

* Re: emacs -l should put "Loading..." into *Messages* perhaps
  2008-01-30  2:22 ` emacs -l should put "Loading..." into *Messages* perhaps jidanni
@ 2008-01-31 18:13   ` martin rudalics
  0 siblings, 0 replies; 3+ messages in thread
From: martin rudalics @ 2008-01-31 18:13 UTC (permalink / raw)
  To: jidanni; +Cc: bug-gnu-emacs

> Works.  By the way I notice

Installed in the trunk.

> $ k=find-func.el; stat $k;emacs -Q -l $k; stat $k
> is needed to confirm -l worked, as C-h e just gives
> ("emacs" "-Q" "-l" "find-func.el")
> Loading subst-jis...done
> Loading subst-ksc...done
> Loading subst-gb2312...done
> Loading subst-big5...done
> 
> I.e., no "Loading find-func.el...done" message.

`command-line-1' does (load file nil t) where the last ("t") argument
suppresses the "Loading ..." messages.  The "nil" argument, should take
care of warning you when FILE doesn't exist.






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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-26 18:17 find-library-name perhaps should try .emacs martin rudalics
2008-01-30  2:22 ` emacs -l should put "Loading..." into *Messages* perhaps jidanni
2008-01-31 18:13   ` martin rudalics

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).