Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
7192540b
Commit
7192540b
authored
Apr 15, 1994
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(describe-mode): Fix previous change.
parent
ad023904
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
27 deletions
+26
-27
lisp/help.el
lisp/help.el
+26
-27
No files found.
lisp/help.el
View file @
7192540b
...
...
@@ -173,34 +173,33 @@ If FUNCTION is nil, applies `message' to it, thus printing it."
For this to work correctly for a minor mode, the mode's indicator variable
\(listed in `minor-mode-alist') must also be a function whose documentation
describes the minor mode."
(
interactive
"p"
)
(
interactive
)
(
with-output-to-temp-buffer
"*Help*"
(
if
minor
(
let
((
minor-modes
minor-mode-alist
)
(
locals
(
buffer-local-variables
)))
(
while
minor-modes
(
let*
((
minor-mode
(
car
(
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,
;; bound locally in this buffer, non-nil, and has a function
;; definition.
(
if
(
and
local-binding
(
cdr
local-binding
)
(
fboundp
minor-mode
))
(
let
((
pretty-minor-mode
minor-mode
))
(
if
(
string-match
"-mode$"
(
symbol-name
minor-mode
))
(
setq
pretty-minor-mode
(
capitalize
(
substring
(
symbol-name
minor-mode
)
0
(
match-beginning
0
)))))
(
while
(
and
indicator
(
symbolp
indicator
))
(
setq
indicator
(
symbol-value
indicator
)))
(
princ
(
format
"%s minor mode (indicator%s):\n"
pretty-minor-mode
indicator
))
(
princ
(
documentation
minor-mode
))
(
princ
"\n\n"
))))
(
setq
minor-modes
(
cdr
minor-modes
)))))
(
let
((
minor-modes
minor-mode-alist
)
(
locals
(
buffer-local-variables
)))
(
while
minor-modes
(
let*
((
minor-mode
(
car
(
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,
;; bound locally in this buffer, non-nil, and has a function
;; definition.
(
if
(
and
local-binding
(
cdr
local-binding
)
(
fboundp
minor-mode
))
(
let
((
pretty-minor-mode
minor-mode
))
(
if
(
string-match
"-mode$"
(
symbol-name
minor-mode
))
(
setq
pretty-minor-mode
(
capitalize
(
substring
(
symbol-name
minor-mode
)
0
(
match-beginning
0
)))))
(
while
(
and
indicator
(
symbolp
indicator
))
(
setq
indicator
(
symbol-value
indicator
)))
(
princ
(
format
"%s minor mode (indicator%s):\n"
pretty-minor-mode
indicator
))
(
princ
(
documentation
minor-mode
))
(
princ
"\n\n"
))))
(
setq
minor-modes
(
cdr
minor-modes
))))
(
princ
mode-name
)
(
princ
" mode:\n"
)
(
princ
(
documentation
major-mode
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment