From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Philipp Newsgroups: gmane.emacs.devel Subject: [PATCH] Fix bootstrap build of files.el Date: Sat, 6 May 2017 23:21:57 +0200 Message-ID: <20170506212157.62158-1-phst@google.com> References: <8760hdlnux.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1494105769 4911 195.159.176.226 (6 May 2017 21:22:49 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 6 May 2017 21:22:49 +0000 (UTC) Cc: Philipp To: rgm@gnu.org, npostavs@users.sourceforge.net, emacs-devel@gnu.org, 25951@debbugs.gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat May 06 23:22:42 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d77A1-0001Bi-Kn for ged-emacs-devel@m.gmane.org; Sat, 06 May 2017 23:22:41 +0200 Original-Received: from localhost ([::1]:52751 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d77A6-0000OB-TA for ged-emacs-devel@m.gmane.org; Sat, 06 May 2017 17:22:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d779U-0000N8-Io for emacs-devel@gnu.org; Sat, 06 May 2017 17:22:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d779T-0003Uo-Or for emacs-devel@gnu.org; Sat, 06 May 2017 17:22:08 -0400 Original-Received: from mail-wr0-x242.google.com ([2a00:1450:400c:c0c::242]:33789) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d779Q-0003Tl-2J; Sat, 06 May 2017 17:22:04 -0400 Original-Received: by mail-wr0-x242.google.com with SMTP id w50so3825862wrc.0; Sat, 06 May 2017 14:22:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=d/ap04k79ls5++n7O0Gvp3rQRA/lTWdIDkz2kwc8AUo=; b=Qr2ql9+BbW3Xi0Uqz+Px6JtTHptDdkfb6mPikb+XxOGGhjoOoCC5obhtB6mPk8y9gE tYU+MN27Joe3EgLNVOWtQXbW/NVLt0E74fzxseolUXYepNPoh5JVdUvY4DQNAWIWlMT7 B1Om/8LZKvhUhzxIWL9Lcw8M/YociaiEdczFJuKUkVjSj9fcsWtuHpwclry7O9BsoZMW yqpzQBVUhwKeF5CrrUXKruFwBqhv63+rg3srfHuPGzCw1KR+7bo0EcyTEZmzxSsxPfay oTw/AoAJizkKk52vC6srje9hENV347gKE1KbI42TUvnCeQrNyhXCgbzjIgrSOIBZCJVW 5TCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=d/ap04k79ls5++n7O0Gvp3rQRA/lTWdIDkz2kwc8AUo=; b=fuExOYu2k9xnKU6diUqK01A8BiRerXvJIvauKtlcEqY9G02xypcAv239xEMBLcFKjk cJGEM7dj1BJRspIh+JGhwNHMpQPDk0+/oNUN8o3js9dWZgJCglXhR3x6etymNE4RTCqj w/e1nMdDpvM0eXFIzt0hTaIwrVODjd7SN4n0LFROGQ78rwYlVlwR8GycUvLzMuJblpQ/ 0ZntraAfdesIkXolrDK8DtVCZLbR681OtVeP1Tm/YwYKIeqZSJHXACEDHEm7uQjVQYw/ bbJqFVgpQMQyLkEjp/yof8TJlvUTXpLOKGVCqzw9Wcb7Pmzjc3PSPDUzaOyJzn5PaceF BuBg== X-Gm-Message-State: AN3rC/6JHT/l5tUxxqu+a3dKuvQ5gu0d0L/EPrQrCcmWkFkl7ii6TocM md6qzIHGCdRUag== X-Received: by 10.223.160.139 with SMTP id m11mr32263592wrm.99.1494105723063; Sat, 06 May 2017 14:22:03 -0700 (PDT) Original-Received: from p.cm.cablesurf.de (46.128.198.151.dynamic.cablesurf.de. [46.128.198.151]) by smtp.gmail.com with ESMTPSA id 4sm9033159wry.31.2017.05.06.14.22.01 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 06 May 2017 14:22:02 -0700 (PDT) X-Google-Original-From: Philipp X-Mailer: git-send-email 2.12.2 In-Reply-To: <8760hdlnux.fsf@users.sourceforge.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c0c::242 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:214637 Archived-At: * 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