summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
b970768)
The `@COMMON' definitions get 1000--9999, and users get everything else.
Make a note of this, and renumber all of the code fragments.
;;;--------------------------------------------------------------------------
[@COMMON]
;;;--------------------------------------------------------------------------
[@COMMON]
+;; In order to avoid leaking symbols in `cl-user', the code fragments here
+;; and in implementation definitions need to use uninterned symbols for their
+;; local names, and use `#N=' and `#N#' reader macros to refer to them. In
+;; order to prevent conflicts with the ID numbers in these, the fragments
+;; here use ID numbers from 1000 up to 9999, leaving 0--999 (and, if you
+;; really need them, 10000 on upwards) for individual implementations.
+
;; Turn `#!' into a comment-to-end-of-line. This is used in all Lisp
;; invocations, even though some of them don't apparently need it. For
;; example, SBCL ignores an initial line beginning `#!' as a special feature
;; Turn `#!' into a comment-to-end-of-line. This is used in all Lisp
;; invocations, even though some of them don't apparently need it. For
;; example, SBCL ignores an initial line beginning `#!' as a special feature
ignore-shebang =
(set-dispatch-macro-character
#\\# #\\!
ignore-shebang =
(set-dispatch-macro-character
#\\# #\\!
- (lambda (#1=#:stream #2=#:char #3=#:arg)
- (declare (ignore #2# #3#))
- (values (read-line #1#))))
+ (lambda (#1000=#:stream #1001=#:char #1002=#:arg)
+ (declare (ignore #1001# #1002#))
+ (values (read-line #1000#))))
;; Clear all present symbols from the `COMMON-LISP-USER' package. Some Lisps
;; leave débris in `COMMON-LISP-USER' -- for example, ECL leaves some
;; allegedly useful symbols lying around, while ABCL has a straight-up bug in
;; its `adjoin.lisp' file.
clear-cl-user =
;; Clear all present symbols from the `COMMON-LISP-USER' package. Some Lisps
;; leave débris in `COMMON-LISP-USER' -- for example, ECL leaves some
;; allegedly useful symbols lying around, while ABCL has a straight-up bug in
;; its `adjoin.lisp' file.
clear-cl-user =
- (let ((#4=#:pkg (find-package "COMMON-LISP-USER")))
- (with-package-iterator (#5=#:next #4# :internal)
- (loop (multiple-value-bind (#6=#:anyp #7=#:sym #8=#:how)
- (#5#)
- (declare (ignore #8#))
- (unless #6# (return))
- (unintern #7# #4#)))))
+ (let ((#1200=#:pkg (find-package "COMMON-LISP-USER")))
+ (with-package-iterator (#1201=#:next #1200# :internal)
+ (loop (multiple-value-bind (#1202=#:anyp #1203=#:sym #1204=#:how)
+ (#1201#)
+ (declare (ignore #1204#))
+ (unless #1202# (return))
+ (unintern #1203# #1200#)))))
;; Add `:runlisp-script' to `*features*' so that scripts can tell whether
;; they're supposed to sit quietly and be debugged in a Lisp session or run
;; Add `:runlisp-script' to `*features*' so that scripts can tell whether
;; they're supposed to sit quietly and be debugged in a Lisp session or run
${command} -b -n -Q
-e "${dump-image-prelude}"
-e "(ccl::in-development-mode
${command} -b -n -Q
-e "${dump-image-prelude}"
-e "(ccl::in-development-mode
- (let ((#1=#:real-ccl-dir (ccl::ccl-directory)))
+ (let ((#0=#:real-ccl-dir (ccl::ccl-directory)))
(defun ccl::ccl-directory ()
(defun ccl::ccl-directory ()
(ccl:getenv \"CCL_DEFAULT_DIRECTORY\")))
(ccl:getenv \"CCL_DEFAULT_DIRECTORY\")))
- (if (and #2# (plusp (length (namestring #2#))))
- (ccl::native-to-directory-pathname #2#)
- #1#))))
+ (if (and #1# (plusp (length (namestring #1#))))
+ (ccl::native-to-directory-pathname #1#)
+ #0#))))
(compile 'ccl::ccl-directory))"
-e "(ccl:save-application \"${@image-new|q}\"
:init-file nil
(compile 'ccl::ccl-directory))"
-e "(ccl:save-application \"${@image-new|q}\"
:init-file nil
command = ${@ENV:ABCL?abcl}
abcl-startup =
command = ${@ENV:ABCL?abcl}
abcl-startup =
- (let ((#9=#:script "${@script|q}"))
+ (let ((#0=#:script "${@script|q}"))
${run-script-prelude}
${clear-cl-user}
(setf *error-output*
${run-script-prelude}
${clear-cl-user}
(setf *error-output*
(java:jfield "java.lang.System" "err")
\'character
java:+true+))
(java:jfield "java.lang.System" "err")
\'character
java:+true+))
- (handler-case (load #9# :verbose nil :print nil)
+ (handler-case (load #0# :verbose nil :print nil)
- (format *error-output* "~A (unhandled error): ~A~%" #9# error)
+ (format *error-output* "~A (unhandled error): ~A~%" #0# error)
(ext:quit :status 255))))
run-script =
(ext:quit :status 255))))
run-script =