GNU bug report logs - #8690
24.0.50; `declare' doc; conflict with cl-macs.el

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Wed, 18 May 2011 15:59:02 UTC

Severity: minor

Tags: fixed

Found in version 24.0.50

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8690 in the body.
You can then email your comments to 8690 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8690; Package emacs. (Wed, 18 May 2011 15:59:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Drew Adams" <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 18 May 2011 15:59:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: <bug-gnu-emacs <at> gnu.org>
Subject: 24.0.50; `declare' doc; conflict with cl-macs.el
Date: Wed, 18 May 2011 08:58:26 -0700
Emacs has added `declare', choosing to use the same name as the Common
Lisp form.
 
If cl has been loaded, then `C-h f declare' says this:
 
 declare is a Lisp macro in `cl-macs.el'.
 
 (declare &rest SPECS)
 
 Not documented.
 
If cl has not been loaded, then it says this:
 
 declare is a Lisp macro in `subr.el'.
 
 (declare &rest SPECS)
 
 Do not evaluate any arguments and return nil.
 Treated as a declaration when used at the right place in a
 `defmacro' form.  (See Info anchor `(elisp)Definition of declare'.)
 
Something should be done about this.  Perhaps rename the cl form to
avoid the conflict?  Dunno.  But we shouldn't be getting into this kind
of conflict/confusion.  Unless the two are truly compatible, in which
case we should add the same doc string to the macro in cl-macs.el.
 

In GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
 of 2011-05-16 on 3249CTO
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (4.5) --no-opt --cflags
-Ic:/build/include'
 





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8690; Package emacs. (Fri, 01 Jul 2011 10:35:01 GMT) Full text and rfc822 format available.

Message #8 received at 8690 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 8690 <at> debbugs.gnu.org
Subject: Re: bug#8690: 24.0.50; `declare' doc; conflict with cl-macs.el
Date: Fri, 01 Jul 2011 12:29:20 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

> Something should be done about this.  Perhaps rename the cl form to
> avoid the conflict?  Dunno.  But we shouldn't be getting into this kind
> of conflict/confusion.  Unless the two are truly compatible, in which
> case we should add the same doc string to the macro in cl-macs.el.

The subr.el definition of `declare' is:

(defmacro declare (&rest _specs)
  "Do not evaluate any arguments and return nil.
Treated as a declaration when used at the right place in a
`defmacro' form.  \(See Info anchor `(elisp)Definition of declare'.)"
  nil)

The cl-macs.el definition is:
  
(defmacro declare (&rest specs)
  (if (cl-compiling-file)
      (while specs
	(if (listp cl-declare-stack) (push (car specs) cl-declare-stack))
	(cl-do-proclaim (pop specs) nil)))
  nil)

So the cl-macs.el version extends the macro, but it's just nil, anyway.

So perhaps the fix here is just to copy over the doc string from the
subr.el version to the cl-macs.el version?
  
-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 15 Jul 2011 13:48:03 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.1, send any further explanations to 8690 <at> debbugs.gnu.org and "Drew Adams" <drew.adams <at> oracle.com> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 15 Jul 2011 13:48:04 GMT) Full text and rfc822 format available.

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8690; Package emacs. (Fri, 15 Jul 2011 13:49:02 GMT) Full text and rfc822 format available.

Message #15 received at 8690 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 8690 <at> debbugs.gnu.org
Subject: Re: bug#8690: 24.0.50; `declare' doc; conflict with cl-macs.el
Date: Fri, 15 Jul 2011 15:47:32 +0200
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> So perhaps the fix here is just to copy over the doc string from the
> subr.el version to the cl-macs.el version?

I wrote a new doc string for the cl-macs.el version.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8690; Package emacs. (Fri, 15 Jul 2011 14:55:02 GMT) Full text and rfc822 format available.

Message #18 received at 8690 <at> debbugs.gnu.org (full text, mbox):

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Lars Magne Ingebrigtsen'" <larsi <at> gnus.org>
Cc: 8690 <at> debbugs.gnu.org
Subject: RE: bug#8690: 24.0.50; `declare' doc; conflict with cl-macs.el
Date: Fri, 15 Jul 2011 07:53:47 -0700
> > So perhaps the fix here is just to copy over the doc string from the
> > subr.el version to the cl-macs.el version?
> 
> I wrote a new doc string for the cl-macs.el version.

Hopefully your new doc is _not_ the same as what is in subr.el, unless these two
versions of the macro are in effect the same thing.

It is a bug, if the behaviors are different, to use the same doc.  That makes
things even more confusing.

Any differences between the two macros that affect results or behavior need to
be called out in the doc.  Hopefully you did that (?).

It's unfortunate that Emacs Dev sometimes uses the same names for cl.el stuff
and non-cl.el stuff.  And the addition of `declare' to non-cl Emacs is recent.
Hopefully the macros are identical in effect.  If not then we are introducing
bugs.

But if they are identical, then we should remove the cl.el version altogether,
so I'm guessing that they are not.





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8690; Package emacs. (Fri, 15 Jul 2011 15:02:02 GMT) Full text and rfc822 format available.

Message #21 received at 8690 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Drew Adams" <drew.adams <at> oracle.com>
Cc: 8690 <at> debbugs.gnu.org
Subject: Re: bug#8690: 24.0.50; `declare' doc; conflict with cl-macs.el
Date: Fri, 15 Jul 2011 17:00:54 +0200
"Drew Adams" <drew.adams <at> oracle.com> writes:

> But if they are identical, then we should remove the cl.el version altogether,
> so I'm guessing that they are not.

They're quite different.

Here's the cl.el doc string:

---
Declare SPECS about the current function while compiling.
For instance

  \(declare (warn 0))

will turn off byte-compile warnings in the function.
---

(If I were dictator, I'd dump Emacs with cl* in the image and get rid of
all these almost-cl functions from subr.el, but that's another long, old
and boring argument.)

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 13 Aug 2011 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 231 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.