all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master 332f465: Make lisp/jsonrpc.el work with Emacs 25.1
       [not found] ` <20180702165745.231D1204E8@vcs0.savannah.gnu.org>
@ 2018-07-03  2:40   ` Stefan Monnier
  2018-07-03  8:06     ` João Távora
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Monnier @ 2018-07-03  2:40 UTC (permalink / raw)
  To: emacs-devel; +Cc: João Távora

> -    (jsonrpc--debug connection `(:maybe-run-deferred ,(mapcar #'caddr actions)))
> +    (jsonrpc--debug connection `(:maybe-run-deferred
> +                                 ,(mapcar (lambda (action) (car (cdr (cdr action))))
> +                                          actions)))

`caddr` is available in cl-lib as cl-caddr.  This said I often find
(nth 2 ...) more readable.

> +(defun jsonrpc--call-with-emacsrpc-fixture (fn)
[...]
>  (cl-defmacro jsonrpc--with-emacsrpc-fixture ((endpoint-sym) &body body)
[...]
> +  `(jsonrpc--call-with-emacsrpc-fixture (lambda (,endpoint-sym) ,@body)))

Good change: much easier to debug.


        Stefan



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

* Re: [Emacs-diffs] master 332f465: Make lisp/jsonrpc.el work with Emacs 25.1
  2018-07-03  2:40   ` [Emacs-diffs] master 332f465: Make lisp/jsonrpc.el work with Emacs 25.1 Stefan Monnier
@ 2018-07-03  8:06     ` João Távora
  0 siblings, 0 replies; 2+ messages in thread
From: João Távora @ 2018-07-03  8:06 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> -    (jsonrpc--debug connection `(:maybe-run-deferred ,(mapcar #'caddr actions)))
>> +    (jsonrpc--debug connection `(:maybe-run-deferred
>> +                                 ,(mapcar (lambda (action) (car (cdr (cdr action))))
>> +                                          actions)))
> `caddr` is available in cl-lib as cl-caddr.  This said I often find
> (nth 2 ...) more readable.

Right, I just used (apply-partially #'nth 2)






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

end of thread, other threads:[~2018-07-03  8:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20180702165742.23596.60390@vcs0.savannah.gnu.org>
     [not found] ` <20180702165745.231D1204E8@vcs0.savannah.gnu.org>
2018-07-03  2:40   ` [Emacs-diffs] master 332f465: Make lisp/jsonrpc.el work with Emacs 25.1 Stefan Monnier
2018-07-03  8:06     ` João Távora

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.