unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Drew Adams <drew.adams@oracle.com>, npostavs@users.sourceforge.net
Cc: 25627@debbugs.gnu.org
Subject: bug#25627: 25.1; `help-make-xrefs' loads `cl-extra.el' now
Date: Tue, 07 Feb 2017 22:29:36 +0000	[thread overview]
Message-ID: <CAArVCkQBuraSJ3LG0Oad2_DAgod4Uao05DscFyzMOrgAnXMgMw@mail.gmail.com> (raw)
In-Reply-To: <5f457952-82ca-4a77-8061-1b2e366fcfb2@default>

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

Drew Adams <drew.adams@oracle.com> schrieb am Di., 7. Feb. 2017 um
03:23 Uhr:

> > > I thought that the point of creating `cl-lib.el' was to give people a
> > > library of the most-used CL constructs and still let them avoid loading
> > > all of `cl.el'.  If we are, in effect, loading `cl-extra.el' now nearly
> > > by default then what's the point of separating out `cl-lib.el'?
> >
> > AFAIK, the point of cl-lib is to have the CL constructs in a separate
> > namespace, so that loading cl-lib doesn't change the semantics of
> > existing code that might not expect it (unlike cl.el).
>
> What part of `cl.el' changes the semantics of existing [non-cl.el]
> code?


Loading cl.el modifies the observable behavior of dolist.  For example,
insert the following into /tmp/dolist.el:

;;; -*- lexical-binding: t; -*-
(eval-when-compile (require 'cl-lib))
(message "Without cl.el")
(cl-dolist (i '(1 2 3))
  (dolist (j '(a b c))
    (message "i = %s, j = %s" i j)
    (when (= i 2) (cl-return))))
(message "\nWith cl.el")
(eval-when-compile (require 'cl))
(cl-dolist (i '(1 2 3))
  (dolist (j '(a b c))
    (message "i = %s, j = %s" i j)
    (when (= i 2) (cl-return))))

And then run:

$ emacs -Q -batch -l /tmp/dolist.el
Without cl.el
i = 1, j = a
i = 1, j = b
i = 1, j = c
i = 2, j = a

With cl.el
i = 1, j = a
i = 1, j = b
i = 1, j = c
i = 2, j = a
i = 3, j = a
i = 3, j = b
i = 3, j = c

[-- Attachment #2: Type: text/html, Size: 2384 bytes --]

  parent reply	other threads:[~2017-02-07 22:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-05 18:44 bug#25627: 25.1; `help-make-xrefs' loads `cl-extra.el' now Drew Adams
2017-02-05 19:24 ` Drew Adams
2017-02-07  0:58 ` npostavs
2017-02-07  2:21   ` Drew Adams
2017-02-07 13:30     ` Michael Heerdegen
2017-02-07 16:13       ` Drew Adams
2017-02-07 17:19         ` Michael Heerdegen
2017-02-07 22:29     ` Philipp Stephani [this message]
2017-02-07 23:00       ` Drew Adams
2017-02-07 23:08         ` Noam Postavsky
2017-02-08  0:18           ` Drew Adams
2017-02-08  1:56             ` npostavs
2017-02-08  1:59               ` Drew Adams
2017-02-08  4:57                 ` npostavs
2017-02-08  5:40                   ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAArVCkQBuraSJ3LG0Oad2_DAgod4Uao05DscFyzMOrgAnXMgMw@mail.gmail.com \
    --to=p.stephani2@gmail.com \
    --cc=25627@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).