home *** CD-ROM | disk | FTP | other *** search
- ;; twiddle.mut : twiddle characters
- ;; twiddle-left-of-dot: (C-T in Gosling's or Unipress EMACS)
- ;; Transpose the 2 characters left of the cursor. Does nothing if the
- ;; cursor is within a character of left edge.
- ;; For example: to change "abc" to "bac", put the cursor on the "c" and
- ;; twiddle.
- ;; twiddle-about-dot: (C-T in GNU EMACS)
- ;; Transpose the characters on either side of the dot. At the end of a
- ;; line, does a twiddle-left-of-dot. Does nothing if the cursor is
- ;; at the left edge.
- ;; For example: to change "abc" to "bac", put the cursor on the "b" and
- ;; twiddle.
-
- (defun
- twiddle-left-of-dot
- {
- (if (< 2 (current-column))
- {
- (previous-character)(looking-at '.')
- (delete-character)
- (previous-character)(insert-text (get-matched '&'))
- (next-character)
- })
- }
- twiddle-about-dot
- {
- (if (looking-at '$')
- (twiddle-left-of-dot)
- (if (next-character) { (twiddle-left-of-dot)(previous-character) })
- )
- }
- )
-