bug in init.lsp? (8.4.3)

Q&A's, tips, howto's
Locked
HPW
Posts: 1390
Joined: Thu Sep 26, 2002 9:15 am
Location: Germany
Contact:

bug in init.lsp? (8.4.3)

Post by HPW »

Taken from 8.4.3 init.lsp
Isn't the the (constant ..) the else from '(if (not defun) ...)'

Code: Select all

(if (not defun) ; loading twice would fail because of constant
  (define-macro (defun _func-name _arguments)
    (set _func-name (append 
      '(lambda ) 
       (list _arguments)
       (args))))

  (constant (global 'defun)))
should be:

Code: Select all

(if (not defun) ; loading twice would fail because of constant
 (begin
  (define-macro (defun _func-name _arguments)
    (set _func-name (append 
      '(lambda ) 
       (list _arguments)
       (args))))
 (constant (global 'defun))))
Hans-Peter

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

Yes, thanks for the correction. I will post a new init.lsp in the download directory. If 'defun' is not defined it should define it and make it contans/global. The last statement should also be indented to the same level as the 'define-macro'.

Lutz

Locked