Use *p in interactive form in transpose-chars
authorTheodor Thornhill <theo@thornhill.no>
Sat, 17 Dec 2022 12:14:22 +0000 (13:14 +0100)
committerStefan Kangas <stefankangas@gmail.com>
Wed, 6 Sep 2023 07:07:31 +0000 (09:07 +0200)
* lisp/simple.el (transpose-chars): Use '*p' instead of '*P' like the
other transpose-* functions.  (Bug#60157)

lisp/simple.el

index 05a3c4b93d67c7a547f9abf46ffde75110bb5f9f..f4672b46b10cf1a34c7186f70e45bb77c9a507cf 100644 (file)
@@ -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.