emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: region-active-p


From: Andreas Röhler
Subject: Re: region-active-p
Date: Tue, 11 Dec 2007 12:50:26 +0100
User-agent: KMail/1.9.5

Am Dienstag, 11. Dezember 2007 10:59 schrieb Juri Linkov:
> >> I came up with a better solution to the question of what region-active-p
> >> should do when the region is empty: make it a user option.
> >> I think that will make people happy, because I expect most users will
> >> have the same preference for all the commands.
> >>
> >> I will install it when I have a good connection.
> >
> > To be more precisely: For the special case "region
> > exist but empty" XEmacs has already the function
> > `region-exists-p'. `region-active-p' fails in
> > that case and I see no reason to make things more
> > complicated at this point.
> >
> > It's quite easy to follow in both cases, remaining
> > differences caused by routines below will not be
> > remarkable by users as was stated correctly.
>
> `region-exists-p' in XEmacs would be equivalent in Emacs to:
>
> (defun region-exists-p ()
>     (not (null mark-active)))
>
Yes, and that's the second useful thing here, thanks.

> I don't see how this is comparable to `region-active-p'
> with "region exist but empty" in Emacs.

Because if a "region exist but empty" returns `t', the
mark must be set, nothing more is required. That's
precisely the question, `mark-active' and
`region-exists-p' are answering.


Andreas Röhler




reply via email to

[Prev in Thread] Current Thread [Next in Thread]