From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ilya Zakharevich Newsgroups: gmane.emacs.help Subject: Re: HOWTO: Ispell multiple regions? Date: Tue, 18 Oct 2005 19:53:57 +0000 (UTC) Organization: U.C. Berkeley Math. Department. Message-ID: References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1129665454 29114 80.91.229.2 (18 Oct 2005 19:57:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 18 Oct 2005 19:57:34 +0000 (UTC) Bcc: ilya Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 18 21:57:25 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1ERxYd-0007z9-5h for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Oct 2005 21:55:35 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ERxYc-0004yB-Hu for geh-help-gnu-emacs@m.gmane.org; Tue, 18 Oct 2005 15:55:34 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.news.ucla.edu!newsfeed.berkeley.edu!ucberkeley!agate.berkeley.edu!ilya Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Original-NNTP-Posting-Host: powdermilk.math.berkeley.edu Original-X-Trace: agate.berkeley.edu 1129665237 73445 169.229.140.13 (18 Oct 2005 19:53:57 GMT) Original-X-Complaints-To: usenet@agate.berkeley.edu Original-NNTP-Posting-Date: Tue, 18 Oct 2005 19:53:57 +0000 (UTC) User-Agent: trn [how to get a version via %-escapes???] with a custom header X-How-To-Reach-Me: The From: address is valid X-How-To-Disable-Cc: Put in the headers the line: Mail-Copies-To: never Originator: ilya@powdermilk Original-Xref: shelby.stanford.edu gnu.emacs.help:134766 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:30348 Archived-At: [A complimentary Cc of this posting was sent to Kevin Rodgers ], who wrote in article : > > AFAIC, ispell-region() does not provide a way to query "the status of > > operation". Thus my idea is that the following code: > > > > (my-map-regions > > (function > > (lambda (s e) > > (ispell-region s e) > > ;; Bulk out if user pressed 'x' or 'q' - but HOWTO? > > ))) > > > > would not be easily breakable out by 'x' or 'q'. > > What commands are invoked by `x' and `q' in ispell-region? > > You could advise those commands to throw to a tag that you establish > with catch. No such command. See `ispell-command-loop'. Of course, one could advise ispell-command-loop itself to propagate ispell-quit (which is going to be reset to nil later) to, e.g., ispell-quit-pos. Is it possible to do advising "locally" (like let()ting), so it is automatically undone when the calling function exits? Thanks, Ilya