info-gnus-english
[Top][All Lists]
Advanced

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

Re: Gnus and new mail notification


From: Tassilo Horn
Subject: Re: Gnus and new mail notification
Date: Sat, 25 Dec 2010 22:52:56 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Yuri D'Elia <wavexx@users.sf.net> writes:

Hi Yuri,

>> and you do something different (*desktop notification* instead of
>> *mode line* stuff)!
>
> gnus-desktop-notify? gnus-ext-notify?

I like the former, cause desktop notifications is the common term for
that kind of notifications.

>> How about making it a global minor mode?
>
> Any pointer in how to do that?
> I don't do elisp very often.

,----[ C-h f define-global-minor-mode RET ]
| define-global-minor-mode is an alias for `define-globalized-minor-mode' in
| `easy-mmode.el'.
| 
| (define-global-minor-mode GLOBAL-MODE MODE TURN-ON &rest KEYS)
| 
| Make a global mode GLOBAL-MODE corresponding to buffer-local minor MODE.
| TURN-ON is a function that will be called with no args in every buffer
|   and that should try to turn MODE on if applicable for that buffer.
| KEYS is a list of CL-style keyword arguments.  As the minor mode
|   defined by this function is always global, any :global keyword is
|   ignored.  Other keywords have the same meaning as in `define-minor-mode',
|   which see.  In particular, :group specifies the custom group.
|   The most useful keywords are those that are passed on to the
|   `defcustom'.  It normally makes no sense to pass the :lighter
|   or :keymap keywords to `define-globalized-minor-mode', since these
|   are usually passed to the buffer-local version of the minor mode.
| 
| If MODE's set-up depends on the major mode in effect when it was
| enabled, then disabling and reenabling MODE should make MODE work
| correctly with the current major mode.  This is important to
| prevent problems with derived modes, that is, major modes that
| call another major mode in their body.
`----

There's also an example in

,----[ (info "(elisp)Defining Minor Modes") ]
| The macro `define-minor-mode' offers a convenient way of implementing a
| mode in one self-contained definition.
`----

Bye,
Tassilo




reply via email to

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