From: Arnaldo Mandel <am@ime.usp.br>
Subject: Why do I need to eval this?
Date: Mon, 15 Jan 2007 17:15:22 -0200 [thread overview]
Message-ID: <17835.53962.828333.510421@galena.ime.usp.br> (raw)
Here is a short utility command that is useful to those writing
Portuguese on US keyboards:
(defun crases (daqui)
"Offers all grave-accented chars to be corrected to the corresponding tilda.
Argument DAQUI starts search from point."
(interactive "P")
(let ((start (if daqui (point) (point-min))))
(save-excursion
(query-replace-regexp-eval "[àòÀÒ]"
'(cdr (assoc (match-string-no-properties 0)
'(("à" . "ã") ("ò" . "õ")
("À" . "Ã") ("Ò" . "Õ"))))
nil start (point-max)))))
If I either byte-compile it or load it uncompiled from a file, it
doesn't work: it finds the characters that have to be replaced,
but replaces with nil. On the other hand, if I eval this expression
(C-x C-e), it works perfectly. The behavior is the same in emacs 21
and 22.
Any idea on what is going on?
am
--
Arnaldo Mandel
am@ime.usp.br
next reply other threads:[~2007-01-15 19:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-15 19:15 Arnaldo Mandel [this message]
2007-01-15 22:10 ` Why do I need to eval this? Reiner Steib
2007-01-16 12:00 ` Arnaldo Mandel
[not found] ` <mailman.3142.1168948826.2155.help-gnu-emacs@gnu.org>
2007-01-18 4:55 ` B. T. Raven
2007-01-19 12:46 ` Arnaldo Mandel
[not found] ` <mailman.3308.1169210776.2155.help-gnu-emacs@gnu.org>
2007-01-19 14:22 ` B. T. Raven
[not found] <mailman.3105.1168892132.2155.help-gnu-emacs@gnu.org>
2007-01-16 2:44 ` HS
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=17835.53962.828333.510421@galena.ime.usp.br \
--to=am@ime.usp.br \
/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).