diff options
author | Martin Rudalics <rudalics@gmx.at> | 2008-01-10 18:44:27 +0000 |
---|---|---|
committer | Martin Rudalics <rudalics@gmx.at> | 2008-01-10 18:44:27 +0000 |
commit | f78a91b3bda495d90731d2403229f18c3a5b1f26 (patch) | |
tree | fb966ac531b8cd88c647570cb0bfa124e525eeb2 /lisp/fringe.el | |
parent | ce460dceb2c8117f18615c4ff7b4371ed1d179dd (diff) | |
download | emacs-f78a91b3bda495d90731d2403229f18c3a5b1f26.tar.gz |
(fringe-mode-explicit): New variable.
(set-fringe-mode): Don't alter default-frame-alist when just
loading this file.
Diffstat (limited to 'lisp/fringe.el')
-rw-r--r-- | lisp/fringe.el | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/lisp/fringe.el b/lisp/fringe.el index e2eb5d2d98b..2762dbe617a 100644 --- a/lisp/fringe.el +++ b/lisp/fringe.el @@ -93,6 +93,10 @@ (defvar fringe-mode) +(defvar fringe-mode-explicit nil + "Non-nil means `set-fringe-mode' should really do something. +This is nil while loading `fringe.el', and t afterward.") + (defun set-fringe-mode-1 (ignore value) "Call `set-fringe-mode' with VALUE. See `fringe-mode' for valid values and their effect. @@ -104,13 +108,14 @@ This is usually invoked when setting `fringe-mode' via customize." See `fringe-mode' for possible values and their effect." (setq fringe-mode value) - (modify-all-frames-parameters - (list (cons 'left-fringe (if (consp fringe-mode) - (car fringe-mode) - fringe-mode)) - (cons 'right-fringe (if (consp fringe-mode) - (cdr fringe-mode) - fringe-mode))))) + (when fringe-mode-explicit + (modify-all-frames-parameters + (list (cons 'left-fringe (if (consp fringe-mode) + (car fringe-mode) + fringe-mode)) + (cons 'right-fringe (if (consp fringe-mode) + (cdr fringe-mode) + fringe-mode)))))) ;; For initialization of fringe-mode, take account of changes ;; made explicitly to default-frame-alist. @@ -159,6 +164,10 @@ you can use the interactive function `set-fringe-style'." :initialize 'fringe-mode-initialize :set 'set-fringe-mode-1) +;; We just set fringe-mode, but that was the default. +;; If it is set again, that is for real. +(setq fringe-mode-explicit t) + (defun fringe-query-style (&optional all-frames) "Query user for fringe style. Returns values suitable for left-fringe and right-fringe frame parameters. |