mirror of
git://git.code.sf.net/p/sbcl/sbcl
synced 2026-09-10 07:26:40 -04:00
find-original-source: don't treat (def . x) as a definition
And fail at printing it later. Fixes lp#2143114
This commit is contained in:
parent
2558856f78
commit
4d0dee1796
|
|
@ -215,9 +215,14 @@
|
|||
(when (atom form)
|
||||
(return))
|
||||
(let ((head (first form)))
|
||||
(when (symbolp head)
|
||||
(when (and (symbolp head)
|
||||
(listp (cdr form)))
|
||||
(let ((name (symbol-name head)))
|
||||
(when (and (>= (length name) 3) (string= name "DEF" :end1 3))
|
||||
(when (and (>= (length name) 3)
|
||||
(string= name "DEF" :end1 3)
|
||||
;; A common name that clearly isn't a definition
|
||||
(not (and (>= (length name) 7)
|
||||
(string= name "DEFAULT" :end1 7))))
|
||||
(context (source-form-context form))))))
|
||||
(when (null current)
|
||||
(return))
|
||||
|
|
|
|||
|
|
@ -361,3 +361,7 @@
|
|||
(lambda ()
|
||||
```(progn . ,,,(progn (progn (setq x 1)))))
|
||||
(1 1 1 1 2 1 1 1 2)))
|
||||
|
||||
(with-test (:name :def-error-context-printing)
|
||||
(let ((*error-output* (make-broadcast-stream)))
|
||||
(compile nil '(lambda () `(def . ,(print x))))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue