From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.devel Subject: Re: ispell-region with M-$ in transient-mark-mode Date: Tue, 18 Jan 2005 12:42:21 +0100 Message-ID: References: <87zmz7m2qr.fsf@jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1106048730 30318 80.91.229.6 (18 Jan 2005 11:45:30 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 18 Jan 2005 11:45:30 +0000 (UTC) Cc: k.stevens@ieee.org, ispell-el-bugs@itcorp.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jan 18 12:45:23 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CqrnX-0004uj-00 for ; Tue, 18 Jan 2005 12:45:23 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CqrzR-00081t-At for ged-emacs-devel@m.gmane.org; Tue, 18 Jan 2005 06:57:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CqryU-0007zv-3N for emacs-devel@gnu.org; Tue, 18 Jan 2005 06:56:42 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CqryQ-0007yc-QI for emacs-devel@gnu.org; Tue, 18 Jan 2005 06:56:39 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CqryQ-0007y2-Nb for emacs-devel@gnu.org; Tue, 18 Jan 2005 06:56:38 -0500 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Cqrkd-0002RA-2p for emacs-devel@gnu.org; Tue, 18 Jan 2005 06:42:23 -0500 Original-Received: from localhost ([127.0.0.1] helo=lola.goethe.zz) by fencepost.gnu.org with esmtp (Exim 4.34) id 1CqrjV-0006qA-Kr; Tue, 18 Jan 2005 06:41:14 -0500 Original-To: Juri Linkov In-Reply-To: <87zmz7m2qr.fsf@jurta.org> (Juri Linkov's message of "Tue, 18 Jan 2005 12:48:09 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:32329 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32329 Juri Linkov writes: > + (if (and (boundp 'transient-mark-mode) transient-mark-mode > + (boundp 'mark-active) mark-active) > + (ispell-region (region-beginning) (region-end)) Just as a matter of taste: leave off the boundp tests. They are presumably for not making this code fail under XEmacs. But that also means that the change is not apparent to XEmacs developers when they try using this code. If they instead an error, they at least know what to look for. Or they can make the call whether they prefer to complicate the code, or rather solve this with compatibility packages. The alternative is to implement this _completely_. Namely do something like (if (if (featurep 'xemacs) (and zmacs-regions (mark)) (and transient-mark-mode mark-active)) (ispell-region ... But a half-baked implementation will complicate matters for our code as well as not simplifying things for the XEmacs developers. If you don't have an XEmacs yourself for checking code like this, I'd tend to suggest leaving out any compatibility stuff. In contrast, it is ok to check stuff like that in when suggested by XEmacs developers (and when we have assignments for them in case they are necessary), because then they have at least a good chance of having been tested and working. But it is probably not worth the trouble if the results are inconsistent: namely if some places in the file cater for XEmacs, and some don't. That is likely to mask trouble. -- David Kastrup, Kriemhildstr. 15, 44793 Bochum