[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master cea3b22: Fix bootstrap build of files.el
From: |
Philipp Stephani |
Subject: |
[Emacs-diffs] master cea3b22: Fix bootstrap build of files.el |
Date: |
Sat, 6 May 2017 17:24:07 -0400 (EDT) |
branch: master
commit cea3b22bc742699d60c33194b73b391c05a2456d
Author: Philipp <address@hidden>
Commit: Philipp <address@hidden>
Fix bootstrap build of files.el
* lisp/files.el (file-name-non-special): Don't use cl-letf.
---
lisp/files.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/lisp/files.el b/lisp/files.el
index 7e627d3..8ac1993 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -29,7 +29,6 @@
;;; Code:
(eval-when-compile
- (require 'cl-lib)
(require 'pcase)
(require 'easy-mmode)) ; For `define-minor-mode'.
@@ -7032,13 +7031,18 @@ only these files will be asked to be saved."
(when (and visit buffer-file-name)
(setq buffer-file-name (concat "/:" buffer-file-name))))))
(`unquote-then-quote
- (cl-letf* ((buffer (or (car arguments) (current-buffer)))
- ((buffer-local-value 'buffer-file-name buffer)
- (substring (buffer-file-name buffer) 2)))
+ ;; We can't use `cl-letf' with `(buffer-local-value)' here
+ ;; because it wouldn't work during bootstrapping.
+ (let ((buffer (current-buffer)))
;; `unquote-then-quote' is only used for the
;; `verify-visited-file-modtime' action, which takes a buffer
;; as only optional argument.
- (apply operation arguments)))
+ (with-current-buffer (or (car arguments) buffer)
+ (let ((buffer-file-name (substring buffer-file-name 2)))
+ ;; Make sure to hide the temporary buffer change from the
+ ;; underlying operation.
+ (with-current-buffer buffer
+ (apply operation arguments))))))
(_
(apply operation arguments)))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master cea3b22: Fix bootstrap build of files.el,
Philipp Stephani <=