Mercurial > emacs
comparison lisp/help.el @ 16694:c19089a334b2
(describe-mode): Include minor modes that aren't buffer local.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 16 Dec 1996 02:44:52 +0000 |
parents | 4ff6a0f0f5c7 |
children | 16e25f6a3725 |
comparison
equal
deleted
inserted
replaced
16693:9d008528c419 | 16694:c19089a334b2 |
---|---|
281 \(listed in `minor-mode-alist') must also be a function whose documentation | 281 \(listed in `minor-mode-alist') must also be a function whose documentation |
282 describes the minor mode." | 282 describes the minor mode." |
283 (interactive) | 283 (interactive) |
284 (with-output-to-temp-buffer "*Help*" | 284 (with-output-to-temp-buffer "*Help*" |
285 (let ((minor-modes minor-mode-alist) | 285 (let ((minor-modes minor-mode-alist) |
286 (first t) | 286 (first t)) |
287 (locals (buffer-local-variables))) | |
288 (while minor-modes | 287 (while minor-modes |
289 (let* ((minor-mode (car (car minor-modes))) | 288 (let* ((minor-mode (car (car minor-modes))) |
290 (indicator (car (cdr (car minor-modes)))) | 289 (indicator (car (cdr (car minor-modes))))) |
291 (local-binding (assq minor-mode locals))) | |
292 ;; Document a minor mode if it is listed in minor-mode-alist, | 290 ;; Document a minor mode if it is listed in minor-mode-alist, |
293 ;; bound locally in this buffer, non-nil, and has a function | 291 ;; bound locally in this buffer, non-nil, and has a function |
294 ;; definition. | 292 ;; definition. |
295 (if (and local-binding | 293 (if (and (symbol-value minor-mode) |
296 (cdr local-binding) | |
297 (fboundp minor-mode)) | 294 (fboundp minor-mode)) |
298 (let ((pretty-minor-mode minor-mode)) | 295 (let ((pretty-minor-mode minor-mode)) |
299 (if (string-match "-mode$" (symbol-name minor-mode)) | 296 (if (string-match "-mode$" (symbol-name minor-mode)) |
300 (setq pretty-minor-mode | 297 (setq pretty-minor-mode |
301 (capitalize | 298 (capitalize |