Raymond Toy pushed to branch issue-499-defmacro-restart-for-locked-packages at cmucl / cmucl
Commits:
-
944ad9bf
by Raymond Toy at 2026-05-02T19:36:47-07:00
1 changed file:
Changes:
| ... | ... | @@ -77,30 +77,6 @@ |
| 77 | 77 | ;;; definition is done by %defmacro which we expand into.
|
| 78 | 78 | ;;;
|
| 79 | 79 | (defmacro defmacro (name lambda-list &body body)
|
| 80 | - #+nil
|
|
| 81 | - (when lisp::*enable-package-locked-errors*
|
|
| 82 | - (multiple-value-bind (valid block-name)
|
|
| 83 | - (ext:valid-function-name-p name)
|
|
| 84 | - (declare (ignore valid))
|
|
| 85 | - (let ((package (symbol-package block-name)))
|
|
| 86 | - (when package
|
|
| 87 | - (when (ext:package-definition-lock package)
|
|
| 88 | - (restart-case
|
|
| 89 | - (error 'lisp::package-locked-error
|
|
| 90 | - :package package
|
|
| 91 | - :format-control (intl:gettext "defining macro ~A")
|
|
| 92 | - :format-arguments (list name))
|
|
| 93 | - (continue ()
|
|
| 94 | - :report (lambda (stream)
|
|
| 95 | - (write-string (intl:gettext "Ignore the lock and continue") stream)))
|
|
| 96 | - (unlock-package ()
|
|
| 97 | - :report (lambda (stream)
|
|
| 98 | - (write-string (intl:gettext "Disable the package's definition-lock then continue") stream))
|
|
| 99 | - (setf (ext:package-definition-lock package) nil))
|
|
| 100 | - (unlock-all ()
|
|
| 101 | - :report (lambda (stream)
|
|
| 102 | - (write-string (intl:gettext "Unlock all packages, then continue") stream))
|
|
| 103 | - (lisp::unlock-all-packages))))))))
|
|
| 104 | 80 | (let ((whole (gensym "WHOLE-"))
|
| 105 | 81 | (environment (gensym "ENV-")))
|
| 106 | 82 | (multiple-value-bind
|