changeset 12687:e7e04fe05a17

(tpu-backward-line): Only move to BOL if not already there.
author Richard M. Stallman <rms@gnu.org>
date Thu, 27 Jul 1995 07:37:53 +0000
parents 8a11e11d3365
children c56f1c77ce73
files lisp/emulation/tpu-extras.el
diffstat 1 files changed, 25 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emulation/tpu-extras.el	Thu Jul 27 07:37:12 1995 +0000
+++ b/lisp/emulation/tpu-extras.el	Thu Jul 27 07:37:53 1995 +0000
@@ -24,6 +24,28 @@
 
 ;;; Commentary:
 
+;;  Use the functions defined here to customize TPU-edt to your tastes by
+;;  setting scroll margins and/or turning on free cursor mode.  Here's an
+;;  example for your .emacs file.
+
+;;     (tpu-set-cursor-free)                   ; Set cursor free.
+;;     (tpu-set-scroll-margins "10%" "15%")    ; Set scroll margins.
+
+;;  Scroll margins and cursor binding can be changed from within emacs using
+;;  the following commands:
+
+;;     tpu-set-scroll-margins  or   set scroll margins
+;;     tpu-set-cursor-bound    or   set cursor bound
+;;     tpu-set-cursor-free     or   set cursor free
+
+;;  Additionally, Gold-F toggles between bound and free cursor modes.
+
+;;  Note that switching out of free cursor mode or exiting TPU-edt while in
+;;  free cursor mode strips trailing whitespace from every line in the file.
+
+
+;;; Details:
+
 ;;  The functions contained in this file implement scroll margins and free
 ;;  cursor mode.  The following keys and commands are affected.
 
@@ -67,8 +89,8 @@
 ;;  performance of TPU-edt on slower computers.  In order to support the
 ;;  widest range of computers, scroll margin support is optional.
 
-;;  I don't know for a fact that the overhead associated with scroll
-;;  margin support is significant.  If you find that it is, please send me
+;;  It's actually not known whether the overhead associated with scroll
+;;  margin support is significant.  If you find that it is, please send
 ;;  a note describing the extent of the performance degradation.  Be sure
 ;;  to include a description of the platform where you're running TPU-edt.
 ;;  Send your note to the address provided by Gold-V.
@@ -77,28 +99,6 @@
 ;;  important aspects of the real TPU/edt.  Those who miss free cursor mode
 ;;  and/or scroll margins will appreciate these implementations.
 
-;;; Usage:
-
-;;  To use this file, simply load it after loading TPU-edt.  After that,
-;;  customize TPU-edt to your tastes by setting scroll margins and/or
-;;  turning on free cursor mode.  Here's an example for your .emacs file.
-
-;;     (load "tpu-edt")                      ; Load the base TPU-edt
-;;     (load "tpu-extras")                   ;   and the extras.
-;;     (tpu-set-scroll-margins "10%" "15%")  ; Set scroll margins.
-
-;;  Once the extras are loaded, scroll margins and cursor binding can be
-;;  changed with the following commands:
-
-;;     tpu-set-scroll-margins  or   set scroll margins
-;;     tpu-set-cursor-bound    or   set cursor bound
-;;     tpu-set-cursor-free     or   set cursor free
-
-;;  Additionally, Gold-F toggles between bound and free cursor modes.
-
-;;  Note that switching out of free cursor mode or exiting TPU-edt while in
-;;  free cursor mode strips trailing whitespace from every line in the file.
-
 ;;; Code:
 
 
@@ -259,6 +259,7 @@
 Prefix argument serves as repeat count."
   (interactive "p")
   (let ((beg (tpu-current-line)))
+    (or (bolp) (>= 0 num) (setq num (- num 1)))
     (next-line-internal (- num))
     (tpu-top-check beg num)
     (beginning-of-line)))