Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
2768929d
Commit
2768929d
authored
Jun 28, 2002
by
Stefan Monnier
Browse files
(define-derived-mode): Preserve `mode-class' rather than `special' property.
(derived-mode-class): Make it obsolete.
parent
1aa1cb66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
lisp/derived.el
lisp/derived.el
+6
-4
No files found.
lisp/derived.el
View file @
2768929d
...
...
@@ -178,8 +178,9 @@ been generated automatically, with a reference to the keymap."
; Identify special modes.
,
(
when
parent
`
(
progn
(
if
(
get
(
quote
,
parent
)
'special
)
(
put
(
quote
,
child
)
'special
t
))
(
if
(
get
(
quote
,
parent
)
'mode-class
)
(
put
(
quote
,
child
)
'mode-class
(
get
(
quote
,
parent
)
'mode-class
)))
; Set up maps and tables.
(
unless
(
keymap-parent
,
map
)
(
set-keymap-parent
,
map
(
current-local-map
)))
...
...
@@ -209,11 +210,12 @@ been generated automatically, with a reference to the keymap."
"Find the class of a major MODE.
A mode's class is the first ancestor which is NOT a derived mode.
Use the `derived-mode-parent' property of the symbol to trace backwards.
Since major-modes might derive from
each other and from
`fundamental-mode',
this function
is not very useful.
Use `derived-mode-p' instead.
"
Since major-modes might
all
derive from `fundamental-mode',
this function
is not very useful."
(
while
(
get
mode
'derived-mode-parent
)
(
setq
mode
(
get
mode
'derived-mode-parent
)))
mode
)
(
make-obsolete
'derived-mode-class
'derived-mode-p
"21.4"
)
;;; PRIVATE
...
...
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