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

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

describe-mode should first summarize all modes in effect


From: Dan Jacobson
Subject: describe-mode should first summarize all modes in effect
Date: Sat, 27 Sep 2003 12:59:57 +0800
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Indeed, emacs lacks a command to show concisely what all those mode
abbreviations crammed in the modeline stand for.  There should be a
function explain-modeline-modes, that puts them in the minibuffer.
Kevin's function below could be enhanced to do that.

Better yet, have describe-mode output Kevin's  list at the top of its
output, before getting mired in detail.

K> Dan Jacobson wrote:
>>>> By the way, aside from blabberous describe-mode, and staring at the
>>>> mode line, where is a concise list of the current modes in effect?
>>>> There is no list-modes, show-modes, etc.
K> C-x C-b (list-buffers) shows each buffer's major mode.
>> I meant a list of all the modes in effect for this buffer.  Yes,
>> there
>> they are mostly in the modeline, but how about a lisp list?


K> If you need it, you could write it yourself:

K> (defun buffer-mode-list ()
K>    "Return a list of the current buffer's major mode and minor modes."
K>    (interactive)
K>    (let ((modes (cons major-mode
K>                       (apply 'nconc
K>                              (mapcar (lambda (key-value)
K>                                        (let ((variable (car key-value)))
K>                                          (if (and (boundp variable)
K>                                                   (symbol-value variable))
K>                                              (list (symbol-name variable)))))
K>                                      minor-mode-alist)))))
K>      (if (interactive-p)
K>          (message "%s" modes)
K>        modes)))




reply via email to

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