comparison lisp/simple.el @ 8006:6e58b282df42

(scroll-other-window-down): New command. (blink-matching-open): Use matching-paren.
author Richard M. Stallman <rms@gnu.org>
date Wed, 22 Jun 1994 05:16:22 +0000
parents 4ab8723cd491
children 11a0c2f22d7e
comparison
equal deleted inserted replaced
8005:12f59aa8e26d 8006:6e58b282df42
1693 ;; "Move left one character on the screen (with prefix ARG, that many chars). 1693 ;; "Move left one character on the screen (with prefix ARG, that many chars).
1694 ;;Scroll left if needed to keep point horizontally onscreen." 1694 ;;Scroll left if needed to keep point horizontally onscreen."
1695 ;; (interactive "P") 1695 ;; (interactive "P")
1696 ;; (backward-char arg) 1696 ;; (backward-char arg)
1697 ;; (hscroll-point-visible)) 1697 ;; (hscroll-point-visible))
1698
1699 (defun scroll-other-window-down (lines)
1700 "Scroll the \"other window\" down."
1701 (interactive "P")
1702 (scroll-other-window
1703 ;; Just invert the argument's meaning.
1704 ;; We can do that without knowing which window it will be.
1705 (if (eq lines '-) nil
1706 (if (null lines) '-
1707 (- (prefix-numeric-value lines))))))
1698 1708
1699 (defun transpose-chars (arg) 1709 (defun transpose-chars (arg)
1700 "Interchange characters around point, moving forward one character. 1710 "Interchange characters around point, moving forward one character.
1701 With prefix arg ARG, effect is to take character before point 1711 With prefix arg ARG, effect is to take character before point
1702 and drag it forward past ARG other characters (backward if ARG negative). 1712 and drag it forward past ARG other characters (backward if ARG negative).
2327 (error nil))) 2337 (error nil)))
2328 (and blinkpos (/= (char-syntax (char-after blinkpos)) 2338 (and blinkpos (/= (char-syntax (char-after blinkpos))
2329 ?\$) 2339 ?\$)
2330 (setq mismatch 2340 (setq mismatch
2331 (/= (char-after (1- oldpos)) 2341 (/= (char-after (1- oldpos))
2332 (logand (lsh (aref (syntax-table) 2342 (matching-paren (char-after blinkpos)))))
2333 (char-after blinkpos))
2334 -8)
2335 255))))
2336 (if mismatch (setq blinkpos nil)) 2343 (if mismatch (setq blinkpos nil))
2337 (if blinkpos 2344 (if blinkpos
2338 (progn 2345 (progn
2339 (goto-char blinkpos) 2346 (goto-char blinkpos)
2340 (if (pos-visible-in-window-p) 2347 (if (pos-visible-in-window-p)