# HG changeset patch # User Stephen Eglen # Date 885658388 0 # Node ID 2bdc3877262b90a941c147f3d1f3e0e8b1388f29 # Parent d1d94511b3b7f44022f11bf4eca120ec912e8396 (hscroll-global-mode): New customize variable to automatically load the package. diff -r d1d94511b3b7 -r 2bdc3877262b lisp/hscroll.el --- a/lisp/hscroll.el Sat Jan 24 11:35:59 1998 +0000 +++ b/lisp/hscroll.el Sat Jan 24 16:13:08 1998 +0000 @@ -58,6 +58,17 @@ "Minor mode to automatically scroll truncated lines horizontally." :group 'editing) + +(defcustom hscroll-global-mode nil + "Toggle horizontal scrolling. +You must modify via \\[customize] for this variable to have an effect." + :set (lambda (symbol value) + (hscroll-global-mode (if value 1 -1))) + :initialize 'custom-initialize-default + :group 'hscroll + :type 'boolean + :require 'hscroll) + (defcustom hscroll-margin 5 "*How many columns away from the edge of the window point is allowed to get before HScroll will horizontally scroll the window." @@ -171,7 +182,7 @@ (newmode (if (null arg) (not oldmode) (> (prefix-numeric-value arg) 0)))) - + (setq hscroll-global-mode newmode) (if newmode ;; turn it on (if (not hscroll-mode) @@ -240,6 +251,9 @@ ;;; It's not a bug, it's a *feature* ;;; +(if hscroll-global-mode + (hscroll-global-mode 1)) + (provide 'hscroll) ;;; hscroll.el ends here