Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
9c7d2e6a
Commit
9c7d2e6a
authored
28 years ago
by
ram
Browse files
Options
Downloads
Patches
Plain Diff
Fix defmacro not to give bound-but-not referenced warning when we say &key with
no keys.
parent
8e2760ee
Branches
rearrange-dir
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/defmacro.lisp
+12
-5
12 additions, 5 deletions
code/defmacro.lisp
with
12 additions
and
5 deletions
code/defmacro.lisp
+
12
−
5
View file @
9c7d2e6a
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain.
;;; Carnegie Mellon University, and has been placed in the public domain.
;;;
;;;
(
ext:file-comment
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/defmacro.lisp,v 1.1
8
199
4/10/31 04:11:27
ram Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/defmacro.lisp,v 1.1
9
199
6/05/08 13:24:59
ram Exp $"
)
;;;
;;;
;;; **********************************************************************
;;; **********************************************************************
;;;
;;;
...
@@ -31,6 +31,10 @@
...
@@ -31,6 +31,10 @@
(
defvar
*default-default*
nil
(
defvar
*default-default*
nil
"Unsupplied optional and keyword arguments get this value defaultly."
)
"Unsupplied optional and keyword arguments get this value defaultly."
)
;; Temps that we introduce and might not reference.
(
defvar
*ignorable-vars*
)
;;;; Stuff to parse DEFMACRO, MACROLET, DEFINE-SETF-METHOD, and DEFTYPE.
;;;; Stuff to parse DEFMACRO, MACROLET, DEFINE-SETF-METHOD, and DEFTYPE.
...
@@ -51,7 +55,8 @@
...
@@ -51,7 +55,8 @@
(
parse-body
code
nil
doc-string-allowed
)
(
parse-body
code
nil
doc-string-allowed
)
(
let*
((
*arg-tests*
())
(
let*
((
*arg-tests*
())
(
*user-lets*
())
(
*user-lets*
())
(
*system-lets*
()))
(
*system-lets*
())
(
*ignorable-vars*
()))
(
multiple-value-bind
(
multiple-value-bind
(
env-arg-used
minimum
maximum
)
(
env-arg-used
minimum
maximum
)
(
parse-defmacro-lambda-list
lambda-list
arg-list-name
name
(
parse-defmacro-lambda-list
lambda-list
arg-list-name
name
...
@@ -59,13 +64,14 @@
...
@@ -59,13 +64,14 @@
nil
env-arg-name
)
nil
env-arg-name
)
(
values
(
values
`
(
let*
,
(
nreverse
*system-lets*
)
`
(
let*
,
(
nreverse
*system-lets*
)
,@
(
when
*ignorable-vars*
`
((
declare
(
ignorable
,@
*ignorable-vars*
))))
,@
*arg-tests*
,@
*arg-tests*
(
let*
,
(
nreverse
*user-lets*
)
(
let*
,
(
nreverse
*user-lets*
)
,@
declarations
,@
declarations
,@
body
))
,@
body
))
(
if
(
and
env-arg-name
(
not
env-arg-used
))
`
(
,@
(
when
(
and
env-arg-name
(
not
env-arg-used
))
`
((
declare
(
ignore
,
env-arg-name
)))
`
((
declare
(
ignore
,
env-arg-name
)))))
nil
)
documentation
documentation
minimum
minimum
maximum
)))))
maximum
)))))
...
@@ -156,6 +162,7 @@
...
@@ -156,6 +162,7 @@
((
eq
var
'&key
)
((
eq
var
'&key
)
(
setf
now-processing
:keywords
)
(
setf
now-processing
:keywords
)
(
setf
rest-name
(
gensym
"KEYWORDS-"
))
(
setf
rest-name
(
gensym
"KEYWORDS-"
))
(
push
rest-name
*ignorable-vars*
)
(
setf
restp
t
)
(
setf
restp
t
)
(
push-let-binding
rest-name
path
t
))
(
push-let-binding
rest-name
path
t
))
((
eq
var
'&allow-other-keys
)
((
eq
var
'&allow-other-keys
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment