From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: header-line-format hacking Date: Tue, 01 Feb 2005 14:08:05 -0500 Organization: Bell Sympatico Message-ID: <87d5vkyw2s.fsf-monnier+gnu.emacs.help@gnu.org> References: <87pszl3772.fsf-monnier+gnu.emacs.help@gnu.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1107286096 31658 80.91.229.2 (1 Feb 2005 19:28:16 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 1 Feb 2005 19:28:16 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 01 20:28:16 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Cw3h5-0001zk-Rs for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Feb 2005 20:28:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Cw3u4-0006tM-94 for geh-help-gnu-emacs@m.gmane.org; Tue, 01 Feb 2005 14:41:36 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!news3.google.com!news.glorb.com!wn13feed!worldnet.att.net!207.35.177.252!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:DvjDSKJaCuw+uTFncygwQZDO+JY= Original-Lines: 27 Original-NNTP-Posting-Host: 67.71.119.41 Original-X-Complaints-To: abuse@sympatico.ca Original-X-Trace: news20.bellglobal.com 1107284886 67.71.119.41 (Tue, 01 Feb 2005 14:08:06 EST) Original-NNTP-Posting-Date: Tue, 01 Feb 2005 14:08:06 EST Original-Xref: shelby.stanford.edu gnu.emacs.help:128320 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org X-MailScanner-To: geh-help-gnu-emacs@m.gmane.org Xref: main.gmane.org gmane.emacs.help:23828 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:23828 > One minor mode attempts to display the current 'class' that point is in -- > similar to what which-function-mode does for functions [1]. On my system, > there doesn't seem to be enough space to display this in the mode line -- > especially when which-function-mode is active. Hmm... I've used the .. format in SML (by setting which-func-functions) without any problem of mode-line space. But yes, mode-line space can be hard to come by, especially if you have lots of minor modes. > Needless to say, I'd like to use both of these modes at the same time -- > which is what prompted my question. I think you'll have to do it all by hand. Something like (define-minor-mode my-foo-mode "haha" (cond (my-foo-mode (unless header-line-format (setq header-line-format '(""))) (add-to-list 'header-line-format 'my-foo-format 'append)) (t (setq header-line-format (delq 'my-foo-format header-line-format)) (if (equal header-line-format '("")) (setq header-line-format nil))))) -- Stefan