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
507fb916
Commit
507fb916
authored
Aug 10, 1995
by
Simon Marshall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Font Lock mode support.
parent
32fad956
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
lisp/help.el
lisp/help.el
+21
-0
No files found.
lisp/help.el
View file @
507fb916
...
...
@@ -89,6 +89,25 @@
(
define-key
help-map
"q"
'help-quit
)
(
defvar
help-font-lock-keywords
(
let
((
name-char
"[-+a-zA-Z0-9_*]"
)
(
sym-char
"[-+a-zA-Z0-9_:*]"
))
(
list
;;
;; The symbol itself.
(
list
(
concat
"\\`\\("
name-char
"+\\)\\(:\\)?"
)
'
(
1
(
if
(
match-beginning
2
)
font-lock-function-name-face
font-lock-variable-name-face
)
nil
t
))
;;
;; Words inside `' which tend to be symbol names.
(
list
(
concat
"`\\("
sym-char
sym-char
"+\\)'"
)
1
'font-lock-reference-face
t
)
;;
;; CLisp `:' keywords as references.
(
list
(
concat
"\\<:"
sym-char
"+\\>"
)
0
font-lock-reference-face
t
)))
"Default expressions to highlight in Help mode."
)
(
defun
help-mode
()
"Major mode for viewing help text.
Entry to this mode runs the normal hook `help-mode-hook'.
...
...
@@ -99,6 +118,8 @@ Commands:
(
use-local-map
help-mode-map
)
(
setq
mode-name
"Help"
)
(
setq
major-mode
'help-mode
)
(
make-local-variable
'font-lock-defaults
)
(
setq
font-lock-defaults
'
(
help-font-lock-keywords
))
(
run-hooks
'help-mode-hook
))
(
defun
help-quit
()
...
...
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