"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.