Function: transpose-chars
transpose-chars is an interactive and byte-compiled function defined
in simple.el.gz.
Signature
(transpose-chars ARG)
Documentation
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 at end of line, the previous two chars are exchanged.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/simple.el.gz
(defun transpose-chars (arg)
"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 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 arg))