unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] master 3f06795: Migrate auth-source to cl-lib
       [not found] ` <20161102191027.3BAA0220149@vcs.savannah.gnu.org>
@ 2016-11-02 20:06   ` Stefan Monnier
  2016-11-02 20:16     ` Mark Oteiza
  2016-11-12 22:57   ` Stefan Monnier
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2016-11-02 20:06 UTC (permalink / raw)
  To: emacs-devel; +Cc: Mark Oteiza

> +(eval-when-compile
> +  (require 'cl-lib)
> +  (require 'eieio))

AFAIK eieio's macros always end up returning code which depends on eieio
functions, so a compile-time only `require` of eieio doesn't make
much sense.


        Stefan



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

* Re: [Emacs-diffs] master 3f06795: Migrate auth-source to cl-lib
  2016-11-02 20:06   ` [Emacs-diffs] master 3f06795: Migrate auth-source to cl-lib Stefan Monnier
@ 2016-11-02 20:16     ` Mark Oteiza
  2016-11-04 18:14       ` Ted Zlatanov
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Oteiza @ 2016-11-02 20:16 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 02/11/16 at 04:06pm, Stefan Monnier wrote:
> > +(eval-when-compile
> > +  (require 'cl-lib)
> > +  (require 'eieio))
> 
> AFAIK eieio's macros always end up returning code which depends on eieio
> functions, so a compile-time only `require` of eieio doesn't make
> much sense.

You're right, thanks.



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

* Re: [Emacs-diffs] master 3f06795: Migrate auth-source to cl-lib
  2016-11-02 20:16     ` Mark Oteiza
@ 2016-11-04 18:14       ` Ted Zlatanov
  2016-11-04 18:20         ` Mark Oteiza
  0 siblings, 1 reply; 6+ messages in thread
From: Ted Zlatanov @ 2016-11-04 18:14 UTC (permalink / raw)
  To: emacs-devel

Followup for Mark: you removed many auth-source.el comments that were
still pertinent after your great rewrite. Would you consider bringing
them back?

Thanks
Ted




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

* Re: [Emacs-diffs] master 3f06795: Migrate auth-source to cl-lib
  2016-11-04 18:14       ` Ted Zlatanov
@ 2016-11-04 18:20         ` Mark Oteiza
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Oteiza @ 2016-11-04 18:20 UTC (permalink / raw)
  To: emacs-devel; +Cc: Ted Zlatanov

Ted Zlatanov <tzz@lifelogs.com> writes:

> Followup for Mark: you removed many auth-source.el comments that were
> still pertinent after your great rewrite. Would you consider bringing
> them back?

Indeed a couple were lost!  I will restore them.



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

* Re: [Emacs-diffs] master 3f06795: Migrate auth-source to cl-lib
       [not found] ` <20161102191027.3BAA0220149@vcs.savannah.gnu.org>
  2016-11-02 20:06   ` [Emacs-diffs] master 3f06795: Migrate auth-source to cl-lib Stefan Monnier
@ 2016-11-12 22:57   ` Stefan Monnier
  2016-11-13  0:07     ` Mark Oteiza
  1 sibling, 1 reply; 6+ messages in thread
From: Stefan Monnier @ 2016-11-12 22:57 UTC (permalink / raw)
  To: emacs-devel; +Cc: Mark Oteiza

> @@ -712,7 +712,7 @@ must call it to obtain the actual value."
>                         (plist-get spec key)
>                         (slot-value backend key))
>                  (setq filtered-backends (delq backend filtered-backends))
> -                (return))
> +                (cl-return))
>              (invalid-slot-name nil))))

Hmm... This change looks right, but I believe there's a bug here:
with `cl`, `dolist` is advised to be CL's `dolist` which includes an
implicit (block nil ...) wrapper.  But with cl-lib, `dolist` is left alone
and you need to use `cl-dolist` to get that wrapper.

So I think you need to change the surrounding `dolist` to be `cl-dolist`
otherwise this `cl-return` will exit from the surrounding function
rather than from the inner loop.


        Stefan



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

* Re: [Emacs-diffs] master 3f06795: Migrate auth-source to cl-lib
  2016-11-12 22:57   ` Stefan Monnier
@ 2016-11-13  0:07     ` Mark Oteiza
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Oteiza @ 2016-11-13  0:07 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On 12/11/16 at 05:57pm, Stefan Monnier wrote:
> > @@ -712,7 +712,7 @@ must call it to obtain the actual value."
> >                         (plist-get spec key)
> >                         (slot-value backend key))
> >                  (setq filtered-backends (delq backend filtered-backends))
> > -                (return))
> > +                (cl-return))
> >              (invalid-slot-name nil))))
> 
> Hmm... This change looks right, but I believe there's a bug here:
> with `cl`, `dolist` is advised to be CL's `dolist` which includes an
> implicit (block nil ...) wrapper.  But with cl-lib, `dolist` is left alone
> and you need to use `cl-dolist` to get that wrapper.
> 
> So I think you need to change the surrounding `dolist` to be `cl-dolist`
> otherwise this `cl-return` will exit from the surrounding function
> rather than from the inner loop.

Argh, I caught one of the dolist/return but missed this one.
Thanks, fixed.



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

end of thread, other threads:[~2016-11-13  0:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20161102191026.12915.33007@vcs.savannah.gnu.org>
     [not found] ` <20161102191027.3BAA0220149@vcs.savannah.gnu.org>
2016-11-02 20:06   ` [Emacs-diffs] master 3f06795: Migrate auth-source to cl-lib Stefan Monnier
2016-11-02 20:16     ` Mark Oteiza
2016-11-04 18:14       ` Ted Zlatanov
2016-11-04 18:20         ` Mark Oteiza
2016-11-12 22:57   ` Stefan Monnier
2016-11-13  0:07     ` Mark Oteiza

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).