[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Bug: buffer local variables handled wrong [9.0.5 (release_9.0.5-
From: |
Nicolas Goaziou |
Subject: |
Re: [O] 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, 04 Jun 2017 10:24:57 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) |
"Stefan-W. Hahn" <address@hidden> writes:
> I looked at it, but sorry, I think this also is not right, it expands to:
>
> ,----
> | (defun org-agenda-mode ()
> | ...
> | (mapc #'make-local-variable org-agenda-local-vars)
> | (dolist (elem save)
> | (if
> | (consp elem)
> | (let*
> | ((x
> | (car elem))
> | (x
> | (cdr elem)))
> | (let
> | ((val x)
> | (var x))
> | (when
> | (and val
> | (memq var org-agenda-local-vars))
> | (set var val))))
> | nil)))
> | (setq-local org-agenda-this-buffer-is-sticky t))
> | (org-agenda-sticky
> `----
>
> and the second one:
>
> ,----
> | (defun org-clone-local-variables (from-buffer &optional regexp)
> | ...
> | (dolist (pair (buffer-local-variables from-buffer))
> | (if
> | (consp pair)
> | (let*
> | ((x
> | (car pair))
> | (x
> | (cdr pair)))
> | (if
> | (consp x)
> | (let*
> | ((x
> | (cdr x)))
> | (if
> | (null x)
> | (let
> | ((name x))
> | (when
> | (and
> | (not
> | (memq name org-unique-local-variables))
> | (or
> | (null regexp)
> | (string-match-p regexp
> | (symbol-name name))))
> | (set
> | (make-local-variable name)
> | (cdr pair))))
> | nil))
> | nil))
> | nil)))
> `----
>
> 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 #<buffer *scratch*>))
(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.
Regards,
- [O] Bug: buffer local variables handled wrong [9.0.5 (release_9.0.5-497-g5bc540 @ /home/hs/.emacs.d/lib/org-mode/lisp/)], Stefan-W. Hahn, 2017/06/03
- Re: [O] Bug: buffer local variables handled wrong [9.0.5 (release_9.0.5-497-g5bc540 @ /home/hs/.emacs.d/lib/org-mode/lisp/)], Nicolas Goaziou, 2017/06/03
- Re: [O] Bug: buffer local variables handled wrong [9.0.5 (release_9.0.5-497-g5bc540 @ /home/hs/.emacs.d/lib/org-mode/lisp/)], Stefan-W. Hahn, 2017/06/04
- Re: [O] Bug: buffer local variables handled wrong [9.0.5 (release_9.0.5-497-g5bc540 @ /home/hs/.emacs.d/lib/org-mode/lisp/)], Nicolas Goaziou, 2017/06/04
- Re: [O] Bug: buffer local variables handled wrong [9.0.5 (release_9.0.5-497-g5bc540 @ /home/hs/.emacs.d/lib/org-mode/lisp/)], Stefan-W. Hahn, 2017/06/04
- Re: [O] Bug: buffer local variables handled wrong [9.0.5 (release_9.0.5-497-g5bc540 @ /home/hs/.emacs.d/lib/org-mode/lisp/)],
Nicolas Goaziou <=
- Re: [O] Bug: buffer local variables handled wrong [9.0.5 (release_9.0.5-497-g5bc540 @ /home/hs/.emacs.d/lib/org-mode/lisp/)], Stefan-W. Hahn, 2017/06/04
- Re: [O] Bug: buffer local variables handled wrong [9.0.5 (release_9.0.5-497-g5bc540 @ /home/hs/.emacs.d/lib/org-mode/lisp/)], Nicolas Goaziou, 2017/06/04
- Re: [O] Bug: buffer local variables handled wrong [9.0.5 (release_9.0.5-497-g5bc540 @ /home/hs/.emacs.d/lib/org-mode/lisp/)], Stefan-W. Hahn, 2017/06/04