summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/derived.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp/derived.el')
-rw-r--r--lisp/emacs-lisp/derived.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/derived.el b/lisp/emacs-lisp/derived.el
index b35994364a7..dec5883767d 100644
--- a/lisp/emacs-lisp/derived.el
+++ b/lisp/emacs-lisp/derived.el
@@ -240,7 +240,9 @@ No problems result if this variable is not bound.
(unless (get ',abbrev 'variable-documentation)
(put ',abbrev 'variable-documentation
(purecopy ,(format "Abbrev table for `%s'." child))))))
- (put ',child 'derived-mode-parent ',parent)
+ (if (fboundp 'derived-mode-set-parent) ;; Emacs≄30.1
+ (derived-mode-set-parent ',child ',parent)
+ (put ',child 'derived-mode-parent ',parent))
,(if group `(put ',child 'custom-mode-group ,group))
(defun ,child ()