emacs: fix prot-simple-transpose-chars at the end of the line

This commit is contained in:
Protesilaos Stavrou 2025-03-18 19:04:24 +02:00
parent 25dbe773b6
commit 26c39578ba
No known key found for this signature in database
GPG key ID: 99BD6459CD5CA3EA
2 changed files with 8 additions and 4 deletions

View file

@ -16603,8 +16603,10 @@ There is no dragging the character forward. This is the
behaviour of `transpose-chars' when point is at the end of the
line."
(interactive)
(transpose-chars -1)
(forward-char))
(if (eq (point) (line-end-position))
(transpose-chars 1)
(transpose-chars -1)
(forward-char)))
;;;; Commands for paragraphs

View file

@ -624,8 +624,10 @@ There is no dragging the character forward. This is the
behaviour of `transpose-chars' when point is at the end of the
line."
(interactive)
(transpose-chars -1)
(forward-char))
(if (eq (point) (line-end-position))
(transpose-chars 1)
(transpose-chars -1)
(forward-char)))
;;;; Commands for paragraphs