help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: header-line-format hacking


From: Stefan Monnier
Subject: Re: header-line-format hacking
Date: Tue, 01 Feb 2005 14:08:05 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux)

> 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 <package>.<module>.<function> 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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]