changeset 104684:b1cb2e195329

* arc-mode.el (archive-mode): * emacs-lisp/re-builder.el (re-builder-unload-function): Protect against the default value of `major-mode' being nil.
author Juanma Barranquero <lekktu@gmail.com>
date Fri, 28 Aug 2009 18:35:25 +0000
parents 2b8eeeaa8c1d
children 46d3afb288bc
files lisp/ChangeLog lisp/arc-mode.el lisp/emacs-lisp/re-builder.el
diffstat 3 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Fri Aug 28 18:22:30 2009 +0000
+++ b/lisp/ChangeLog	Fri Aug 28 18:35:25 2009 +0000
@@ -1,3 +1,9 @@
+2009-08-28  Juanma Barranquero  <lekktu@gmail.com>
+
+	* 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  <lekktu@gmail.com>
 
 	* international/ucs-normalize.el (ucs-normalize-sort, quick-check-list):
--- a/lisp/arc-mode.el	Fri Aug 28 18:22:30 2009 +0000
+++ b/lisp/arc-mode.el	Fri Aug 28 18:35:25 2009 +0000
@@ -638,7 +638,7 @@
   ;; 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))))
--- a/lisp/emacs-lisp/re-builder.el	Fri Aug 28 18:22:30 2009 +0000
+++ b/lisp/emacs-lisp/re-builder.el	Fri Aug 28 18:35:25 2009 +0000
@@ -720,7 +720,7 @@
       (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)