[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Customize fringe
From: |
Simon Josefsson |
Subject: |
Re: Customize fringe |
Date: |
Sat, 11 May 2002 11:14:46 +0200 |
User-agent: |
Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2.50 (i686-pc-linux-gnu) |
address@hidden (Pavel Janík) writes:
> > > ;;; fringe.el --- window system-independent fringe support
>
> I like it. Can you think of an interface to this in Show/Hide menu? What
> about this:
>
> Show/Hide -> Fringe -> Default
> None
> Only Right
> Only Left
> Customize (link to Customize buffer)
>
> Can you implement it when we all agree on it?
The patch below does this (fringe.el as posted previously is needed as
well).
I think it looks good in the menu, but I also think there is no
consensus on doing anything.
> > This variable can be nil (the default) meaning the fringes should have
> > the default width (8 pixels), it can be an integer value specifying
>
> I though that the default width of fringe is dependant on the font
> used. Can you please check this?
It says 8 pixels in NEWS.
--- menu-bar.el.~1.217.~ Fri May 10 22:10:18 2002
+++ menu-bar.el Sat May 11 11:00:54 2002
@@ -583,7 +583,7 @@
;; These are set with `customize-set-variable'.
(dolist (elt '(line-number-mode column-number-mode scroll-bar-mode
debug-on-quit debug-on-error menu-bar-mode tool-bar-mode
- save-place uniquify-buffer-name-style
+ save-place uniquify-buffer-name-style fringe-mode
case-fold-search cua-mode show-paren-mode
transient-mark-mode global-font-lock-mode
display-time-mode auto-compression-mode
@@ -653,6 +653,57 @@
(frame-visible-p
(symbol-value 'speedbar-frame))))))
+(setq menu-bar-showhide-fringe-menu (make-sparse-keymap "Fringe"))
+
+(define-key menu-bar-showhide-fringe-menu [customize]
+ '(menu-item "Customize"
+ (lambda ()
+ (interactive)
+ (customize-variable 'fringe-mode))
+ :help "Detailed customization of fringe"
+ :visible (display-graphic-p)))
+
+(define-key menu-bar-showhide-fringe-menu [default]
+ '(menu-item "Default"
+ (lambda ()
+ (interactive)
+ (customize-set-variable 'fringe-mode nil))
+ :help "Default width fringe on both left and right side"
+ :visible (display-graphic-p)
+ :button (:radio . (eq fringe-mode nil))))
+
+(define-key menu-bar-showhide-fringe-menu [left]
+ '(menu-item "On the Left"
+ (lambda ()
+ (interactive)
+ (customize-set-variable 'fringe-mode '(nil . 0)))
+ :help "Fringe only on the left side"
+ :visible (display-graphic-p)
+ :button (:radio . (equal fringe-mode '(nil . 0)))))
+
+(define-key menu-bar-showhide-fringe-menu [right]
+ '(menu-item "On the Right"
+ (lambda ()
+ (interactive)
+ (customize-set-variable 'fringe-mode '(0 . nil)))
+ :help "Fringe only on the right side"
+ :visible (display-graphic-p)
+ :button (:radio . (equal fringe-mode '(0 . nil)))))
+
+(define-key menu-bar-showhide-fringe-menu [none]
+ '(menu-item "None"
+ (lambda ()
+ (interactive)
+ (customize-set-variable 'fringe-mode 0))
+ :help "Turn off fringe"
+ :visible (display-graphic-p)
+ :button (:radio . (eq fringe-mode 0))))
+
+(define-key menu-bar-showhide-menu [showhide-fringe]
+ (list 'menu-item "Fringe" menu-bar-showhide-fringe-menu
+ :visible `(display-graphic-p)
+ :help "Select fringe mode"))
+
(defvar menu-bar-showhide-scroll-bar-menu (make-sparse-keymap "Scroll-bar"))
(define-key menu-bar-showhide-scroll-bar-menu [right]
- Re: Customize fringe, (continued)
Re: Customize fringe, Eli Zaretskii, 2002/05/09
- Re: Customize fringe, Stefan Monnier, 2002/05/09
- Re: Customize fringe, Simon Josefsson, 2002/05/09
- Re: Customize fringe, Stefan Monnier, 2002/05/09
- Re: Customize fringe, Simon Josefsson, 2002/05/09
- Re: Customize fringe, Simon Josefsson, 2002/05/09
- Re: Customize fringe, Pavel Janík, 2002/05/11
- Re: Customize fringe,
Simon Josefsson <=
- Re: Customize fringe, Eli Zaretskii, 2002/05/11
- Re: Customize fringe, Simon Josefsson, 2002/05/11
Re: Customize fringe, Kim F. Storm, 2002/05/11
Re: Customize fringe, Richard Stallman, 2002/05/11
Re: Customize fringe, Kim F. Storm, 2002/05/09