Commit 43bb0be6 authored by Juri Linkov's avatar Juri Linkov
Browse files

* lisp/simple.el (transpose-chars): Don't move point into read-only area.

Fixes: debbugs:17829
parent f0f70ec0
2014-07-08 Juri Linkov <>
* simple.el (transpose-chars): Don't move point into read-only area.
2014-07-08 Juri Linkov <>
* window.el (with-displayed-buffer-window): New macro.
......@@ -5934,7 +5934,9 @@ With prefix arg ARG, effect is to take character before point
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 (bobp))
(not (get-text-property (1- (point)) 'read-only)))
(forward-char -1))
(transpose-subr 'forward-char (prefix-numeric-value arg)))
(defun transpose-words (arg)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment