aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2014-07-08 11:27:46 +0300
committerJuri Linkov2014-07-08 11:27:46 +0300
commit43bb0be61a0788045f90d9df5d378506cbbab422 (patch)
tree5dc4628b142a89b0e5fac6fa8931e0e446f4b1b6
parentf0f70ec0bc55e452ea29b5cf3f532740966b0192 (diff)
downloademacs-43bb0be61a0788045f90d9df5d378506cbbab422.tar.gz
emacs-43bb0be61a0788045f90d9df5d378506cbbab422.zip
* lisp/simple.el (transpose-chars): Don't move point into read-only area.
Fixes: debbugs:17829
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/simple.el4
2 files changed, 8 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cc864810c8c..26699e0ff4d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
12014-07-08 Juri Linkov <juri@jurta.org> 12014-07-08 Juri Linkov <juri@jurta.org>
2 2
3 * simple.el (transpose-chars): Don't move point into read-only area.
4 (Bug#17829)
5
62014-07-08 Juri Linkov <juri@jurta.org>
7
3 * window.el (with-displayed-buffer-window): New macro. 8 * window.el (with-displayed-buffer-window): New macro.
4 (with-temp-buffer-window, with-current-buffer-window): 9 (with-temp-buffer-window, with-current-buffer-window):
5 Use `macroexp-let2' to evaluate and bind variables 10 Use `macroexp-let2' to evaluate and bind variables
diff --git a/lisp/simple.el b/lisp/simple.el
index 6fd50197a10..5da662c2124 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -5934,7 +5934,9 @@ With prefix arg ARG, effect is to take character before point
5934and drag it forward past ARG other characters (backward if ARG negative). 5934and drag it forward past ARG other characters (backward if ARG negative).
5935If no argument and at end of line, the previous two chars are exchanged." 5935If no argument and at end of line, the previous two chars are exchanged."
5936 (interactive "*P") 5936 (interactive "*P")
5937 (and (null arg) (eolp) (forward-char -1)) 5937 (when (and (null arg) (eolp) (not (bobp))
5938 (not (get-text-property (1- (point)) 'read-only)))
5939 (forward-char -1))
5938 (transpose-subr 'forward-char (prefix-numeric-value arg))) 5940 (transpose-subr 'forward-char (prefix-numeric-value arg)))
5939 5941
5940(defun transpose-words (arg) 5942(defun transpose-words (arg)