From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Stefan-W. Hahn" Subject: Re: Bug: buffer local variables handled wrong [9.0.5 (release_9.0.5-497-g5bc540 @ /home/hs/.emacs.d/lib/org-mode/lisp/)] Date: Sun, 4 Jun 2017 11:18:19 +0200 Message-ID: <20170604091819.GI7145@seven> References: <20170603114859.GE7145@seven> <87a85olrzq.fsf@nicolasgoaziou.fr> <20170604065733.GG7145@seven> <87o9u4nrte.fsf@nicolasgoaziou.fr> <20170604080822.GH7145@seven> <877f0snorq.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50267) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dHRgQ-0002r2-UV for emacs-orgmode@gnu.org; Sun, 04 Jun 2017 05:18:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dHRgN-0000oD-Pb for emacs-orgmode@gnu.org; Sun, 04 Jun 2017 05:18:50 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:62376) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dHRgN-0000jS-EZ for emacs-orgmode@gnu.org; Sun, 04 Jun 2017 05:18:47 -0400 Content-Disposition: inline In-Reply-To: <877f0snorq.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Mail von Nicolas Goaziou, Sun, 04 Jun 2017 at 10:24:57 +0200: Hello, > "Stefan-W. Hahn" writes: > > > I looked at it, but sorry, I think this also is not right, it expands to: > > > > Both looking wrong for me. Sorry. > > What do you think is wrong? > > In particular > > (let (res) > (dolist (pair (buffer-local-variables)) > (pcase pair > (`(,var . ,val) > (push (list 'set var val) res)))) > res) > > expands to > > ((set flyspell-word-cache-result _) > (set flyspell-word-cache-end -1) > (set undo-auto--last-boundary-cause (2 #)) > (set syntax-ppss-last (1 0 nil nil nil nil nil 0 nil nil nil)) > (set syntax-propertize--done 139) > (set flyspell-changes nil) > (set deactivate-mark nil) > (set flyspell-pre-point 139) > (set auto-revert-notify-modified-p nil) > ... > ) > > which looks correct. Obviously you are right, I get the ame result when evaluating it. What I don't understand is, if I expand the pcase with (macrostep-expand) I get the following: ,---- | (let (res) | (dolist (pair (buffer-local-variables)) | (if | (consp pair) | (let* | ((x | (car pair)) | (x | (cdr pair))) | (let | ((val x) | (var x)) | (push | (list 'set var val) | res))) | nil)) | res) `---- And this is obviously wrong. With kind regards, Stefan -- Stefan-W. Hahn It is easy to make things. It is hard to make things simple.