[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unnecessary fringe-indicators defcustom creates trouble
From: |
Richard M. Stallman |
Subject: |
Re: unnecessary fringe-indicators defcustom creates trouble |
Date: |
Sun, 31 Jul 2005 20:45:22 -0400 |
`indicate-empty-lines' is already a defcustomed variable (actually set
in startup.el). `indicate-buffer-boundaries' is not, but it should be
and the patches below make it customizable through startup.el.
That sounds like a good idea. Your change in cus-start.el is a good one
(assuming the details are right--I will take your word for that).
Once
this is done, there is no longer any need for the annoying
fringe-indicators variable.
The reason for this is to make it simple to request the usual options.
This is the right thing for the menu bar.
But I agree it shouldn't get in the way of setting the other variables
directly, if you want to do that. So I propose this change.
(I will also change the doc strings of default-indicate-empty-lines
and default-indicate-buffer-boundaries.)
*** fringe.el 10 Jul 2005 13:00:16 -0400 1.20
--- fringe.el 30 Jul 2005 20:30:12 -0400
***************
*** 269,298 ****
"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))))
;;;###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)
--- 269,304 ----
"Set fringe indicators according to VALUE.
This is usually invoked when setting `fringe-indicators' via customize."
(setq fringe-indicators value)
! (unless (eq fringe-indicators 'other)
! (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)))))
;;;###autoload
(defcustom fringe-indicators nil
"Visually indicate buffer boundaries and scrolling.
! Setting this variable changes `default-indicate-buffer-boundaries'
! and `default-indicate-empty-lines'.
! The value `other' means don't set them at all;
! if you use that value, you can customize
! those individual variables directly."
: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)
! (const :tag "Other" other))
:group 'fringe
:require 'fringe
:set 'set-fringe-indicators-1)