aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-07-27 07:37:53 +0000
committerRichard M. Stallman1995-07-27 07:37:53 +0000
commit8429908361f6bd419a77479d0e76bdfd478605da (patch)
tree87b17f54b4d849083a5c3b0974d6f837e3ca10c2
parent1a4cec85108b740f1ec995d9704e655744b3235a (diff)
downloademacs-8429908361f6bd419a77479d0e76bdfd478605da.tar.gz
emacs-8429908361f6bd419a77479d0e76bdfd478605da.zip
(tpu-backward-line): Only move to BOL if not already there.
-rw-r--r--lisp/emulation/tpu-extras.el49
1 files changed, 25 insertions, 24 deletions
diff --git a/lisp/emulation/tpu-extras.el b/lisp/emulation/tpu-extras.el
index 6df0df005d8..abc8d1a9c17 100644
--- a/lisp/emulation/tpu-extras.el
+++ b/lisp/emulation/tpu-extras.el
@@ -24,6 +24,28 @@
24 24
25;;; Commentary: 25;;; Commentary:
26 26
27;; Use the functions defined here to customize TPU-edt to your tastes by
28;; setting scroll margins and/or turning on free cursor mode. Here's an
29;; example for your .emacs file.
30
31;; (tpu-set-cursor-free) ; Set cursor free.
32;; (tpu-set-scroll-margins "10%" "15%") ; Set scroll margins.
33
34;; Scroll margins and cursor binding can be changed from within emacs using
35;; the following commands:
36
37;; tpu-set-scroll-margins or set scroll margins
38;; tpu-set-cursor-bound or set cursor bound
39;; tpu-set-cursor-free or set cursor free
40
41;; Additionally, Gold-F toggles between bound and free cursor modes.
42
43;; Note that switching out of free cursor mode or exiting TPU-edt while in
44;; free cursor mode strips trailing whitespace from every line in the file.
45
46
47;;; Details:
48
27;; The functions contained in this file implement scroll margins and free 49;; The functions contained in this file implement scroll margins and free
28;; cursor mode. The following keys and commands are affected. 50;; cursor mode. The following keys and commands are affected.
29 51
@@ -67,8 +89,8 @@
67;; performance of TPU-edt on slower computers. In order to support the 89;; performance of TPU-edt on slower computers. In order to support the
68;; widest range of computers, scroll margin support is optional. 90;; widest range of computers, scroll margin support is optional.
69 91
70;; I don't know for a fact that the overhead associated with scroll 92;; It's actually not known whether the overhead associated with scroll
71;; margin support is significant. If you find that it is, please send me 93;; margin support is significant. If you find that it is, please send
72;; a note describing the extent of the performance degradation. Be sure 94;; a note describing the extent of the performance degradation. Be sure
73;; to include a description of the platform where you're running TPU-edt. 95;; to include a description of the platform where you're running TPU-edt.
74;; Send your note to the address provided by Gold-V. 96;; Send your note to the address provided by Gold-V.
@@ -77,28 +99,6 @@
77;; important aspects of the real TPU/edt. Those who miss free cursor mode 99;; important aspects of the real TPU/edt. Those who miss free cursor mode
78;; and/or scroll margins will appreciate these implementations. 100;; and/or scroll margins will appreciate these implementations.
79 101
80;;; Usage:
81
82;; To use this file, simply load it after loading TPU-edt. After that,
83;; customize TPU-edt to your tastes by setting scroll margins and/or
84;; turning on free cursor mode. Here's an example for your .emacs file.
85
86;; (load "tpu-edt") ; Load the base TPU-edt
87;; (load "tpu-extras") ; and the extras.
88;; (tpu-set-scroll-margins "10%" "15%") ; Set scroll margins.
89
90;; Once the extras are loaded, scroll margins and cursor binding can be
91;; changed with the following commands:
92
93;; tpu-set-scroll-margins or set scroll margins
94;; tpu-set-cursor-bound or set cursor bound
95;; tpu-set-cursor-free or set cursor free
96
97;; Additionally, Gold-F toggles between bound and free cursor modes.
98
99;; Note that switching out of free cursor mode or exiting TPU-edt while in
100;; free cursor mode strips trailing whitespace from every line in the file.
101
102;;; Code: 102;;; Code:
103 103
104 104
@@ -259,6 +259,7 @@ Prefix argument serves as a repeat count."
259Prefix argument serves as repeat count." 259Prefix argument serves as repeat count."
260 (interactive "p") 260 (interactive "p")
261 (let ((beg (tpu-current-line))) 261 (let ((beg (tpu-current-line)))
262 (or (bolp) (>= 0 num) (setq num (- num 1)))
262 (next-line-internal (- num)) 263 (next-line-internal (- num))
263 (tpu-top-check beg num) 264 (tpu-top-check beg num)
264 (beginning-of-line))) 265 (beginning-of-line)))