mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-23 10:34:07 +00:00
(derived-mode-p): Function moved to subr.el.
This commit is contained in:
parent
31ca596b97
commit
0ee25e8e37
@ -1,5 +1,9 @@
|
||||
2001-12-11 Richard M. Stallman <rms@gnu.org>
|
||||
|
||||
* derived.el (derived-mode-p): Function moved to subr.el.
|
||||
|
||||
* subr.el (derived-mode-p): Moved here from derived.el.
|
||||
|
||||
* international/mule.el (set-auto-coding): Use set-auto-mode-1.
|
||||
|
||||
* files.el (set-auto-mode-1): New subroutine, broken out of
|
||||
|
@ -203,17 +203,6 @@ been generated automatically, with a reference to the keymap."
|
||||
; Run the hooks, if any.
|
||||
(run-mode-hooks ',hook)))))
|
||||
|
||||
;; PUBLIC: find if the current mode derives from another.
|
||||
|
||||
;;;###autoload
|
||||
(defun derived-mode-p (&rest modes)
|
||||
"Non-nil if the current major mode is derived from one of MODES.
|
||||
Uses the `derived-mode-parent' property of the symbol to trace backwards."
|
||||
(let ((parent major-mode))
|
||||
(while (and (not (memq parent modes))
|
||||
(setq parent (get parent 'derived-mode-parent))))
|
||||
parent))
|
||||
|
||||
;; PUBLIC: find the ultimate class of a derived mode.
|
||||
|
||||
(defun derived-mode-class (mode)
|
||||
|
Loading…
Reference in New Issue
Block a user