[Top][All Lists]

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

Re: window-configurations and marks

From: Stephen J. Turnbull
Subject: Re: window-configurations and marks
Date: Sun, 27 Apr 2014 00:22:20 +0900

Hi, Andreas!

Andreas Röhler writes:

 > Best way is to clean up the core-functions.
 > For example have a look at "mark". Its docstring says:
 > "Return this buffer's mark value as integer, or nil if never set.
 > In Transient Mark mode, this function signals an error if
 > the mark is not active.  However, if `mark-even-if-inactive' is non-nil,
 > or the argument FORCE is non-nil, it disregards whether the mark
 > is active, and returns an integer or nil in the usual way."
 > IMO only the first line/feature is reasonable.
 > The remaining stuff belongs to commands making use of it, not here
 > - nil or point is all needed.

One can argue naming (eg, the current function should be named
`active-mark' and `mark' should just return the mark as an integer or
nil).  However there's good reason for factoring out the behavior
relying on Transient Mark mode, because that is behavior chosen by the
user that should be implemented consistently across mark-using commands.

I personally prefer the spellings `(mark)' and `(mark t)' to
`(active-mark)' and `(mark)', because users who enable t-m-m expect it
to affect all uses of the mark.  Therefore the "easier to write" name
should be used for the function affected by t-m-m.

I agree that `mark-even-if-inactive' is an ugly hack give the FORCE

reply via email to

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