diff options
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 13 | ||||
-rw-r--r-- | lisp/emacs-lisp/re-builder.el | 2 |
2 files changed, 8 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 01d1e270f36..c234fd70a43 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -156,6 +156,7 @@ ;; Some versions of `file' can be customized to recognize that. (require 'backquote) +(eval-when-compile (require 'cl)) (or (fboundp 'defsubst) ;; This really ought to be loaded already! @@ -1747,12 +1748,12 @@ The value is non-nil if there were no errors, nil if errors." (set-buffer-multibyte nil)) ;; Run hooks including the uncompression hook. ;; If they change the file name, then change it for the output also. - (let ((buffer-file-name bytecomp-filename) - (default-major-mode 'emacs-lisp-mode) - ;; Ignore unsafe local variables. - ;; We only care about a few of them for our purposes. - (enable-local-variables :safe) - (enable-local-eval nil)) + (letf ((buffer-file-name bytecomp-filename) + ((default-value 'major-mode) 'emacs-lisp-mode) + ;; Ignore unsafe local variables. + ;; We only care about a few of them for our purposes. + (enable-local-variables :safe) + (enable-local-eval nil)) ;; Arg of t means don't alter enable-local-variables. (normal-mode t) (setq bytecomp-filename buffer-file-name)) diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index 97aba431c0f..ed45bd65304 100644 --- a/lisp/emacs-lisp/re-builder.el +++ b/lisp/emacs-lisp/re-builder.el @@ -720,7 +720,7 @@ If SUBEXP is non-nil mark only the corresponding sub-expressions." (remove-hook 'kill-buffer-hook 'reb-kill-buffer t) (when (reb-mode-buffer-p) (reb-delete-overlays) - (funcall default-major-mode)))) + (funcall (default-value 'major-mode))))) ;; continue standard unloading nil) |