summaryrefslogtreecommitdiff
path: root/lisp/doc-view.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/doc-view.el')
-rw-r--r--lisp/doc-view.el3
1 files changed, 2 insertions, 1 deletions
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