changeset 20765:2bdc3877262b

(hscroll-global-mode): New customize variable to automatically load the package.
author Stephen Eglen <stephen@gnu.org>
date Sat, 24 Jan 1998 16:13:08 +0000
parents d1d94511b3b7
children 92c662c4ab0e
files lisp/hscroll.el
diffstat 1 files changed, 15 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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