GNU bug report logs -
#10906
24.0.94; `c-mark-function' does set the mark well
Previous Next
Reported by: Dani Moncayo <dmoncayo <at> gmail.com>
Date: Tue, 28 Feb 2012 12:41:01 UTC
Severity: normal
Found in version 24.0.94
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #32 received at 10906 <at> debbugs.gnu.org (full text, mbox):
On Mon, Mar 5, 2012 at 19:41, Alan Mackenzie <acm <at> muc.de> wrote:
>> > Any chance of a quick summary of how c-mark-function differs from
>> > mark-defun?
>
>> AFAIK, they differ at least in two things:
>
>> 1. `mark-defun' saves the original point location in the mark ring,
>> whereas `c-mark-function' does not. IMO, the point should be saved,
>> because in large defuns it may jump to a remote location and you may
>> want to return back to the original position. This bug report is
>> about this inconsistency, as you can see in the original post.
>
>> 2. Successive interactive invocations of `mark-defun' extend the
>> region to the next defuns (which I find useful), whereas
>> `c-mark-function' does not have this feature. Bug #5525 is a request
>> to remove this inconsistency, as you can see in the corresponding
>> thread.
>
>> >> Agreed, and BTW, if `c-mark-function' is going to be revised, please,
>> >> take also this problem into account:
>
>> >> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=5525
>
> Here is a patch which should fix these problems. The logic around
> transient-mark-mode is somewhat complicated, so I would be grateful if
> you would check the patch does the Right Thing. I haven't amended the
> doc string yet. Thanks!
Thank you.
I've tried your patch, and it seems to work[*], at least with my usage
pattern, i.e., with `transient-mark-mode' enabled.
[*] Except for one thing:
- If you do `C-M-h' several times in a row until the mark reaches the
end of the file, the point ends up at the end of the region, and the
mark at the beginning (which doesn't seem right).
- If you try the same experiment with `mark-defun', the mark stays at
the end and the point at the start of the region (as expected).
--
Dani Moncayo
This bug report was last modified 13 years and 133 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.