Also, it is never incorrect to delete declarations, other than (optimize
safety) and (special ...), because in all other cases implementations
are allowed to ignore them.
I'd be fine with not removing the declarations; that will mean that all
user code which tries to declare the type of a dolist iteration variable
would instead have to do e.g.
(dolist (s list 'foo)
(let ((s s))
(declare (string s))
...))
which strictly speaking is necessary for actual conforming code.
Also, it is never incorrect to delete declarations, other than (optimize
safety) and (special ...), because in all other cases implementations
are allowed to ignore them.
I'd be fine with not removing the declarations; that will mean that all
user code which tries to declare the type of a dolist iteration variable
would instead have to do e.g.
(dolist (s list 'foo)
(let ((s s))
(declare (string s))
...))
which strictly speaking is necessary for actual conforming code.
Christophe