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
Container 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
Tarn Burton
cmucl
Commits
aa238b62
Commit
aa238b62
authored
14 years ago
by
rtoy
Browse files
Options
Downloads
Patches
Plain Diff
code/extfmts.lisp
o Add some comments from Paul Foley on what arguments to DEF-EF-MACRO mean.
parent
6b9c5442
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/extfmts.lisp
+22
-2
22 additions, 2 deletions
code/extfmts.lisp
with
22 additions
and
2 deletions
code/extfmts.lisp
+
22
−
2
View file @
aa238b62
...
...
@@ -5,7 +5,7 @@
;;; domain.
;;;
(
ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/extfmts.lisp,v 1.35.4.
5
2010/09/06
01:01
:2
7
rtoy Exp $"
)
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/extfmts.lisp,v 1.35.4.
6
2010/09/06
15:35
:2
8
rtoy Exp $"
)
;;;
;;; **********************************************************************
;;;
...
...
@@ -697,7 +697,27 @@ character and illegal outputs are replaced by a question mark.")
;;; DEF-EF-MACRO -- Public
;;;
;;;
;;; Create an ef-macro (external-format macro). This creates a
;;; function named Name that will process an external format in the
;;; desired way.
;;;
;;; Paul Foley says:
;;; All the existing ef-macros are provided with the implementation,
;;; so they all use lisp::lisp as the id; it's intended for people
;;; who want to write their own macros~there are some number of
;;; slots (+ef-max+) used by the implementation; the idea is that
;;; you can write something like (def-ef-macro foo (ef my-tag 4 1)
;;; ...) to implement 1 of a total of 4 new macros in your own
;;; "namespace", without having to know how many are implemented by
;;; others (e.g., the 10 used by the base implementation...which
;;; could change with the next release -- and if several libraries
;;; each add their own, the total number, and the position of each
;;; one's slots within that total, may change depending on load
;;; order, etc.) When you write the above, it allocates 4 new
;;; places and associates the base index with "my-tag", then the
;;; "idx" value is relative to that base. The id lisp:lisp always
;;; has its base at 0, so it doesn't need to go through ensure-cache
;;; to find that out.
(
defmacro
def-ef-macro
(
name
(
ef
id
reqd
idx
)
body
)
(
let*
((
tmp1
(
gensym
))
(
tmp2
(
gensym
))
...
...
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