]> code.delx.au - gnu-emacs/blobdiff - lisp/emulation/tpu-extras.el
Merge from emacs--rel--22
[gnu-emacs] / lisp / emulation / tpu-extras.el
index 479af1765265ef814b6d2dd5b3a13a734517889b..e368d7b963f4ce7b545645e2c840b14e134fd1b0 100644 (file)
@@ -1,6 +1,7 @@
-;;; tpu-extras.el --- Scroll margins and free cursor mode for TPU-edt
+;;; tpu-extras.el --- scroll margins and free cursor mode for TPU-edt
 
-;; Copyright (C) 1993, 1994, 1995, 2000 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 1995, 2000, 2001, 2002, 2003, 2004,
+;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: Rob Riepel <riepel@networking.stanford.edu>
 ;; Maintainer: Rob Riepel <riepel@networking.stanford.edu>
@@ -20,8 +21,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
@@ -144,9 +145,9 @@ the previous line when starting from a line beginning."
   "Eliminate whitespace at ends of lines, if the cursor is free."
   (if (and (buffer-modified-p) tpu-cursor-free) (tpu-trim-line-ends)))
 
-(or (memq 'tpu-write-file-hook write-file-hooks)
-    (setq write-file-hooks
-         (cons 'tpu-write-file-hook write-file-hooks)))
+(or (memq 'tpu-write-file-hook write-file-functions)
+    (setq write-file-functions
+         (cons 'tpu-write-file-hook write-file-functions)))
 
 
 ;;;  Utility routines for implementing scroll margins
@@ -440,16 +441,16 @@ version that respects the bottom scroll margin."
   ;; set top scroll margin
   (or (string= top "")
       (if (string= "%" (substring top -1))
-         (setq tpu-top-scroll-margin (string-to-int top))
+         (setq tpu-top-scroll-margin (string-to-number top))
        (setq tpu-top-scroll-margin
-             (/ (1- (+ (* (string-to-int top) 100) (window-height)))
+             (/ (1- (+ (* (string-to-number top) 100) (window-height)))
                 (window-height)))))
   ;; set bottom scroll margin
   (or (string= bottom "")
       (if (string= "%" (substring bottom -1))
-         (setq tpu-bottom-scroll-margin (string-to-int bottom))
+         (setq tpu-bottom-scroll-margin (string-to-number bottom))
        (setq tpu-bottom-scroll-margin
-             (/ (1- (+ (* (string-to-int bottom) 100) (window-height)))
+             (/ (1- (+ (* (string-to-number bottom) 100) (window-height)))
                 (window-height)))))
   ;; report scroll margin settings if running interactively
   (and (interactive-p)
@@ -480,4 +481,5 @@ version that respects the bottom scroll margin."
                             GOLD-map)
   (message "The cursor is now bound to the flow of your text."))
 
+;;; arch-tag: 89676fa4-33ec-48cb-9135-6f3bf230ab1a
 ;;; tpu-extras.el ends here