aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2004-11-28 00:56:28 +0000
committerKim F. Storm2004-11-28 00:56:28 +0000
commit41e1c123587ee657a3ab9db4c9594d1e12cb54ee (patch)
treed26bb64a23d12a227ac10cb58c48ac802aa6823b
parent4cf6519d50c4ff6f2f214ec15729506b5939a190 (diff)
downloademacs-41e1c123587ee657a3ab9db4c9594d1e12cb54ee.tar.gz
emacs-41e1c123587ee657a3ab9db4c9594d1e12cb54ee.zip
(fringe): New defgroup.
(fringe-mode): Move to fringe group. (fringe-indicators): New defcustom. (set-fringe-indicators-1): New defun.
-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 @@
35 35
36;;; Code: 36;;; Code:
37 37
38(defgroup fringe nil
39 "Window fringes."
40 :version "21.4"
41 :group 'frames)
42
38;; Standard fringe bitmaps 43;; Standard fringe bitmaps
39 44
40(defmacro fringe-bitmap-p (symbol) 45(defmacro fringe-bitmap-p (symbol)
@@ -156,7 +161,7 @@ you can use the interactive function `toggle-fringe'"
156 (cons :tag "Different left/right sizes" 161 (cons :tag "Different left/right sizes"
157 (integer :tag "Left width") 162 (integer :tag "Left width")
158 (integer :tag "Right width"))) 163 (integer :tag "Right width")))
159 :group 'frames 164 :group 'fringe
160 :require 'fringe 165 :require 'fringe
161 :initialize 'fringe-mode-initialize 166 :initialize 'fringe-mode-initialize
162 :set 'set-fringe-mode-1) 167 :set 'set-fringe-mode-1)
@@ -252,6 +257,39 @@ SIDE must be the symbol `left' or `right'."
252 0) 257 0)
253 (float (frame-char-width)))) 258 (float (frame-char-width))))
254 259
260
261;;;###autoload
262(defcustom fringe-indicators nil
263 "Visually indicate buffer boundaries and scrolling.
264Setting this variable, changes `default-indicate-buffer-boundaries'."
265 :type '(choice (const :tag "No indicators" nil)
266 (const :tag "On left" left)
267 (const :tag "On right" right)
268 (const :tag "Opposite, no arrows" box)
269 (const :tag "Opposite, arrows right" mixed)
270 (const :tag "Empty lines" empty))
271 :group 'fringe
272 :require 'fringe
273 :set 'set-fringe-indicators-1)
274
275(defun set-fringe-indicators-1 (ignore value)
276 "Set fringe indicators according to VALUE.
277This is usually invoked when setting `fringe-indicators' via customize."
278 (setq fringe-indicators value)
279 (setq default-indicate-empty-lines nil)
280 (setq default-indicate-buffer-boundaries
281 (cond
282 ((memq value '(left right t))
283 value)
284 ((eq value 'box)
285 '((top . left) (bottom . right)))
286 ((eq value 'mixed)
287 '((top . left) (t . right)))
288 ((eq value 'empty)
289 (setq default-indicate-empty-lines t)
290 nil)
291 (t nil))))
292
255(provide 'fringe) 293(provide 'fringe)
256 294
257;;; arch-tag: 6611ef60-0869-47ed-8b93-587ee7d3ff5d 295;;; arch-tag: 6611ef60-0869-47ed-8b93-587ee7d3ff5d