GNU bug report logs - #10899
24.0.93; c-forward-conditional should not move the mark

Previous Next

Packages: cc-mode, emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Mon, 27 Feb 2012 19:10:02 UTC

Severity: minor

Found in version 24.0.93

Full log


Message #23 received at 10899 <at> debbugs.gnu.org (full text, mbox):

From: Dani Moncayo <dmoncayo <at> gmail.com>
To: Juri Linkov <juri <at> jurta.org>
Cc: 10899 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>
Subject: Re: bug#10899: 24.0.93; c-forward-conditional should not move the mark
Date: Tue, 28 Feb 2012 12:12:32 +0100
>> Summarizing:
>> a. `c-forward-conditional' and `c-backward-conditional' should not set
>> the mark, because each one has an inverse movement command.
>> b. Even if you disagree, those commands should not set the mark when
>> it is active.
>
> All similar movement commands like `c-beginning-of-defun' and `c-end-of-defun'
> take precautions against the behavior you found.  They do this by using
> the following condition before leaving mark behind:
>
>  (and transient-mark-mode mark-active)
>
> The patch below fixes the remaining movement commands to do the same,
> except `c-mark-function' that needs to be rewritten to follow the logic
> of `mark-defun' for setting the mark.

Thanks Juri, for working on this and many other fixes/improvements to Emacs.

Regarding your patch, I think it clearly improve the current behavior,
but I want to emphasize again that, IMO, setting the mark in too many
commands is bad, because it overfills the mark ring, thus making
harder to return to earlier positions.


-- 
Dani Moncayo




This bug report was last modified 4 years and 295 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.