GNU bug report logs -
#10056
24.0.91; `copy-to-register' does not deactivate the mark
Previous Next
Reported by: Dani Moncayo <dmoncayo <at> gmail.com>
Date: Tue, 15 Nov 2011 20:08:02 UTC
Severity: minor
Found in version 24.0.91
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> As I pointed out previously in this thread, the mark should be
>> deactivated (in general - there can be some exceptions) after any
>> command that operates on the active region. Not doing so is annoying,
The problem is how to implement a general rule "the mark should be
deactivated after any command that operates on the active region".
One way to define "operates on the active region" is when a command
uses `region-beginning' and `region-end'. You can try this definition
by evaluating:
(defun deactivate-mark--advice () (setq deactivate-mark t))
(advice-add 'region-beginning :after #'deactivate-mark--advice)
(advice-add 'region-end :after #'deactivate-mark--advice)
Does this do what you want with the following functions?
>> There are still cases where I observe this misbehavior. Namely:
>>
>> kill-region [1]
>> kill-rectangle [1]
>> prepend-to-register
>> append-to-register
>> narrow-to-region [2]
>> c-indent-line-or-region [3]
>> delete-duplicate-lines [3]
>> delete-matching-lines [3]
>> delete-non-matching-lines [3]
>> delete-blank-lines [3]
>
> Add "fill-paragraph [3]" to the above list. Important use-case.
Does this have a side effect undesirable for other functions?
This bug report was last modified 3 years and 22 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.