tags 33314 unreproducible moreinfo
quit
Andreas Röhler <andreas.roehler@online.de> writes:
So regexpvalue is used too. May send the complete function if interested.
Please do, I can't reproduce the warning you claimed in your original
report (and frankly, I think you've been doing this long enough that you
should know by now that such an abbreviated report is not very helpful).
Trying to fill in your example like this:
;;; -*- lexical-binding: t -*-
(defun foo (regexp &optional something)
"..."
(unless (bobp)
(when (empty-line-p) (skip-chars-backward " \t\r\n\f"))
(let* ((orig (point))
(regexpvalue (if (eq regexp 'py-clause-re)
(symbol-value
'py-extended-block-or-clause-re)
(symbol-value regexp))))
t)))
gives
bug-33314-bcomp-warning.el:3:1:Warning: Unused lexical variable
‘regexpvalue’
bug-33314-bcomp-warning.el:3:1:Warning: Unused lexical variable ‘orig’
bug-33314-bcomp-warning.el:3:1:Warning: Unused lexical argument ‘something’
In end of data:
bug-33314-bcomp-warning.el:13:1:Warning: the function ‘empty-line-p’ is not
known to be defined.
`regexp' is not mentioned, but the other unused variables are, as
expected.