Opened 16 years ago

Closed 16 years ago

Last modified 16 years ago

#22 closed defect (fixed)

keyword parameters by same name as global variable

Reported by: ehuelsmann Owned by: somebody
Priority: major Milestone:
Component: other Version:
Keywords: Cc:
Parent Tickets:

Description

Don Cohen writes that the code below is problematic. Especially because of the DEFVAR form.

/tmp/build1

(in-package :cl-user)
(defpackage "AP5" (:use "CL") (:nicknames "ap5"))
(in-package :ap5)
(load "/tmp/compile.lsp" :print t)
(setf source-default-path "/backup/shuttle/home/don/ap5-2006/foo.lsp"

bin-default-path "/tmp/build-ap5/foo.fas")

(ensure-directories-exist bin-default-path)

(COMPILE-AP5 :recompile t)
;;(compile-ap5 :ask t)

/tmp/compile.lsp

(in-package "AP5")

(defvar info nil)
(defvar ask nil)
(defvar recompile nil)
(defvar nevercompile nil)
(defvar *changed* nil)
(defvar startfile nil)
(defvar stopfile t)
(defvar *start-time* 0)

(defun compile-ap5 (&key recompile nevercompile info ask

(break-at-end #+symbolics t) startfile (stopfile t)

&aux *changed* (*start-time* (get-universal-time))
#+(or symbolics ti) (global:inhibit-fdefine-warnings t))

; (compile-load "sys-depend")

(declare (special generator-cost-record record-expensive-and-costs))

)

Change History (2)

comment:1 Changed 16 years ago by Mark Evenson

Resolution: fixed
Status: newclosed

Duplicate of ticket:15

comment:2 Changed 16 years ago by ehuelsmann

As I can determine for now, this issue is caused by maybe-rewrite-lambda in precompile.lisp; see this input/output:

CL-USER(1): (defvar recompile nil)
RECOMPILE
CL-USER(2): (defun f (&key recompile))
F
CL-USER(3): (f :recompile t)
Debugger invoked on condition of type PROGRAM-ERROR:

Unrecognized keyword argument :RECOMPILE

Restarts:

0: TOP-LEVEL Return to top level.

[1] CL-USER(4): 0
CL-USER(5): (describe #'f)
#<FUNCTION F {146AD8B}> is an object of type FUNCTION.
The function's lambda list is:

(&KEY G33)

Note: See TracTickets for help on using tickets.