From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Francis Litterio Newsgroups: gmane.emacs.devel Subject: PATCH: Don't mix faces in Buffer-menu header when Buffer-menu-use-header is nil Date: Wed, 09 Jun 2004 14:10:21 -0400 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1086806843 26811 80.91.224.253 (9 Jun 2004 18:47:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 9 Jun 2004 18:47:23 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Wed Jun 09 20:47:16 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 1BY86V-00041G-00 for ; Wed, 09 Jun 2004 20:47:15 +0200 Original-Received: from lists.gnu.org ([199.232.76.165]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BY86U-0006Ds-00 for ; Wed, 09 Jun 2004 20:47:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BY878-0004qr-J1 for emacs-devel@quimby.gnus.org; Wed, 09 Jun 2004 14:47:54 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1BY86d-0004ce-3K for emacs-devel@gnu.org; Wed, 09 Jun 2004 14:47:23 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1BY86b-0004c4-SC for emacs-devel@gnu.org; Wed, 09 Jun 2004 14:47:22 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1BY86b-0004bw-Me for emacs-devel@gnu.org; Wed, 09 Jun 2004 14:47:21 -0400 Original-Received: from [192.74.137.143] (helo=TheWorld.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1BY85G-0001qi-Jz for emacs-devel@gnu.org; Wed, 09 Jun 2004 14:45:58 -0400 Original-Received: from shell.TheWorld.com (root@shell01.theworld.com [192.74.137.71]) by TheWorld.com (8.12.8p1/8.12.8) with ESMTP id i59Ij1Fw003127 for ; Wed, 9 Jun 2004 14:45:34 -0400 Original-Received: from lt371-fran.theworld.com (shell01-g [192.74.137.71]) by shell.TheWorld.com (8.9.3/8.9.3) with ESMTP id OAA6598126 for ; Wed, 9 Jun 2004 14:16:39 -0400 (EDT) Original-To: emacs-devel@gnu.org X-Random-Quote: Martyrdom is the only way in which a man can become famous without ability. -- George Bernard Shaw User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (windows-nt) 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:24778 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:24778 The below patch causes the Buffer-menu header to have a consistent face for all characters when Buffer-menu-use-header is set to nil. I was motivated to make this change after setting Buffer-menu-use-header to nil and noticing that the mixture of text having 'fixed-pitch face with text having my personal default face (the X windows 6x10 font) made the header look bad. I hope the Emacs developer community finds this useful. -- Francis Litterio franl@world.std.com http://world.std.com/~franl/ GPG and PGP public keys available on keyservers. --- buff-menu.el.~1.66.~ 2004-03-31 20:23:36.000000000 -0500 +++ buff-menu.el 2004-06-09 14:09:36.071049600 -0400 @@ -606,7 +606,10 @@ (let* ((old-buffer (current-buffer)) (standard-output standard-output) (mode-end (make-string (- Buffer-menu-mode-width 2) ? )) - (header (concat " " (propertize "CRM " 'face 'fixed-pitch) + (header (concat (if Buffer-menu-use-header-line " ") + (if Buffer-menu-use-header-line + (propertize "CRM " 'face 'fixed-pitch) + "CRM ") (Buffer-menu-buffer+size (Buffer-menu-make-sort-button "Buffer" 2) (Buffer-menu-make-sort-button "Size" 3)) @@ -629,7 +632,7 @@ (erase-buffer) (setq standard-output (current-buffer)) (unless Buffer-menu-use-header-line - (insert header (propertize "---" 'face 'fixed-pitch) " ") + (insert header "--- ") (insert (Buffer-menu-buffer+size "------" "----")) (insert " ----" mode-end "----\n") (put-text-property 1 (point) 'intangible t))