aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp2017-05-06 23:19:22 +0200
committerPhilipp2017-05-06 23:23:45 +0200
commitcea3b22bc742699d60c33194b73b391c05a2456d (patch)
tree3c494f877754e5c04289367ea1ddce067da72ec4
parent5772b920f40a8c9f0a5266caf8d0f4729f6d2c13 (diff)
downloademacs-cea3b22bc742699d60c33194b73b391c05a2456d.tar.gz
emacs-cea3b22bc742699d60c33194b73b391c05a2456d.zip
Fix bootstrap build of files.el
* lisp/files.el (file-name-non-special): Don't use cl-letf.
-rw-r--r--lisp/files.el14
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 7e627d36d49..8ac1993754e 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -29,7 +29,6 @@
29;;; Code: 29;;; Code:
30 30
31(eval-when-compile 31(eval-when-compile
32 (require 'cl-lib)
33 (require 'pcase) 32 (require 'pcase)
34 (require 'easy-mmode)) ; For `define-minor-mode'. 33 (require 'easy-mmode)) ; For `define-minor-mode'.
35 34
@@ -7032,13 +7031,18 @@ only these files will be asked to be saved."
7032 (when (and visit buffer-file-name) 7031 (when (and visit buffer-file-name)
7033 (setq buffer-file-name (concat "/:" buffer-file-name)))))) 7032 (setq buffer-file-name (concat "/:" buffer-file-name))))))
7034 (`unquote-then-quote 7033 (`unquote-then-quote
7035 (cl-letf* ((buffer (or (car arguments) (current-buffer))) 7034 ;; We can't use `cl-letf' with `(buffer-local-value)' here
7036 ((buffer-local-value 'buffer-file-name buffer) 7035 ;; because it wouldn't work during bootstrapping.
7037 (substring (buffer-file-name buffer) 2))) 7036 (let ((buffer (current-buffer)))
7038 ;; `unquote-then-quote' is only used for the 7037 ;; `unquote-then-quote' is only used for the
7039 ;; `verify-visited-file-modtime' action, which takes a buffer 7038 ;; `verify-visited-file-modtime' action, which takes a buffer
7040 ;; as only optional argument. 7039 ;; as only optional argument.
7041 (apply operation arguments))) 7040 (with-current-buffer (or (car arguments) buffer)
7041 (let ((buffer-file-name (substring buffer-file-name 2)))
7042 ;; Make sure to hide the temporary buffer change from the
7043 ;; underlying operation.
7044 (with-current-buffer buffer
7045 (apply operation arguments))))))
7042 (_ 7046 (_
7043 (apply operation arguments))))) 7047 (apply operation arguments)))))
7044 7048