aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2001-12-12 09:29:20 +0000
committerRichard M. Stallman2001-12-12 09:29:20 +0000
commit0ee25e8e37b5c57a7e8d2e526c189cbf0c5239a6 (patch)
tree3c80ae098dd57b6fb08cb38dda5d9acd251b453a
parent31ca596b970d838877353b06df675c7a4fdeddb2 (diff)
downloademacs-0ee25e8e37b5c57a7e8d2e526c189cbf0c5239a6.tar.gz
emacs-0ee25e8e37b5c57a7e8d2e526c189cbf0c5239a6.zip
(derived-mode-p): Function moved to subr.el.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/derived.el11
2 files changed, 4 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1821419e666..d505d475b04 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,9 @@
12001-12-11 Richard M. Stallman <rms@gnu.org> 12001-12-11 Richard M. Stallman <rms@gnu.org>
2 2
3 * derived.el (derived-mode-p): Function moved to subr.el.
4
5 * subr.el (derived-mode-p): Moved here from derived.el.
6
3 * international/mule.el (set-auto-coding): Use set-auto-mode-1. 7 * international/mule.el (set-auto-coding): Use set-auto-mode-1.
4 8
5 * files.el (set-auto-mode-1): New subroutine, broken out of 9 * files.el (set-auto-mode-1): New subroutine, broken out of
diff --git a/lisp/derived.el b/lisp/derived.el
index 3e899c09fea..3586affe216 100644
--- a/lisp/derived.el
+++ b/lisp/derived.el
@@ -203,17 +203,6 @@ been generated automatically, with a reference to the keymap."
203 ; Run the hooks, if any. 203 ; Run the hooks, if any.
204 (run-mode-hooks ',hook))))) 204 (run-mode-hooks ',hook)))))
205 205
206;; PUBLIC: find if the current mode derives from another.
207
208;;;###autoload
209(defun derived-mode-p (&rest modes)
210 "Non-nil if the current major mode is derived from one of MODES.
211Uses the `derived-mode-parent' property of the symbol to trace backwards."
212 (let ((parent major-mode))
213 (while (and (not (memq parent modes))
214 (setq parent (get parent 'derived-mode-parent))))
215 parent))
216
217;; PUBLIC: find the ultimate class of a derived mode. 206;; PUBLIC: find the ultimate class of a derived mode.
218 207
219(defun derived-mode-class (mode) 208(defun derived-mode-class (mode)