[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master e221d32: Fix point positioning after transposing wi
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master e221d32: Fix point positioning after transposing with negative arg |
Date: |
Fri, 13 Nov 2015 09:47:31 +0000 |
branch: master
commit e221d32daf4c3072a5a368bd813f758711dd6ff5
Author: Eli Barzilay <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Fix point positioning after transposing with negative arg
* lisp/simple.el (transpose-subr): When invoked with a negative
argument, move point to after the transposed text, like we do
when invoked with a positive argument. (Bug#21885)
---
lisp/simple.el | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/lisp/simple.el b/lisp/simple.el
index 2781ad0..b115a2a 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -6634,7 +6634,8 @@ current object."
(setq pos1 (funcall aux -1))
(goto-char (car pos1))
(setq pos2 (funcall aux arg))
- (transpose-subr-1 pos1 pos2)))))
+ (transpose-subr-1 pos1 pos2)
+ (goto-char (+ (car pos2) (- (cdr pos1) (car pos1))))))))
(defun transpose-subr-1 (pos1 pos2)
(when (> (car pos1) (cdr pos1)) (setq pos1 (cons (cdr pos1) (car pos1))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master e221d32: Fix point positioning after transposing with negative arg,
Eli Zaretskii <=