178 |
; Identify special modes. |
; Identify special modes. |
179 |
,(when parent |
,(when parent |
180 |
`(progn |
`(progn |
181 |
(if (get (quote ,parent) 'special) |
(if (get (quote ,parent) 'mode-class) |
182 |
(put (quote ,child) 'special t)) |
(put (quote ,child) 'mode-class |
183 |
|
(get (quote ,parent) 'mode-class))) |
184 |
; Set up maps and tables. |
; Set up maps and tables. |
185 |
(unless (keymap-parent ,map) |
(unless (keymap-parent ,map) |
186 |
(set-keymap-parent ,map (current-local-map))) |
(set-keymap-parent ,map (current-local-map))) |
210 |
"Find the class of a major MODE. |
"Find the class of a major MODE. |
211 |
A mode's class is the first ancestor which is NOT a derived mode. |
A mode's class is the first ancestor which is NOT a derived mode. |
212 |
Use the `derived-mode-parent' property of the symbol to trace backwards. |
Use the `derived-mode-parent' property of the symbol to trace backwards. |
213 |
Since major-modes might derive from each other and from `fundamental-mode', |
Since major-modes might all derive from `fundamental-mode', this function |
214 |
this function is not very useful. Use `derived-mode-p' instead." |
is not very useful." |
215 |
(while (get mode 'derived-mode-parent) |
(while (get mode 'derived-mode-parent) |
216 |
(setq mode (get mode 'derived-mode-parent))) |
(setq mode (get mode 'derived-mode-parent))) |
217 |
mode) |
mode) |
218 |
|
(make-obsolete 'derived-mode-class 'derived-mode-p "21.4") |
219 |
|
|
220 |
|
|
221 |
;;; PRIVATE |
;;; PRIVATE |