[Top][All Lists]

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

Re: Style in elisp: how to show a flag value in the modeline?

From: François Fleuret
Subject: Re: Style in elisp: how to show a flag value in the modeline?
Date: 20 Feb 2003 13:45:46 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2


Kai Großjohann wrote on 20 Feb 2003 12:46:28 MET:

> Maybe minor-mode-alist is the right pointer?

I added

(setq minor-mode-alist
  (assq-delete-all 'mp3play-auto-mode minor-mode-alist))

in a function called by kill-buffer-hook, and

(setq minor-mode-alist
  (cons  '(mp3play-auto-mode " auto-play") minor-mode-alist))

in the initialization. Also, (force-mode-line-update) when the flag is
flipped. Is that the right way to go ? Using minor-mode-alist wihout
having defined a minor-mode ?

I still wonder a bit on two points. First, this variable is not
buffer-local, thus the flag appears in all buffers (on the other hand
I want the other monior mode to appear in my mp3play buffer.) Also to
avoid to add twice the same assoc in the list, should I ensure that
myself, or can it be handled in a smart way by the alist artillerie ?

Sorry for those questions, but I really have a hard time getting a
feeling on how things "should be" written in elisp.



reply via email to

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