From: Philipp <phil07c1@gmail.com>
To: rgm@gnu.org, npostavs@users.sourceforge.net, emacs-devel@gnu.org,
25951@debbugs.gnu.org
Cc: Philipp <phst@google.com>
Subject: [PATCH] Fix bootstrap build of files.el
Date: Sat, 6 May 2017 23:21:57 +0200 [thread overview]
Message-ID: <20170506212157.62158-1-phst@google.com> (raw)
In-Reply-To: <8760hdlnux.fsf@users.sourceforge.net>
* 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 7e627d36d4..8ac1993754 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 @@ file-name-non-special
(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)))))
--
2.12.2
next prev parent reply other threads:[~2017-05-06 21:21 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-03 13:56 bug#25951: 26.0.50; Error when ediffing files that are visited using quoted file names Philipp Stephani
2017-04-21 22:14 ` Philipp Stephani
2017-04-21 22:50 ` npostavs
2017-04-22 19:43 ` Philipp Stephani
2017-04-22 20:32 ` npostavs
2017-04-23 16:54 ` Philipp Stephani
2017-04-23 17:06 ` [PATCH] Fix quoted files for 'verify-visited-file-modtime' Philipp Stephani
2017-04-26 5:38 ` Eli Zaretskii
2017-04-29 12:20 ` Philipp Stephani
2017-05-06 19:27 ` bug#25951: " Philipp
2017-05-06 19:27 ` Philipp
2017-05-06 20:28 ` bug#25951: " Glenn Morris
2017-05-06 20:41 ` npostavs
2017-05-06 21:21 ` bug#25951: [PATCH] Fix bootstrap build of files.el Philipp
2017-05-06 21:21 ` Philipp [this message]
2017-05-07 1:24 ` Glenn Morris
2017-05-07 11:35 ` Philipp
2017-05-07 11:35 ` bug#25951: " Philipp
2017-05-07 1:24 ` Glenn Morris
2017-05-06 21:27 ` bug#25951: [PATCH] Fix quoted files for 'verify-visited-file-modtime' Philipp
2017-04-29 12:20 ` Philipp Stephani
2017-04-29 11:49 ` Philipp Stephani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170506212157.62158-1-phst@google.com \
--to=phil07c1@gmail.com \
--cc=25951@debbugs.gnu.org \
--cc=emacs-devel@gnu.org \
--cc=npostavs@users.sourceforge.net \
--cc=phst@google.com \
--cc=rgm@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.