From 1e8eecea4be7cd99c0f194c9249495d60dfc584b Mon Sep 17 00:00:00 2001 From: Juanma Barranquero Date: Fri, 28 Aug 2009 18:35:25 +0000 Subject: [PATCH] * arc-mode.el (archive-mode): * emacs-lisp/re-builder.el (re-builder-unload-function): Protect against the default value of `major-mode' being nil. --- lisp/ChangeLog | 6 ++++++ lisp/arc-mode.el | 2 +- lisp/emacs-lisp/re-builder.el | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5c810e963f8..d7a132584ac 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2009-08-28 Juanma Barranquero + + * arc-mode.el (archive-mode): + * emacs-lisp/re-builder.el (re-builder-unload-function): + Protect against the default value of `major-mode' being nil. + 2009-08-28 Juanma Barranquero * international/ucs-normalize.el (ucs-normalize-sort, quick-check-list): diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 6e65d64bb81..a91e9aebe3b 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -638,7 +638,7 @@ archive. ;; mode on and off. You can corrupt things that way. (if (zerop (buffer-size)) ;; At present we cannot create archives from scratch - (funcall (default-value 'major-mode)) + (funcall (or (default-value 'major-mode) 'fundamental-mode)) (if (and (not force) archive-files) nil (let* ((type (archive-find-type)) (typename (capitalize (symbol-name type)))) diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index ed45bd65304..31f7d8da49e 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -720,7 +720,7 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions." (remove-hook 'kill-buffer-hook 'reb-kill-buffer t) (when (reb-mode-buffer-p) (reb-delete-overlays) - (funcall (default-value 'major-mode))))) + (funcall (or (default-value 'major-mode) 'fundamental-mode))))) ;; continue standard unloading nil) -- 2.39.5