aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Eglen1998-01-24 16:13:08 +0000
committerStephen Eglen1998-01-24 16:13:08 +0000
commit5d039c85125b62e3520cd1acc73b333ef50f9f73 (patch)
treeaa80dec5c5facf8897301feca8ee65797cd301f6
parent5e537651cb7fc73c61ff96c2469ffbb6ab9b8e67 (diff)
downloademacs-5d039c85125b62e3520cd1acc73b333ef50f9f73.tar.gz
emacs-5d039c85125b62e3520cd1acc73b333ef50f9f73.zip
(hscroll-global-mode): New customize variable to automatically load the
package.
-rw-r--r--lisp/hscroll.el16
1 files changed, 15 insertions, 1 deletions
diff --git a/lisp/hscroll.el b/lisp/hscroll.el
index 3940430f93d..a3da7913ced 100644
--- a/lisp/hscroll.el
+++ b/lisp/hscroll.el
@@ -58,6 +58,17 @@
58 "Minor mode to automatically scroll truncated lines horizontally." 58 "Minor mode to automatically scroll truncated lines horizontally."
59 :group 'editing) 59 :group 'editing)
60 60
61
62(defcustom hscroll-global-mode nil
63 "Toggle horizontal scrolling.
64You must modify via \\[customize] for this variable to have an effect."
65 :set (lambda (symbol value)
66 (hscroll-global-mode (if value 1 -1)))
67 :initialize 'custom-initialize-default
68 :group 'hscroll
69 :type 'boolean
70 :require 'hscroll)
71
61(defcustom hscroll-margin 5 72(defcustom hscroll-margin 5
62 "*How many columns away from the edge of the window point is allowed to get 73 "*How many columns away from the edge of the window point is allowed to get
63before HScroll will horizontally scroll the window." 74before HScroll will horizontally scroll the window."
@@ -171,7 +182,7 @@ will have no effect on it).
171 (newmode (if (null arg) 182 (newmode (if (null arg)
172 (not oldmode) 183 (not oldmode)
173 (> (prefix-numeric-value arg) 0)))) 184 (> (prefix-numeric-value arg) 0))))
174 185 (setq hscroll-global-mode newmode)
175 (if newmode 186 (if newmode
176 ;; turn it on 187 ;; turn it on
177 (if (not hscroll-mode) 188 (if (not hscroll-mode)
@@ -240,6 +251,9 @@ invoked as well (i.e., it can be bound to a key)."
240;;; It's not a bug, it's a *feature* 251;;; It's not a bug, it's a *feature*
241;;; 252;;;
242 253
254(if hscroll-global-mode
255 (hscroll-global-mode 1))
256
243(provide 'hscroll) 257(provide 'hscroll)
244 258
245;;; hscroll.el ends here 259;;; hscroll.el ends here