changeset 112037:5879f36f423b

* doc-view.el (doc-view-toggle-display): Perform rassq-delete-all on a copy of auto-mode-alist, because that deletes with side effects.
author Tassilo Horn <tassilo@member.fsf.org>
date Thu, 30 Dec 2010 15:58:32 +0100
parents f559229a64b8
children ad2a8fce0d7a
files lisp/ChangeLog lisp/doc-view.el
diffstat 2 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Thu Dec 30 15:47:53 2010 +0100
+++ b/lisp/ChangeLog	Thu Dec 30 15:58:32 2010 +0100
@@ -1,3 +1,9 @@
+2010-12-30  Tassilo Horn  <tassilo@member.fsf.org>
+
+	* doc-view.el (doc-view-toggle-display): Perform rassq-delete-all
+	on a copy of auto-mode-alist, because that deletes with side
+	effects.
+
 2010-12-30  Tassilo Horn  <tassilo@member.fsf.org>
 
 	* doc-view.el (doc-view-mode, doc-view-toggle-display): Use
--- a/lisp/doc-view.el	Thu Dec 30 15:47:53 2010 +0100
+++ b/lisp/doc-view.el	Thu Dec 30 15:58:32 2010 +0100
@@ -1061,7 +1061,8 @@
 	;; normal mode.
 	(if doc-view-previous-major-mode
 	    (funcall doc-view-previous-major-mode)
-	  (let ((auto-mode-alist (rassq-delete-all 'doc-view-mode auto-mode-alist)))
+	  (let ((auto-mode-alist (rassq-delete-all 'doc-view-mode
+						   (copy-alist auto-mode-alist))))
 	    (normal-mode)))
 	(doc-view-minor-mode 1))
     ;; Switch to doc-view-mode