GNU bug report logs - #1417
23.0.60; defmacro declare syntax trips up on offsets

Previous Next

Package: emacs;

Reported by: bgoodr <at> gmail.com

Date: Mon, 24 Nov 2008 05:35:02 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

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 1417 in the body.
You can then email your comments to 1417 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 bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1417; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to bgoodr <at> gmail.com:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Brent Goodrick <bgoodr <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; defmacro declare syntax trips up on offsets
Date: Sun, 23 Nov 2008 10:57:07 -0800
I might be doing something wrong with a declare usage in a
macro. However, the construct use used to work in Emacs 22, but does
not work in Emacs 23. I tried to post this to the #emacs channel, but
got no takers (Sun Nov 23 10:51:21 PST 2008).  I did verify this with
"emacs -q".  I am using Emacs built from top of HEAD CVS as of Sun Nov
23 10:28:46 PST 2008 (Xft emacs).

Steps to reproduce:

1. Run M-x eval-buffer on the chunk of Elisp code below.

2. Move point into the some-macro-using-function, and invoke C-u M-x
   edebug-eval-defun (which I think is bound to C-u M-C-x in a emacs -q
   session).

3. Then do M-x some-macro-using-function, and step through that
   function and verify no error occurs while stepping with the
   "n" key binding.

4. Uncomment the "declare" line inside the definition of `some-macro'.

5. Run M-x eval-buffer on this file again to get the new definition of `some-macro'.

6. Repeat step #2 above, but this time notice you get an error similar
   to: 

  edebug-form: Wrong type argument: number-or-marker-p, ((416 (417 . 421) (422 (422 . 423) (423 . 427) . 427) (428 (428 . 429) (429 . 433) . 433) (434 (434 . 435) (435 . 439) . 439) . 440) . 441)

Here is the chunk of Elisp code (in between the "cut here" lines):

