From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Doug Lewan Newsgroups: gmane.emacs.help Subject: RE: How do I find out what minor modes are in effect? Date: Wed, 11 Apr 2012 14:28:11 +0000 Message-ID: <495248DFDEA08C469BBDED2D4AA6C614425634@DAKIYA1.pegasus.local> References: <495248DFDEA08C469BBDED2D4AA6C614425608@DAKIYA1.pegasus.local> <81fwcacqu9.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1334154449 19631 80.91.229.3 (11 Apr 2012 14:27:29 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 11 Apr 2012 14:27:29 +0000 (UTC) To: "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 11 16:27:26 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SHyW3-0000s0-Ha for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Apr 2012 16:27:23 +0200 Original-Received: from localhost ([::1]:51839 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHyW2-00046i-SW for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Apr 2012 10:27:22 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:49886) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHyVB-0003oy-Ks for help-gnu-emacs@gnu.org; Wed, 11 Apr 2012 10:27:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHyUU-0007h1-5p for help-gnu-emacs@gnu.org; Wed, 11 Apr 2012 10:26:29 -0400 Original-Received: from webmail.shubertorg.com ([207.246.209.200]:10816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHyUT-0007fF-Ne for help-gnu-emacs@gnu.org; Wed, 11 Apr 2012 10:25:45 -0400 Original-Received: from dakiya1.pegasus.local ([::1]) by DAKIYA1.pegasus.local ([::1]) with mapi id 14.01.0339.001; Wed, 11 Apr 2012 10:28:12 -0400 Thread-Topic: How do I find out what minor modes are in effect? Thread-Index: Ac0X6YvgSUHdmWx3SOWKJPesZ6+B9wAAhMXLAACsEGA= In-Reply-To: <81fwcacqu9.fsf@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-hashedpuzzle: ASrL AVGF CMx+ CV8s EQtu FXhK Gsx3 HVqh H8Mx ID6v IFw0 INGf Iw8t JebD KSg7 Kj34; 1; aABlAGwAcAAtAGcAbgB1AC0AZQBtAGEAYwBzAEAAZwBuAHUALgBvAHIAZwA=; Sosha1_v1; 7; {1D088BB1-D6F2-4787-B8DF-BD8883F1E263}; ZABvAHUAZwBsAEAAcwBoAHUAYgBlAHIAdAB0AGkAYwBrAGUAdABpAG4AZwAuAGMAbwBtAA==; Wed, 11 Apr 2012 14:25:39 GMT; UgBFADoAIABIAG8AdwAgAGQAbwAgAEkAIABmAGkAbgBkACAAbwB1AHQAIAB3AGgAYQB0ACAAbQBpAG4AbwByACAAbQBvAGQAZQBzACAAYQByAGUAIABpAG4AIABlAGYAZgBlAGMAdAA/AA== x-cr-puzzleid: {1D088BB1-D6F2-4787-B8DF-BD8883F1E263} x-originating-ip: [10.0.21.202] X-detected-operating-system: by eggs.gnu.org: Windows XP/2000 (RFC1323+, w+, tstamp-) X-Received-From: 207.246.209.200 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:84426 Archived-At: >=20 > Doug Lewan writes: >=20 > > > > How do I find out what minor modes are in effect? >=20 > Jambunathan K [kjambunathan@gmail.com] responded: >=20 > This suggests that you can steal some code from the C-h k C-h m . >=20 > M-x find-function RET describe-mode RET >=20 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