summaryrefslogtreecommitdiff
path: root/lisp/textmodes/reftex.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/textmodes/reftex.el')
-rw-r--r--lisp/textmodes/reftex.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/textmodes/reftex.el b/lisp/textmodes/reftex.el
index 23cf167dc93..d905ce66905 100644
--- a/lisp/textmodes/reftex.el
+++ b/lisp/textmodes/reftex.el
@@ -2063,11 +2063,11 @@ When DIE is non-nil, throw an error if file not found."
;; with limited Magic
;; The magic goes away
- (let ((format-alist nil)
- (auto-mode-alist (reftex-auto-mode-alist))
- (default-major-mode 'fundamental-mode)
- (enable-local-variables nil)
- (after-insert-file-functions nil))
+ (letf ((format-alist nil)
+ (auto-mode-alist (reftex-auto-mode-alist))
+ ((default-value 'major-mode) 'fundamental-mode)
+ (enable-local-variables nil)
+ (after-insert-file-functions nil))
(setq buf (find-file-noselect file)))
;; Is there a hook to run?