emacs-diffs
[Top][All Lists]
Advanced

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

master 4ac83ee105a: Use *p in interactive form in transpose-chars


From: Stefan Kangas
Subject: master 4ac83ee105a: Use *p in interactive form in transpose-chars
Date: Wed, 6 Sep 2023 03:07:53 -0400 (EDT)

branch: master
commit 4ac83ee105afd7bb53ce657ddf214c96c24c153b
Author: Theodor Thornhill <theo@thornhill.no>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Use *p in interactive form in transpose-chars
    
    * lisp/simple.el (transpose-chars): Use '*p' instead of '*P' like the
    other transpose-* functions.  (Bug#60157)
---
 lisp/simple.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index 05a3c4b93d6..f4672b46b10 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -8566,12 +8566,12 @@ variables `truncate-lines' and 
`truncate-partial-width-windows'."
   "Interchange characters around point, moving forward one character.
 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")
-  (when (and (null arg) (eolp) (not (bobp))
+If at end of line, the previous two chars are exchanged."
+  (interactive "*p")
+  (when (and (eolp) (not (bobp))
             (not (get-text-property (1- (point)) 'read-only)))
     (forward-char -1))
-  (transpose-subr 'forward-char (prefix-numeric-value arg)))
+  (transpose-subr #'forward-char arg))
 
 (defun transpose-words (arg)
   "Interchange words around point, leaving point at end of them.



reply via email to

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