From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: How to use defadvice without infinite loop
Date: Mon, 29 Sep 2003 15:08:45 GMT [thread overview]
Message-ID: <jwvu16vljk2.fsf-monnier+gnu.emacs.help@vor.iro.umontreal.ca> (raw)
In-Reply-To: 87y8w8199h.fsf@juliva.com
> (defadvice save-some-buffers(before my-save-some-buffers activate)
> "Ask to save buffers."
> (interactive)
> ;; Prevent infinite loop
> (ad-deactivate-regexp "my-save-some-buffers")
> (save-some-buffers nil 'my-always-save)
> (ad-activate-regexp "my-save-some-buffers"))
You can try an `around' advice instead of a `before' advice, and then put
two `ad-do-it' in there, modifying the args in between the two calls.
Pretty ugly as well. Maybe the doc suggests a cleaner way to do what
you want.
Stefan
prev parent reply other threads:[~2003-09-29 15:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-27 15:09 How to use defadvice without infinite loop Ivan Kanis
2003-09-27 20:22 ` Robert Marshall
2003-09-28 5:14 ` Klaus Berndl
2003-09-29 4:58 ` Ivan Kanis
2003-09-29 15:08 ` Stefan Monnier [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvu16vljk2.fsf-monnier+gnu.emacs.help@vor.iro.umontreal.ca \
--to=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).