GNU bug report logs -
#2760
CUA-like stuff spuriously enables transient-mark-mode.
Previous Next
Reported by: Alan Mackenzie <acm <at> muc.de>
Date: Mon, 23 Mar 2009 22:45:04 UTC
Severity: normal
Done: Alan Mackenzie <acm <at> muc.de>
Bug is archived. No further changes may be made.
Full log
Message #20 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
Hi, Stefan!
On Mon, Mar 23, 2009 at 08:46:22PM -0400, Stefan Monnier wrote:
> > Start the CVS head "emacs -Q", and evaluate this:
> > (global-set-key [ &\C-\M-\S-m ] 'forward-char)
> > (transient-mark-mode -1)
> > In some buffer, invoke 'forward-char by the above binding. This enables
> > transient-mark-mode as a side effect. This shouldn't happen.
> Can't reproduce it here (I tried the above, after replacing & with ?
> and I don't see any indication that transient-mark-mode is being set).
Sorry, my mistake. Yes I did mean "?" in the binding, but as depicted
above, the bug doesn't happen.
Instead,
(global-set-key [ ?\C-\M-m ] 'forward-char)
Now invoke forward-char with this binding + the shift key. This enables
transient-mark-mode as a side effect. This shouldn't happen.^H^H^H^H....
Correction: this can be disabled by nullifying the option
shift-select-mode - which isn't yet documented in the Emacs manual. So I
withdraw my complaint, with apologies.
> > Why, why, why is this thing implemented by hard-coding in the command
> > loop, where it interferes with users' ability to chose key bindings?
> Where do you see it hardcoded in the command loop?
In Fcall_interactively, Lines 207 and 231, where it is interpreting the
interactive string:
else if (*string == '^')
{
if (! NILP (Vshift_select_mode))
call1 (Qhandle_shift_selection, Qnil); <================
/* Even if shift-select-mode is off, temporarily active
regions could be set using the mouse, and should be
deactivated. */
else if (CONSP (Vtransient_mark_mode)
&& EQ (XCAR (Vtransient_mark_mode), Qonly))
call1 (Qhandle_shift_selection, Qt); <================
string++;
}
.
> > It's practically 100% certain that somebody, somewhere, will want to use
> > the hyper- or alt- keys instead of <shift> to get this visible region
> We'll cross this bridge when we get there.
> Stefan
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 16 years and 63 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.