Loading code/extfmts.lisp +22 −2 Original line number Diff line number Diff line Loading @@ -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:27 rtoy Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/extfmts.lisp,v 1.35.4.6 2010/09/06 15:35:28 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; Loading Loading @@ -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)) Loading Loading
code/extfmts.lisp +22 −2 Original line number Diff line number Diff line Loading @@ -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:27 rtoy Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/extfmts.lisp,v 1.35.4.6 2010/09/06 15:35:28 rtoy Exp $") ;;; ;;; ********************************************************************** ;;; Loading Loading @@ -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)) Loading