From f9e68477a2d70c3d371bffb7c9f9f080468ca8ce Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Thu, 30 Dec 2010 15:58:32 +0100 Subject: [PATCH] * doc-view.el (doc-view-toggle-display): Perform rassq-delete-all on a copy of auto-mode-alist, because that deletes with side effects. --- lisp/ChangeLog | 6 ++++++ lisp/doc-view.el | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) 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 -- 2.39.5