From: Doug Lewan <dougl@shubertticketing.com>
To: "help-gnu-emacs@gnu.org" <help-gnu-emacs@gnu.org>
Subject: RE: How do I find out what minor modes are in effect?
Date: Wed, 11 Apr 2012 14:28:11 +0000 [thread overview]
Message-ID: <495248DFDEA08C469BBDED2D4AA6C614425634@DAKIYA1.pegasus.local> (raw)
In-Reply-To: <81fwcacqu9.fsf@gmail.com>
>
> Doug Lewan <dougl@shubertticketing.com> writes:
>
> >
> > How do I find out what minor modes are in effect?
>
> Jambunathan K [kjambunathan@gmail.com] responded:
>
> This suggests that you can steal some code from the C-h k C-h m .
>
> M-x find-function RET describe-mode RET
>
A quick peek revealed this comment:
;; Document a minor mode if it is listed in minor-mode-alist,
;; non-nil, and has a function definition.
And about two minutes of reading and adapting got this code:
(let ((mode)
(result))
(dolist (mode minor-mode-list result)
(let ((fmode (or (get mode :minor-mode-function) mode)))
(if (and (boundp mode) (symbol-value mode) (fboundp fmode))
(push mode result))))
result)
I guess you should trust code more than documentation, said the embarassed programmer.
Thanks.
,Doug
next prev parent reply other threads:[~2012-04-11 14:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-11 13:49 How do I find out what minor modes are in effect? Doug Lewan
2012-04-11 13:58 ` Jambunathan K
2012-04-11 14:28 ` Doug Lewan [this message]
[not found] <mailman.1053.1334152093.20052.help-gnu-emacs@gnu.org>
2012-04-11 15:54 ` Pascal J. Bourguignon
2012-04-11 18:09 ` Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2012-04-12 11:49 Doug Lewan
[not found] <mailman.1140.1334231241.20052.help-gnu-emacs@gnu.org>
2012-04-12 13:33 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=495248DFDEA08C469BBDED2D4AA6C614425634@DAKIYA1.pegasus.local \
--to=dougl@shubertticketing.com \
--cc=help-gnu-emacs@gnu.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).