unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: David Kastrup <dak@gnu.org>
Cc: k.stevens@ieee.org, ispell-el-bugs@itcorp.com, emacs-devel@gnu.org
Subject: Re: ispell-region with M-$ in transient-mark-mode
Date: Tue, 18 Jan 2005 12:42:21 +0100	[thread overview]
Message-ID: <x57jmbklpe.fsf@lola.goethe.zz> (raw)
In-Reply-To: <87zmz7m2qr.fsf@jurta.org> (Juri Linkov's message of "Tue, 18 Jan 2005 12:48:09 +0200")

Juri Linkov <juri@jurta.org> 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

  reply	other threads:[~2005-01-18 11:42 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-18 10:48 ispell-region with M-$ in transient-mark-mode Juri Linkov
2005-01-18 11:42 ` David Kastrup [this message]
2005-01-19  0:28   ` Juri Linkov
2005-01-18 19:40 ` Eli Zaretskii
2005-01-19  0:33   ` Juri Linkov
2005-01-19  4:46     ` Eli Zaretskii
2005-01-19  7:46       ` Juri Linkov
2005-01-19  9:06         ` Kim F. Storm
2005-01-19 18:02           ` Eli Zaretskii
2005-01-19 21:30           ` Luc Teirlinck
2005-01-19 22:03             ` Kim F. Storm
2005-01-20  0:19               ` Luc Teirlinck
2005-01-20  8:18                 ` Kim F. Storm
2005-01-20  8:45                   ` David Kastrup
2005-01-20  9:44                     ` Kim F. Storm
2005-01-21  8:34                     ` Kai Großjohann
2005-01-19 17:58         ` Eli Zaretskii
2005-01-20  0:40           ` Luc Teirlinck
2005-01-20 21:32           ` Richard Stallman
2005-01-20 22:00             ` Geoff Kuenning
2005-01-20 22:17               ` David Kastrup
2005-01-20 22:23                 ` Geoff Kuenning
2005-01-20 23:11                   ` Luc Teirlinck
2005-01-21 16:26                     ` Eli Zaretskii
2005-01-22  2:53                       ` Richard Stallman
2005-01-20 22:43               ` Luc Teirlinck
2005-01-20 22:36             ` Han Boetes
2005-01-21 20:10               ` Richard Stallman
2005-01-21 20:44                 ` Han Boetes
2005-01-21 21:25                 ` Luc Teirlinck
2005-01-20  2:14   ` Richard Stallman

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=x57jmbklpe.fsf@lola.goethe.zz \
    --to=dak@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=ispell-el-bugs@itcorp.com \
    --cc=k.stevens@ieee.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).