Commit ddbe99e0 authored by Richard M. Stallman's avatar Richard M. Stallman
Browse files

(describe-mode): Include minor modes that aren't buffer local.

parent 99d15a7a
...@@ -283,17 +283,14 @@ describes the minor mode." ...@@ -283,17 +283,14 @@ describes the minor mode."
(interactive) (interactive)
(with-output-to-temp-buffer "*Help*" (with-output-to-temp-buffer "*Help*"
(let ((minor-modes minor-mode-alist) (let ((minor-modes minor-mode-alist)
(first t) (first t))
(locals (buffer-local-variables)))
(while minor-modes (while minor-modes
(let* ((minor-mode (car (car minor-modes))) (let* ((minor-mode (car (car minor-modes)))
(indicator (car (cdr (car minor-modes)))) (indicator (car (cdr (car minor-modes)))))
(local-binding (assq minor-mode locals)))
;; Document a minor mode if it is listed in minor-mode-alist, ;; Document a minor mode if it is listed in minor-mode-alist,
;; bound locally in this buffer, non-nil, and has a function ;; bound locally in this buffer, non-nil, and has a function
;; definition. ;; definition.
(if (and local-binding (if (and (symbol-value minor-mode)
(cdr local-binding)
(fboundp minor-mode)) (fboundp minor-mode))
(let ((pretty-minor-mode minor-mode)) (let ((pretty-minor-mode minor-mode))
(if (string-match "-mode$" (symbol-name minor-mode)) (if (string-match "-mode$" (symbol-name minor-mode))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment