emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117488: * lisp/simple.el (transpose-chars): Don't m


From: Juri Linkov
Subject: [Emacs-diffs] trunk r117488: * lisp/simple.el (transpose-chars): Don't move point into read-only area.
Date: Tue, 08 Jul 2014 08:27:51 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117488
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17829
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Tue 2014-07-08 11:27:46 +0300
message:
  * lisp/simple.el (transpose-chars): Don't move point into read-only area.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/simple.el                 simple.el-20091113204419-o5vbwnq5f7feedwu-403
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-07-08 08:02:50 +0000
+++ b/lisp/ChangeLog    2014-07-08 08:27:46 +0000
@@ -1,5 +1,10 @@
 2014-07-08  Juri Linkov  <address@hidden>
 
+       * simple.el (transpose-chars): Don't move point into read-only area.
+       (Bug#17829)
+
+2014-07-08  Juri Linkov  <address@hidden>
+
        * window.el (with-displayed-buffer-window): New macro.
        (with-temp-buffer-window, with-current-buffer-window):
        Use `macroexp-let2' to evaluate and bind variables

=== modified file 'lisp/simple.el'
--- a/lisp/simple.el    2014-07-01 18:13:28 +0000
+++ b/lisp/simple.el    2014-07-08 08:27:46 +0000
@@ -5934,7 +5934,9 @@
 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)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]