GNU bug report logs -
#17829
24.4.50; `C-t' in empty minibuffer traps user in read-only text
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Sat, 21 Jun 2014 17:08:01 UTC
Severity: normal
Fixed in version 24.4.50
Done: Juri Linkov <juri <at> jurta.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> `M-x C-t' gives you a "Text is read-only" error, and it moves point
> backward into the minibuffer prompt. Repeating it does not move point
> further backward but continues to raise the error.
I often get into the same trap when mistyping C-t instead of C-y
to yank text into the minibuffer. This is one of possible fixes:
=== modified file 'lisp/simple.el'
--- lisp/simple.el 2014-01-31 06:42:29 +0000
+++ lisp/simple.el 2014-06-21 21:54:06 +0000
@@ -5902,7 +5902,8 @@ (defun transpose-chars (arg)
and drag it forward past ARG other characters (backward if ARG negative).
If no argument and at end of line, the previous two chars are exchanged."
(interactive "*P")
- (and (null arg) (eolp) (forward-char -1))
+ (when (and (null arg) (eolp) (not (get-text-property (1- (point)) 'read-only)))
+ (forward-char -1))
(transpose-subr 'forward-char (prefix-numeric-value arg)))
(defun transpose-words (arg)
This bug report was last modified 10 years and 316 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.