comparison lisp/emulation/tpu-edt.el @ 91000:cd5e99697764

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 843-844) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 84-87) - Update from CVS - Change capitalization of VC backend names for new backends Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-241
author Miles Bader <miles@gnu.org>
date Fri, 03 Aug 2007 05:57:16 +0000
parents f55f9811f5d7 b8c796068320
children 424b655804ca
comparison
equal deleted inserted replaced
90999:35e3789db058 91000:cd5e99697764
1033 ;; Real TPU error messages end in periods. 1033 ;; Real TPU error messages end in periods.
1034 ;; Define this to avoid openly flouting Emacs coding standards. 1034 ;; Define this to avoid openly flouting Emacs coding standards.
1035 (defalias 'tpu-error 'error) 1035 (defalias 'tpu-error 'error)
1036 1036
1037 1037
1038 ;; Around emacs version 18.57, function line-move was renamed to
1039 ;; next-line-internal. If we're running under an older emacs,
1040 ;; make next-line-internal equivalent to line-move.
1041
1042 (if (not (fboundp 'next-line-internal)) (fset 'next-line-internal 'line-move))
1043
1044
1045 ;;; 1038 ;;;
1046 ;;; Help 1039 ;;; Help
1047 ;;; 1040 ;;;
1048 (defvar tpu-help-keypad-map "\f 1041 (defvar tpu-help-keypad-map "\f
1049 _______________________ _______________________________ 1042 _______________________ _______________________________
1990 ;;; 1983 ;;;
1991 (defun tpu-next-line (num) 1984 (defun tpu-next-line (num)
1992 "Move to next line. 1985 "Move to next line.
1993 Prefix argument serves as a repeat count." 1986 Prefix argument serves as a repeat count."
1994 (interactive "p") 1987 (interactive "p")
1995 (next-line-internal num) 1988 (line-move num)
1996 (setq this-command 'next-line)) 1989 (setq this-command 'next-line))
1997 1990
1998 (defun tpu-previous-line (num) 1991 (defun tpu-previous-line (num)
1999 "Move to previous line. 1992 "Move to previous line.
2000 Prefix argument serves as a repeat count." 1993 Prefix argument serves as a repeat count."
2001 (interactive "p") 1994 (interactive "p")
2002 (next-line-internal (- num)) 1995 (line-move (- num))
2003 (setq this-command 'previous-line)) 1996 (setq this-command 'previous-line))
2004 1997
2005 (defun tpu-next-beginning-of-line (num) 1998 (defun tpu-next-beginning-of-line (num)
2006 "Move to beginning of line; if at beginning, move to beginning of next line. 1999 "Move to beginning of line; if at beginning, move to beginning of next line.
2007 Accepts a prefix argument for the number of lines to move." 2000 Accepts a prefix argument for the number of lines to move."
2120 A repeat count means scroll that many sections." 2113 A repeat count means scroll that many sections."
2121 (interactive "p") 2114 (interactive "p")
2122 (let* ((beg (tpu-current-line)) 2115 (let* ((beg (tpu-current-line))
2123 (height (1- (window-height))) 2116 (height (1- (window-height)))
2124 (lines (* num (/ (* height tpu-percent-scroll) 100)))) 2117 (lines (* num (/ (* height tpu-percent-scroll) 100))))
2125 (next-line-internal (- lines)) 2118 (line-move (- lines))
2126 (if (> lines beg) (recenter 0)))) 2119 (if (> lines beg) (recenter 0))))
2127 2120
2128 (defun tpu-scroll-window-up (num) 2121 (defun tpu-scroll-window-up (num)
2129 "Scroll the display up to the next section. 2122 "Scroll the display up to the next section.
2130 A repeat count means scroll that many sections." 2123 A repeat count means scroll that many sections."
2131 (interactive "p") 2124 (interactive "p")
2132 (let* ((beg (tpu-current-line)) 2125 (let* ((beg (tpu-current-line))
2133 (height (1- (window-height))) 2126 (height (1- (window-height)))
2134 (lines (* num (/ (* height tpu-percent-scroll) 100)))) 2127 (lines (* num (/ (* height tpu-percent-scroll) 100))))
2135 (next-line-internal lines) 2128 (line-move lines)
2136 (if (>= (+ lines beg) height) (recenter -1)))) 2129 (if (>= (+ lines beg) height) (recenter -1))))
2137 2130
2138 (defun tpu-pan-right (num) 2131 (defun tpu-pan-right (num)
2139 "Pan right tpu-pan-columns (16 by default). 2132 "Pan right tpu-pan-columns (16 by default).
2140 Accepts a prefix argument for the number of tpu-pan-columns to scroll." 2133 Accepts a prefix argument for the number of tpu-pan-columns to scroll."