diff lisp/prim/simple.el @ 149:538048ae2ab8 r20-3b1

Import from CVS: tag r20-3b1
author cvs
date Mon, 13 Aug 2007 09:36:16 +0200
parents 1856695b1fa9
children 25f70ba0133c
line wrap: on
line diff
--- a/lisp/prim/simple.el	Mon Aug 13 09:35:15 2007 +0200
+++ b/lisp/prim/simple.el	Mon Aug 13 09:36:16 2007 +0200
@@ -1825,6 +1825,17 @@
   (and (null arg) (eolp) (forward-char -1))
   (transpose-subr 'forward-char (prefix-numeric-value arg)))
 
+;;; A very old implementation of transpose-chars from the old days ...
+(defun transpose-preceding-chars (arg)
+  "Interchange characters before point.
+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 not at start of line, the previous two chars are exchanged."
+  (interactive "*P")
+  (and (null arg) (not (bolp)) (forward-char -1))
+  (transpose-subr 'forward-char (prefix-numeric-value arg)))
+
+
 (defun transpose-words (arg)
   "Interchange words around point, leaving point at end of them.
 With prefix arg ARG, effect is to take word before or around point