* uniquify & advice
@ 2003-06-06 4:16 Miles Bader
2003-06-06 15:31 ` Stefan Monnier
2003-06-07 10:22 ` Richard Stallman
0 siblings, 2 replies; 4+ messages in thread
From: Miles Bader @ 2003-06-06 4:16 UTC (permalink / raw)
uniquify.el still uses `defadvice' for some of its functionality;
shouldn't we just add appropriate code (or hooks) to the underlying
functions instead?
Here's what it uses:
(defadvice rename-buffer (after rename-buffer-uniquify activate)
"Uniquify buffer names with parts of directory name."
(defadvice create-file-buffer (after create-file-buffer-uniquify activate)
"Uniquify buffer names with parts of directory name."
-Miles
--
"I distrust a research person who is always obviously busy on a task."
--Robert Frosch, VP, GM Research
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: uniquify & advice
2003-06-06 4:16 uniquify & advice Miles Bader
@ 2003-06-06 15:31 ` Stefan Monnier
2003-06-08 1:08 ` Richard Stallman
2003-06-07 10:22 ` Richard Stallman
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2003-06-06 15:31 UTC (permalink / raw)
Cc: emacs-devel
> uniquify.el still uses `defadvice' for some of its functionality;
> shouldn't we just add appropriate code (or hooks) to the underlying
> functions instead?
>
> Here's what it uses:
>
> (defadvice rename-buffer (after rename-buffer-uniquify activate)
> "Uniquify buffer names with parts of directory name."
>
> (defadvice create-file-buffer (after create-file-buffer-uniquify activate)
> "Uniquify buffer names with parts of directory name."
Yes. I remember looking at it in the past and ended up not doing it
because I couldn't come up with a good hook.
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: uniquify & advice
2003-06-06 4:16 uniquify & advice Miles Bader
2003-06-06 15:31 ` Stefan Monnier
@ 2003-06-07 10:22 ` Richard Stallman
1 sibling, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2003-06-07 10:22 UTC (permalink / raw)
Cc: emacs-devel
uniquify.el still uses `defadvice' for some of its functionality;
shouldn't we just add appropriate code (or hooks) to the underlying
functions instead?
Yes, that would be a good thing to do.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: uniquify & advice
2003-06-06 15:31 ` Stefan Monnier
@ 2003-06-08 1:08 ` Richard Stallman
0 siblings, 0 replies; 4+ messages in thread
From: Richard Stallman @ 2003-06-08 1:08 UTC (permalink / raw)
Cc: emacs-devel
> (defadvice rename-buffer (after rename-buffer-uniquify activate)
> "Uniquify buffer names with parts of directory name."
>
> (defadvice create-file-buffer (after create-file-buffer-uniquify activate)
> "Uniquify buffer names with parts of directory name."
Yes. I remember looking at it in the past and ended up not doing it
because I couldn't come up with a good hook.
For create-file-buffer, I think it would be fine to put the code
directly into the definition, no hook at all. For rename-buffer.
calling a specific Lisp function is fine. There's no reason for
this code to try to be "general"; in fact, it is easier to understand
if it is specific.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-06-08 1:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-06 4:16 uniquify & advice Miles Bader
2003-06-06 15:31 ` Stefan Monnier
2003-06-08 1:08 ` Richard Stallman
2003-06-07 10:22 ` Richard Stallman
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).