all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: francois.fleuret@noos.fr (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	[thread overview]
Message-ID: <878ywbi0hx.fsf@noos.fr> (raw)
In-Reply-To: 84fzqjgoob.fsf@lucy.is.informatik.uni-duisburg.de

Hi,

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.

Regards,

FF

  reply	other threads:[~2003-02-20 12:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-20  9:50 Style in elisp: how to show a flag value in the modeline? François Fleuret
2003-02-20 11:46 ` Kai Großjohann
2003-02-20 12:45   ` François Fleuret [this message]
2003-02-20 17:26     ` Kai Großjohann
2003-02-20 17:26     ` Kai Großjohann
2003-02-21  8:57       ` François Fleuret
2003-02-21 17:54         ` Kai Großjohann
2003-02-21 18:07           ` François Fleuret
2003-02-21 20:41             ` Kai Großjohann
2003-02-21 21:18               ` François Fleuret
2003-02-21 21:59                 ` Kai Großjohann
2003-02-20 12:48 ` Oliver Scholz
2003-02-20 20:45 ` Stefan Monnier <foo@acm.com>

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878ywbi0hx.fsf@noos.fr \
    --to=francois.fleuret@noos.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.