melisgl / named-readtables

The official repo of named-readtables.
Other
66 stars 15 forks source link

more precisely & completely quiet SBCL's &optional-and-&key warning #25

Closed gefjon closed 3 years ago

gefjon commented 3 years ago

Prior to this commit, building this system in SBCL signaled a style-warning of type sb-kernel:&optional-and-&key-in-lambda-list from line 243 of [src/named-readtables.lisp], the definition of make-readtable. This was despite obvious work in the definition of define-api to prevent such warnings. This commit makes two SBCL-specific changes, which result in that warning no longer being printed:

  1. define-api muffles only sb-kernel:&optional-and-&key-in-lambda-list, around its defun, not all of style-warning. This makes more obvious why the locally muffle-conditions is there, and prevents accidentally muffling other conditions.

  2. define-api no longer unmuffles any conditions around its body. This means that sb-kernel:&optional-and-&key-in-lambda-list is muffled in both the definition and the body of define-api's defun form. I suspect that unmuffling in the body is what caused make-readtable to issue that warning.

melisgl commented 3 years ago

Thank you for the report. Committed a different fix in c7f57af, which does not silence any warnings in the body.