From: Tassilo Horn Date: Thu, 30 Dec 2010 14:58:32 +0000 (+0100) Subject: * doc-view.el (doc-view-toggle-display): Perform rassq-delete-all X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~1322^2~278^2~44 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f9e68477a2d70c3d371bffb7c9f9f080468ca8ce;p=emacs.git * doc-view.el (doc-view-toggle-display): Perform rassq-delete-all on a copy of auto-mode-alist, because that deletes with side effects. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3b28681fec5..e241a65ff50 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2010-12-30 Tassilo Horn + + * 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 * doc-view.el (doc-view-mode, doc-view-toggle-display): Use diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 526bf7694fb..a5dbff10564 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -1061,7 +1061,8 @@ For now these keys are useful: ;; 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