From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "HS" Newsgroups: gmane.emacs.help Subject: Re: Why do I need to eval this? Date: 15 Jan 2007 18:44:41 -0800 Organization: http://groups.google.com Message-ID: <1168915480.893804.99300@38g2000cwa.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1168918824 25341 80.91.229.12 (16 Jan 2007 03:40:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 Jan 2007 03:40:24 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 16 04:40:22 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1H6fBN-0004GY-SW for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Jan 2007 04:40:22 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1H6fBN-0007Oy-T1 for geh-help-gnu-emacs@m.gmane.org; Mon, 15 Jan 2007 22:40:21 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!38g2000cwa.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Original-NNTP-Posting-Host: 201.90.155.62 Original-X-Trace: posting.google.com 1168915487 2257 127.0.0.1 (16 Jan 2007 02:44:47 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 16 Jan 2007 02:44:47 +0000 (UTC) In-Reply-To: User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 38g2000cwa.googlegroups.com; posting-host=201.90.155.62; posting-account=pG57fA0AAADtQ-4h1MyvjXjZpSNZC0zj Original-Xref: shelby.stanford.edu gnu.emacs.help:144746 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:40350 Archived-At: Interessante a sua id=E9ia, mas acho que n=E3o consegui fazer funcionar. Agora me diz se voc=EA sabe fazer isto: Eu queria que todas palavras terminando em `ao` fossem substituidas por `=E3o` assim eu poderia escrever chao, nao, coracao e elas seriam arrumadas na hora. Normalmente eu resolvo isto com as abbrevs, mas neste caso =E9 uma regex, ent=E3o nao sei. Voc=EA tem alguma id=E9ia ? Sds Hugo Arnaldo Mandel escreveu: > 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 t= ilda. > Argument DAQUI starts search from point." > (interactive "P") > (let ((start (if daqui (point) (point-min)))) > (save-excursion > (query-replace-regexp-eval "[=E0=F2=C0=D2]" > '(cdr (assoc (match-string-no-properties= 0) > '(("=E0" . "=E3") ("=F2" . = "=F5") > ("=C0" . "=C3") ("=D2" . = "=D5")))) > 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 >=20 > --=20 > Arnaldo Mandel =20 > am@ime.usp.br