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: How do I find out what minor modes are in effect? Date: Wed, 11 Apr 2012 13:49:22 +0000 Message-ID: <495248DFDEA08C469BBDED2D4AA6C614425608@DAKIYA1.pegasus.local> 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 1334152104 31634 80.91.229.3 (11 Apr 2012 13:48:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 11 Apr 2012 13:48:24 +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 15:48:24 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 1SHxuG-0008P5-6I for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Apr 2012 15:48:20 +0200 Original-Received: from localhost ([::1]:55508 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHxuF-00020U-GS for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Apr 2012 09:48:19 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41880) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHxtS-0001NH-Rm for help-gnu-emacs@gnu.org; Wed, 11 Apr 2012 09:48:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SHxsv-0006NV-00 for help-gnu-emacs@gnu.org; Wed, 11 Apr 2012 09:47:30 -0400 Original-Received: from mailhost.shubertorg.com ([207.246.209.200]:38108 helo=webmail.shubertorg.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SHxsu-0006Ks-SX for help-gnu-emacs@gnu.org; Wed, 11 Apr 2012 09:46:56 -0400 Original-Received: from dakiya1.pegasus.local ([::1]) by DAKIYA1.pegasus.local ([::1]) with mapi id 14.01.0339.001; Wed, 11 Apr 2012 09:49:23 -0400 Thread-Topic: How do I find out what minor modes are in effect? Thread-Index: Ac0X6YvgSUHdmWx3SOWKJPesZ6+B9w== Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-hashedpuzzle: ATJW AbK4 AxCq BGKX BM+v B+4h Cnbn CxSV DqLm F+Vu GjZz G4jT HxqB JYQy JjXU KHGu; 1; aABlAGwAcAAtAGcAbgB1AC0AZQBtAGEAYwBzAEAAZwBuAHUALgBvAHIAZwA=; Sosha1_v1; 7; {7980561D-2F15-4EF1-B7CA-8E61B6189617}; ZABvAHUAZwBsAEAAcwBoAHUAYgBlAHIAdAB0AGkAYwBrAGUAdABpAG4AZwAuAGMAbwBtAA==; Wed, 11 Apr 2012 13:46:50 GMT; SABvAHcAIABkAG8AIABJACAAZgBpAG4AZAAgAG8AdQB0ACAAdwBoAGEAdAAgAG0AaQBuAG8AcgAgAG0AbwBkAGUAcwAgAGEAcgBlACAAaQBuACAAZQBmAGYAZQBjAHQAPwA= x-cr-puzzleid: {7980561D-2F15-4EF1-B7CA-8E61B6189617} 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:84424 Archived-At: I'm writing a function that needs to change the major mode to do its stuff = properly. That can turn off minor modes too. The obvious polite thing to do is turn them all back on when I'm done. Resetting the major mode is easy: (defun vertical-text (text) (let ((mode-to-restore major-mode) (picture-mode) ... (funcall mode-to-restore))) How do I find out what minor modes are in effect? And in what order they were invoked? (They can stomp on each other and=20 I'd rather not introduce bugs=20 that are different from what the user already expects. (Ultimately, I think this might be generally useful, so a function like (save-mode) might emerge.) ,Douglas Douglas Lewan Shubert Ticketing (201) 489-8600 ext 224