From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Matt Hodges Newsgroups: gmane.emacs.devel Subject: Mode-line customization. Date: Wed, 05 May 2004 08:16:35 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <1z3c6f738s.fsf@tcdec3.bham.ac.uk> Reply-To: Matt Hodges NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: sea.gmane.org 1083742226 6692 80.91.224.253 (5 May 2004 07:30:26 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 5 May 2004 07:30:26 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed May 05 09:30:18 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BLGrB-0001nW-00 for ; Wed, 05 May 2004 09:30:17 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BLGrB-0004Fv-00 for ; Wed, 05 May 2004 09:30:17 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BLGmo-0005cy-KG for emacs-devel@quimby.gnus.org; Wed, 05 May 2004 03:25:46 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BLGmY-0005Xl-Br for emacs-devel@gnu.org; Wed, 05 May 2004 03:25:30 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BLGdx-0000rg-QS for emacs-devel@gnu.org; Wed, 05 May 2004 03:17:10 -0400 Original-Received: from [147.188.128.145] (helo=sun13.bham.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BLGdx-0000r2-Co for emacs-devel@gnu.org; Wed, 05 May 2004 03:16:37 -0400 Original-Received: from [147.188.128.127] (helo=bham.ac.uk) by sun13.bham.ac.uk with esmtp (Exim 4.10) id 1BLGdv-0004Xi-00 for emacs-devel@gnu.org; Wed, 05 May 2004 08:16:35 +0100 Original-Received: from sun7.bham.ac.uk ([147.188.128.108]) by bham.ac.uk with esmtp (Exim 4.24) id 1BLGdv-0005vc-O0; Wed, 05 May 2004 08:16:35 +0100 Original-Received: from tcdec3.bham.ac.uk ([147.188.105.127]) by sun7.bham.ac.uk with esmtp (Exim 3.16 #1) id 1BLGdv-0002ne-00; Wed, 05 May 2004 08:16:35 +0100 Original-Received: from matt by tcdec3.bham.ac.uk with local (Exim 4.32) id 1BLGdv-0004tp-41; Wed, 05 May 2004 08:16:35 +0100 Original-To: emacs-devel@gnu.org User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22789 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22789 --=-=-= This patch might appeal to people migrating from XEmacs, who want to colourise their mode lines. It might be nice to have these faces available, even if they're not visibly different from mode-line, by default. Matt --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=mode-line.patch Content-Description: Patch adding faces to modeline. cvs server: Diffing lisp Index: lisp/bindings.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/bindings.el,v retrieving revision 1.130 diff -u -r1.130 bindings.el --- lisp/bindings.el 1 May 2004 03:50:24 -0000 1.130 +++ lisp/bindings.el 4 May 2004 22:36:46 -0000 @@ -303,10 +303,12 @@ (list (propertize "%[(" 'help-echo help-echo) `(:propertize ("" mode-name) + face mode-line-major-mode help-echo "mouse-2: help for current major mode" local-map ,mode-line-major-mode-keymap) '("" mode-line-process) `(:propertize ("" minor-mode-alist) + face mode-line-minor-mode help-echo "mouse-2: help for minor modes, mouse-3: minor mode menu" local-map ,mode-line-minor-mode-keymap) (propertize "%n" 'help-echo "mouse-2: widen" Index: lisp/faces.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/faces.el,v retrieving revision 1.283 diff -u -r1.283 faces.el --- lisp/faces.el 26 Mar 2004 15:12:33 -0000 1.283 +++ lisp/faces.el 4 May 2004 22:36:46 -0000 @@ -1828,9 +1828,31 @@ :group 'modeline :group 'basic-faces) +(defface mode-line-major-mode + '((((type x w32 mac) (class color)) + :foreground "red") + (t + :background "red")) + "Face used to indicate `major-mode' in the mode line." + :version "21.4" + :group 'modeline + :group 'basic-faces) + +(defface mode-line-minor-mode + '((((type x w32 mac) (class color)) + :foreground "green4") + (t + :background "green")) + "Face used to indicate minor modes in the mode line." + :version "21.4" + :group 'modeline + :group 'basic-faces) + ;; Make `modeline' an alias for `mode-line', for compatibility. (put 'modeline 'face-alias 'mode-line) (put 'modeline-inactive 'face-alias 'mode-line-inactive) +(put 'modeline-major-mode 'face-alias 'mode-line-major-mode) +(put 'modeline-minor-mode 'face-alias 'mode-line-minor-mode) (defface header-line '((t cvs server: Diffing lisp/calc cvs server: Diffing lisp/calendar cvs server: Diffing lisp/emacs-lisp cvs server: Diffing lisp/emulation cvs server: Diffing lisp/eshell cvs server: Diffing lisp/gnus cvs server: Diffing lisp/international cvs server: Diffing lisp/language cvs server: Diffing lisp/mail cvs server: Diffing lisp/mh-e cvs server: Diffing lisp/net cvs server: Diffing lisp/obsolete cvs server: Diffing lisp/play cvs server: Diffing lisp/progmodes cvs server: Diffing lisp/term cvs server: Diffing lisp/textmodes cvs server: Diffing lisp/toolbar cvs server: Diffing lisp/url --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://mail.gnu.org/mailman/listinfo/emacs-devel --=-=-=--