summaryrefslogtreecommitdiff
path: root/lisp/loadhist.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/loadhist.el')
-rw-r--r--lisp/loadhist.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
index 40ac8722ac2..ece95ed619b 100644
--- a/lisp/loadhist.el
+++ b/lisp/loadhist.el
@@ -2,7 +2,7 @@
;; Copyright (C) 1995, 1998, 2000-2024 Free Software Foundation, Inc.
-;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
+;; Author: Eric S. Raymond <esr@thyrsus.com>
;; Maintainer: emacs-devel@gnu.org
;; Keywords: internal
@@ -108,7 +108,8 @@ from a file."
features))
features)))))
-(defvaralias 'loadhist-hook-functions 'unload-feature-special-hooks)
+(define-obsolete-variable-alias 'loadhist-hook-functions
+ 'unload-feature-special-hooks "30.1")
(defvar unload-feature-special-hooks
'(after-change-functions after-insert-file-functions
after-make-frame-functions auto-coding-functions
@@ -148,14 +149,14 @@ documentation of `unload-feature' for details.")
(save-current-buffer
(dolist (buffer (buffer-list))
(set-buffer buffer)
- (let ((proposed major-mode))
+ (let ((proposed (derived-mode-all-parents major-mode)))
;; Look for a predecessor mode not defined in the feature we're processing
- (while (and proposed (rassq proposed unload-function-defs-list))
- (setq proposed (get proposed 'derived-mode-parent)))
- (unless (eq proposed major-mode)
+ (while (and proposed (rassq (car proposed) unload-function-defs-list))
+ (setq proposed (cdr proposed)))
+ (unless (eq (car proposed) major-mode)
;; Two cases: either proposed is nil, and we want to switch to fundamental
;; mode, or proposed is not nil and not major-mode, and so we use it.
- (funcall (or proposed 'fundamental-mode)))))))
+ (funcall (or (car proposed) 'fundamental-mode)))))))
(defvar loadhist-unload-filename nil)