all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] trunk r113497: lisp/desktop.el: Simplify.
       [not found] <E1V1R81-0005Jw-15@vcs.savannah.gnu.org>
@ 2013-07-23  1:25 ` Stefan Monnier
  2013-07-23  3:14   ` Stephen J. Turnbull
  2013-07-23 11:23   ` Juanma Barranquero
  0 siblings, 2 replies; 4+ messages in thread
From: Stefan Monnier @ 2013-07-23  1:25 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: emacs-devel

>  (defun desktop-list* (&rest args)
> -  (if (null (cdr args))
> -      (car args)
> -    (setq args (nreverse args))
> -    (let ((value (cons (nth 1 args) (car args))))
> -      (setq args (cdr (cdr args)))
> -      (while args
> -	(setq value (cons (car args) value))
> -	(setq args (cdr args)))
> -      value)))
> +  (and args (cl-list* args)))
 
Doesn't look right.  Shouldn't it be

   (and args (apply #'cl-list* args))

or more simply

   (apply #'cl-list* args)

which boils down to

   (defalias 'desktop-list* 'cl-list*)


-- Stefan



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

* Re: [Emacs-diffs] trunk r113497: lisp/desktop.el: Simplify.
  2013-07-23  1:25 ` [Emacs-diffs] trunk r113497: lisp/desktop.el: Simplify Stefan Monnier
@ 2013-07-23  3:14   ` Stephen J. Turnbull
  2013-07-23 11:23   ` Juanma Barranquero
  1 sibling, 0 replies; 4+ messages in thread
From: Stephen J. Turnbull @ 2013-07-23  3:14 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Juanma Barranquero, emacs-devel

Stefan Monnier writes:

 >    (defalias 'desktop-list* 'cl-list*)

Try `(cl-list*)'.

Everybody-wants-to-be-Andreas-ly y'rs,



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

* Re: [Emacs-diffs] trunk r113497: lisp/desktop.el: Simplify.
  2013-07-23  1:25 ` [Emacs-diffs] trunk r113497: lisp/desktop.el: Simplify Stefan Monnier
  2013-07-23  3:14   ` Stephen J. Turnbull
@ 2013-07-23 11:23   ` Juanma Barranquero
  2013-07-23 13:42     ` Stefan Monnier
  1 sibling, 1 reply; 4+ messages in thread
From: Juanma Barranquero @ 2013-07-23 11:23 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: Emacs developers

On Tue, Jul 23, 2013 at 3:25 AM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:

> Doesn't look right.  Shouldn't it be
>
>    (and args (apply #'cl-list* args))

Yes, sorry. Brain fart.

> or more simply
>
>    (apply #'cl-list* args)
>
> which boils down to
>
>    (defalias 'desktop-list* 'cl-list*)

Not exactly:

(desktop-list*)  => nil    ; with the old definition
(cl-list*)  => *** Eval error ***  Wrong number of arguments: (1 . &rest), 0

That's why I added (and arg ...)



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

* Re: [Emacs-diffs] trunk r113497: lisp/desktop.el: Simplify.
  2013-07-23 11:23   ` Juanma Barranquero
@ 2013-07-23 13:42     ` Stefan Monnier
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Monnier @ 2013-07-23 13:42 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: Emacs developers

> Not exactly:

> (desktop-list*)  => nil    ; with the old definition
> (cl-list*)  => *** Eval error ***  Wrong number of arguments: (1 . &rest), 0

Ah, good point, thanks,


        Stefan



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

end of thread, other threads:[~2013-07-23 13:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1V1R81-0005Jw-15@vcs.savannah.gnu.org>
2013-07-23  1:25 ` [Emacs-diffs] trunk r113497: lisp/desktop.el: Simplify Stefan Monnier
2013-07-23  3:14   ` Stephen J. Turnbull
2013-07-23 11:23   ` Juanma Barranquero
2013-07-23 13:42     ` Stefan Monnier

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.