help-gnu-emacs
[Top][All Lists]
Advanced

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

How do I find out what minor modes are in effect?


From: Doug Lewan
Subject: How do I find out what minor modes are in effect?
Date: Wed, 11 Apr 2012 13:49:22 +0000

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 
I'd rather not introduce bugs 
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





reply via email to

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