|
| From: | Kevin Rodgers |
| Subject: | Re: report-emacs-bug could also list current modes |
| Date: | Thu, 25 Sep 2003 08:55:43 -0600 |
| User-agent: | Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
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?
If you need it, you could write it yourself:
(defun buffer-mode-list ()
"Return a list of the current buffer's major mode and minor modes."
(interactive)
(let ((modes (cons major-mode
(apply 'nconc
(mapcar (lambda (key-value)
(let ((variable (car key-value)))
(if (and (boundp variable)
(symbol-value variable))
(list (symbol-name variable)))))
minor-mode-alist)))))
(if (interactive-p)
(message "%s" modes)
modes)))
I do apropos modes, and see things like "minor-modes" with no explanation of what they are doing there on a separate line: (apropos "modes" nil)K> Try: C-h a -mode\' OK, C-h a -mode$ looks simpler for me.
But won't return symbols with a newline in their name. :-) -- Kevin Rodgers
| [Prev in Thread] | Current Thread | [Next in Thread] |