unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Glenn Morris <rgm@gnu.org>
Cc: Marcin Kasperski <Marcin.Kasperski@softax.com.pl>, 15836@debbugs.gnu.org
Subject: bug#15836: 24.3; query-replace-regexp does not detect incorrect usage of \#
Date: Fri, 08 Nov 2013 18:15:16 -0500	[thread overview]
Message-ID: <jwv4n7m337f.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <55iow2iqcd.fsf@fencepost.gnu.org> (Glenn Morris's message of "Fri, 08 Nov 2013 15:35:46 -0500")

> Hmm, perhaps replace-eval-replacement could temporarily bind
> the function definition of replace-count to some informative error
> message ("\# used in function context")?

Sorry, I don't like this idea.  Much too specific to the particular way
the user screwed up.

I guess we could byte-compile the expression, which would give the user
actual warnings about his code before running it, but I'm afraid this
medicine would be worse than the disease.

Another approach would be to refrain from substituting \# and
instead to let-bind it during the evaluation.


        Stefan





  reply	other threads:[~2013-11-08 23:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-08 10:24 bug#15836: 24.3; query-replace-regexp does not detect incorrect usage of \# Marcin Kasperski
2013-11-08 20:27 ` Glenn Morris
2013-11-08 20:35   ` Glenn Morris
2013-11-08 23:15     ` Stefan Monnier [this message]
2013-11-13 20:34       ` Marcin Kasperski
2013-11-13 20:50         ` Glenn Morris

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=jwv4n7m337f.fsf-monnier+emacsbugs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=15836@debbugs.gnu.org \
    --cc=Marcin.Kasperski@softax.com.pl \
    --cc=rgm@gnu.org \
    /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 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).