summaryrefslogtreecommitdiff
path: root/lisp/fringe.el
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2004-11-28 00:56:28 +0000
committerKim F. Storm <storm@cua.dk>2004-11-28 00:56:28 +0000
commit41e1c123587ee657a3ab9db4c9594d1e12cb54ee (patch)
treed26bb64a23d12a227ac10cb58c48ac802aa6823b /lisp/fringe.el
parent4cf6519d50c4ff6f2f214ec15729506b5939a190 (diff)
downloademacs-41e1c123587ee657a3ab9db4c9594d1e12cb54ee.tar.gz
(fringe): New defgroup.
(fringe-mode): Move to fringe group. (fringe-indicators): New defcustom. (set-fringe-indicators-1): New defun.
Diffstat (limited to 'lisp/fringe.el')
-rw-r--r--lisp/fringe.el40
1 files changed, 39 insertions, 1 deletions
diff --git a/lisp/fringe.el b/lisp/fringe.el
index f9ddd87931f..ce207cc8517 100644
--- a/lisp/fringe.el
+++ b/lisp/fringe.el
@@ -35,6 +35,11 @@
;;; Code:
+(defgroup fringe nil
+ "Window fringes."
+ :version "21.4"
+ :group 'frames)
+
;; Standard fringe bitmaps
(defmacro fringe-bitmap-p (symbol)
@@ -156,7 +161,7 @@ you can use the interactive function `toggle-fringe'"
(cons :tag "Different left/right sizes"
(integer :tag "Left width")
(integer :tag "Right width")))
- :group 'frames
+ :group 'fringe
:require 'fringe
:initialize 'fringe-mode-initialize
:set 'set-fringe-mode-1)
@@ -252,6 +257,39 @@ SIDE must be the symbol `left' or `right'."
0)
(float (frame-char-width))))
+
+;;;###autoload
+(defcustom fringe-indicators nil
+ "Visually indicate buffer boundaries and scrolling.
+Setting this variable, changes `default-indicate-buffer-boundaries'."
+ :type '(choice (const :tag "No indicators" nil)
+ (const :tag "On left" left)
+ (const :tag "On right" right)
+ (const :tag "Opposite, no arrows" box)
+ (const :tag "Opposite, arrows right" mixed)
+ (const :tag "Empty lines" empty))
+ :group 'fringe
+ :require 'fringe
+ :set 'set-fringe-indicators-1)
+
+(defun set-fringe-indicators-1 (ignore value)
+ "Set fringe indicators according to VALUE.
+This is usually invoked when setting `fringe-indicators' via customize."
+ (setq fringe-indicators value)
+ (setq default-indicate-empty-lines nil)
+ (setq default-indicate-buffer-boundaries
+ (cond
+ ((memq value '(left right t))
+ value)
+ ((eq value 'box)
+ '((top . left) (bottom . right)))
+ ((eq value 'mixed)
+ '((top . left) (t . right)))
+ ((eq value 'empty)
+ (setq default-indicate-empty-lines t)
+ nil)
+ (t nil))))
+
(provide 'fringe)
;;; arch-tag: 6611ef60-0869-47ed-8b93-587ee7d3ff5d