From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.devel Subject: Re: Customize fringe Date: Sat, 11 May 2002 11:14:46 +0200 Sender: emacs-devel-admin@gnu.org Message-ID: References: <877kmd7bf5.fsf@tc-1-100.kawasaki.gol.ne.jp> <9003-Thu09May2002210730+0300-eliz@is.elta.co.il> <200205091835.g49IZDZ17232@rum.cs.yale.edu> <200205092118.g49LIsR17755@rum.cs.yale.edu> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1021108703 15236 127.0.0.1 (11 May 2002 09:18:23 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 11 May 2002 09:18:23 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 176T1C-0003xW-00 for ; Sat, 11 May 2002 11:18:22 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 176TAh-0003Pc-00 for ; Sat, 11 May 2002 11:28:12 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 176T0x-000642-00; Sat, 11 May 2002 05:18:07 -0400 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net ([217.13.230.178] helo=yxa.extundo.com) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 176Sy7-0005z1-00 for ; Sat, 11 May 2002 05:15:11 -0400 Original-Received: from latte-eth2-dhcp128.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.3/8.12.3) with ESMTP id g4B9F95p022831; Sat, 11 May 2002 11:15:10 +0200 Original-To: Pavel@Janik.cz (Pavel =?iso-8859-2?q?Jan=EDk?=) In-Reply-To: (Pavel@Janik.cz's message of "Sat, 11 May 2002 10:16:28 +0200") Mail-Copies-To: nobody Original-Lines: 98 User-Agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2.50 (i686-pc-linux-gnu) X-MIME-Autoconverted: from 8bit to quoted-printable by yxa.extundo.com id g4B9F95p022831 Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.9 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:3836 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:3836 Pavel@Janik.cz (Pavel Jan=EDk) writes: > > > ;;; fringe.el --- window system-independent fringe support > > I like it. Can you think of an interface to this in Show/Hide menu? Wha= t > 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 specifyin= g > > 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)))))) =20 +(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-ba= r")) =20 (define-key menu-bar-showhide-scroll-bar-menu [right]