Bug: defmacro environment variable declaration

Willem Broekema <[email protected]>
Newsgroups gmane.editors.j.devel
Message-ID <[email protected]>
In the following form:

(defmacro m (&environment e)                                                                                         
  (declare (ignore e))                                                                                                                                  
  'm)))

The declaration ends up in the wrong place after macro expansion:

(LAMBDA (#:WHOLE-5584 #:ENVIRONMENT-5585)
  (LET* ((E #:ENVIRONMENT-5585))
    ;; the  (DECLARE (IGNORE E)) should go here
    (UNLESS (<= 0 (SYSTEM::DOT-LENGTH (CDR #:WHOLE-5584)) 0)
      (SYSTEM::ARG-COUNT-ERROR 'DEFMACRO
                               'M
                               (CDR #:WHOLE-5584)
                               '(&ENVIRONMENT E)
                               0
                               0))
    (LET* ()
      (DECLARE (IGNORE E)) ;; but it ends up here
      (BLOCK M 'M))))

Using Armed Bear Common Lisp 1.5.0

- Willem
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.