all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: master 0f443a1: New library thunk.el
       [not found] ` <E1ZpaQT-00061b-NS@vcs.savannah.gnu.org>
@ 2015-10-27 23:42   ` Artur Malabarba
  2015-10-28  8:56     ` [Emacs-diffs] " Nicolas Petton
  0 siblings, 1 reply; 2+ messages in thread
From: Artur Malabarba @ 2015-10-27 23:42 UTC (permalink / raw)
  To: emacs-devel, Nicolas Petton; +Cc: emacs-diffs


[-- Attachment #1.1: Type: text/plain, Size: 512 bytes --]

> +(defmacro thunk-delay (&rest body)
> +  "Delay the evaluation of BODY."
> +  (declare (debug t))
> +  (let ((forced (make-symbol "forced"))
> +        (val (make-symbol "val")))
> +    `(let (,forced ,val)
> +       (lambda (&optional check)
> +         (if check
> +             ,forced
> +           (unless ,forced
> +             (setf ,val (progn ,@body))
> +             (setf ,forced t)))
> +         ,val))))

Maybe I'm misreading this on my phone, but it looks like this val should be
inside the if.

[-- Attachment #1.2: Type: text/html, Size: 739 bytes --]



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Emacs-diffs] master 0f443a1: New library thunk.el
  2015-10-27 23:42   ` master 0f443a1: New library thunk.el Artur Malabarba
@ 2015-10-28  8:56     ` Nicolas Petton
  0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Petton @ 2015-10-28  8:56 UTC (permalink / raw)
  To: bruce.connor.am, emacs-devel; +Cc: emacs-diffs

[-- Attachment #1: Type: text/plain, Size: 177 bytes --]

Artur Malabarba <bruce.connor.am@gmail.com> writes:

> Maybe I'm misreading this on my phone, but it looks like this val should be
> inside the if.

You're right, thanks.

Nico

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 512 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-10-28  8:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20151023112225.23125.55822@vcs.savannah.gnu.org>
     [not found] ` <E1ZpaQT-00061b-NS@vcs.savannah.gnu.org>
2015-10-27 23:42   ` master 0f443a1: New library thunk.el Artur Malabarba
2015-10-28  8:56     ` [Emacs-diffs] " Nicolas Petton

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.