all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stefan Monnier <foo@acm.com>" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu>
Subject: Re: Using interactive functions in functions
Date: 06 Dec 2002 18:18:18 -0500	[thread overview]
Message-ID: <5ly972ka85.fsf@rum.cs.yale.edu> (raw)
In-Reply-To: mailman.1039209908.7595.help-gnu-emacs@gnu.org

>>>>> "Bill" == Bill Wohler <wohler@newt.com> writes:
>   Consider the following fragment which runs tags-query-replace on a
>   number of strings:
>     (let ((strings '("foo" "bar")))
>       (while strings
> 	(tags-query-replace (car strings) "newstring")
> 	(setq strings (cdr strings)))
>   However, this loop ends when tags-query-replace returns the first time
>   so "bar" is never replaced.
>   What magic do I need to wrap tags-query-replace in to continue with
>   the rest of the strings?

I'm not sure exactly how tags-query-replace terminates, but if
it ends up short-circuiting the loop above, then it's either through
`signal' or `throw'.  A quick investigation shows it's probably not
`throw', so try something like

         (condition-case err
             (tags-query-replace ...)
           (error
            (if (examine err if you feel like it)
                (do something)
              (do something else))))


-- Stefan

  parent reply	other threads:[~2002-12-06 23:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1039209908.7595.help-gnu-emacs@gnu.org>
2002-12-06 21:49 ` Using interactive functions in functions Michael Slass
2002-12-06 23:18 ` Stefan Monnier <foo@acm.com> [this message]
2002-12-06 21:24 Bill Wohler

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ly972ka85.fsf@rum.cs.yale.edu \
    --to=monnier+gnu.emacs.help/news/@flint.cs.yale.edu \
    /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.
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.