From: Juri Linkov <juri@jurta.org>
To: 16438@debbugs.gnu.org
Subject: bug#16438: 24.3.50; `C-x TAB right right' fails with error (mark-inactive)
Date: Tue, 14 Jan 2014 10:14:07 +0200 [thread overview]
Message-ID: <87txd756b4.fsf@mail.jurta.org> (raw)
1. emacs -Q
2. Paste to *scratch*:
(custom-set-variables
'(mark-even-if-inactive nil))
3. Eval it.
4. Put point at its opening paren and type:
C-M-SPC - selects the whole expression
C-x TAB - activates a transient indentation mode
right - adjusts indentation 1 position to the right
right - fails with the error "The mark is not active now"
because the previous `right' key deactivated the region
One way to fix this is not to deactivate the mark in this transient mode:
=== modified file 'lisp/indent.el'
--- lisp/indent.el 2014-01-13 05:03:31 +0000
+++ lisp/indent.el 2014-01-14 08:07:55 +0000
@@ -214,7 +214,9 @@ (defun indent-rigidly (start end arg &op
(indent-to (max 0 (+ indent (prefix-numeric-value arg))) 0))
(delete-region (point) (progn (skip-chars-forward " \t") (point))))
(forward-line 1))
- (move-marker end nil))))
+ (move-marker end nil)
+ (when (eq overriding-terminal-local-map indent-rigidly-map)
+ (setq deactivate-mark nil)))))
But the condition of checking for the transient mode doesn't work
because overriding-terminal-local-map never equals to indent-rigidly-map.
indent-rigidly-map:
(keymap (S-right . indent-rigidly-right-to-tab-stop) (S-left . indent-rigidly-left-to-tab-stop) (right . indent-rigidly-right) (left . indent-rigidly-left))
overriding-terminal-local-map:
(keymap (keymap (S-right . indent-rigidly-right-to-tab-stop) (S-left . indent-rigidly-left-to-tab-stop) (right . indent-rigidly-right) (left . indent-rigidly-left))
add-keymap-witness)
There is some `add-keymap-witness' at the end of `overriding-terminal-local-map'
when the transient indentation mode is active. And I don't know another way
to check if `overriding-terminal-local-map' is active.
next reply other threads:[~2014-01-14 8:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-14 8:14 Juri Linkov [this message]
2014-01-15 8:23 ` bug#16438: 24.3.50; `C-x TAB right right' fails with error (mark-inactive) Juri Linkov
2014-01-15 15:31 ` Stefan Monnier
2014-01-16 7:53 ` Juri Linkov
2014-01-16 14:00 ` Stefan Monnier
2014-01-17 8:08 ` Juri Linkov
2014-01-17 14:45 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87txd756b4.fsf@mail.jurta.org \
--to=juri@jurta.org \
--cc=16438@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.