-- cut here --
(defmacro some-macro (some-directory &rest body-forms)
  "Bla bla bla. Yada yada yada."
  ;; (declare (indent 1) (debug sexp body))
  `(list 'foo))

(defun some-macro-using-function ()
  "Yacki-yack, yack, yack."
  (interactive)
  (some-macro
	  "snickers/are/good/eating"
	(list 'some 'form 'here)))
-- cut here --



In GNU Emacs 23.0.60.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.12.11)
 of 2008-11-23 on hungover
Windowing system distributor `The X.Org Foundation', version 11.0.10402000
configured using `configure  '--with-x-toolkit' '--with-xft' '--prefix=/home/brentg/emacs_from_source/install''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Help

Minor modes in effect:
  erc-list-mode: t
  erc-menu-mode: t
  erc-pcomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-button-mode: t
  erc-netsplit-mode: t
  desktop-save-mode: t
  iswitchb-mode: t
  erc-ring-mode: t
  erc-services-mode: t
  erc-networks-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  display-time-mode: t
  shell-dirtrack-mode: t
  delete-selection-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: 1
  transient-mark-mode: t
  view-mode: t

Recent input:
s <backspace> <backspace> e SPC s y n t a x ? <return> 
C-x o C-n C-n C-n C-n C-n C-n C-n <tab> <return> B 
C-n C-n M-n C-p C-l C-n C-n C-n C-n C-n C-n C-n C-l 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-l C-x o M-< C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n M-> M-x e m a c s - g b u <tab> <backspace> 
<backspace> <backspace> b u g <tab> <C-backspace> a 
p r o <tab> <return> b u g <return> C-x o C-x o C-s 
b u g - C-s C-s C-s C-s C-n C-n M-> C-s e m a c s C-s 
C-s C-s C-r C-r C-l C-s C-s C-s C-s C-s C-s C-s C-s 
C-r C-r C-s C-b <return> C-x o C-x o C-n C-x o C-n 
C-n C-x o C-n C-x o C-n C-x o C-n C-n C-n C-n C-n C-n 
C-n C-n M-x a p r o <tab> <return> r e p o r t . * 
b u g <return> C-n C-n C-n C-n C-n C-n C-n C-n C-n 
C-n C-n C-n C-n C-n C-M-SPC C-z C-h f C-v <return> 
M-x b <backspace> C-v <return>

Recent messages:
Pushed a window configuration. [2 times]
Mark saved where search started
Pushed a window configuration. [2 times]
Mark saved where search started
Pushed a window configuration.
Type "q" to delete this window.
Mark set
Renamed transient buffer "*Help*" to "*Help*<3>"
Pushed a window configuration.
Type "q" to restore this window.




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1417; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #10 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: bgoodr <at> gmail.com
Cc: 1417 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#1417: 23.0.60; defmacro declare syntax trips up on offsets
Date: Mon, 24 Nov 2008 11:11:59 -0500
> (defmacro some-macro (some-directory &rest body-forms)
>   "Bla bla bla. Yada yada yada."
>   ;; (declare (indent 1) (debug sexp body))
                                  ^^^^^^^^^
                                 (sexp body)

So the real bug is that this error is not caught in
`macro-declaration-function', and that error messages in Edebug's
parsing code are user-unfriendly.


        Stefan




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1417; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Stefan Monnier <monnier <at> iro.umontreal.ca>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1417; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Brent Goodrick" <bgoodr <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #20 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Brent Goodrick" <bgoodr <at> gmail.com>
To: "Stefan Monnier" <monnier <at> iro.umontreal.ca>
Cc: 1417 <at> debbugs.gnu.org, emacs-pretest-bug <at> gnu.org
Subject: Re: bug#1417: 23.0.60; defmacro declare syntax trips up on offsets
Date: Mon, 24 Nov 2008 09:36:43 -0800
[Message part 1 (text/plain, inline)]
Agreed.  As a "rider clause" to this bug: the debug specification does not
seem to show up in the Elisp Info manual at all.

Thanks Stefan.

On Mon, Nov 24, 2008 at 8:11 AM, Stefan Monnier <monnier <at> iro.umontreal.ca>wrote:

> > (defmacro some-macro (some-directory &rest body-forms)
> >   "Bla bla bla. Yada yada yada."
> >   ;; (declare (indent 1) (debug sexp body))
>                                  ^^^^^^^^^
>                                 (sexp body)
>
> So the real bug is that this error is not caught in
> `macro-declaration-function', and that error messages in Edebug's
> parsing code are user-unfriendly.
>
>
>        Stefan
>
[Message part 2 (text/html, inline)]

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1417; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Brent Goodrick" <bgoodr <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to bgoodr <at> gmail.com:
bug acknowledged by developer. Full text and rfc822 format available.

Message #30 received at 1417-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: Brent Goodrick <bgoodr <at> gmail.com>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>,
        1417-done <at> debbugs.gnu.org
Subject: Re: bug#1417: 23.0.60; defmacro declare syntax trips up on offsets
Date: Sat, 29 Nov 2008 22:01:31 -0500
I've checked in a fix to make `macro-declaration-function' complain on
such problematic declarations.




Message #31 received at 1417-done <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Brent Goodrick" <bgoodr <at> gmail.com>
To: "Chong Yidong" <cyd <at> stupidchicken.com>
Cc: "Stefan Monnier" <monnier <at> iro.umontreal.ca>,
        1417-done <at> debbugs.gnu.org
Subject: Re: bug#1417: 23.0.60; defmacro declare syntax trips up on offsets
Date: Sat, 29 Nov 2008 20:36:37 -0800
[Message part 1 (text/plain, inline)]
Thanks Chong (and Stefan)!!

On Sat, Nov 29, 2008 at 7:01 PM, Chong Yidong <cyd <at> stupidchicken.com> wrote:

> I've checked in a fix to make `macro-declaration-function' complain on
> such problematic declarations.
>
[Message part 2 (text/html, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> emacsbugs.donarmstrong.com. (Fri, 16 Jan 2009 15:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 213 days ago.

Previous Next


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