newLISP Fan Club

Forum => newLISP in the real world => Topic started by: HPW on February 15, 2005, 11:59:08 AM

Title: bug in init.lsp? (8.4.3)
Post by: HPW on February 15, 2005, 11:59:08 AM
Taken from 8.4.3 init.lsp

Isn't the the (constant ..) the else from '(if (not defun) ...)'

(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:



(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))))
Title:
Post by: Lutz on February 15, 2005, 03:42:54 PM
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