all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Why do I need to eval this?
@ 2007-01-15 19:15 Arnaldo Mandel
  2007-01-15 22:10 ` Reiner Steib
  0 siblings, 1 reply; 7+ messages in thread
From: Arnaldo Mandel @ 2007-01-15 19:15 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <mailman.3105.1168892132.2155.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2007-01-19 14:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-15 19:15 Why do I need to eval this? Arnaldo Mandel
2007-01-15 22:10 ` 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

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.