GNU bug report logs -
#66136
29.1; byte-compiler reports "misplaced interactive spec" with empty fct in lexical environment
Previous Next
Full log
View this message in rfc822 format
Smaller test case is
-------------------- foo.el --------------------
;;; -*- lexical-binding: t -*-
(defun delete-process <at> emacs-fix (arg)
"Allows interactive calls."
(interactive "^P"))
-------------------- foo.el --------------------
And even smaller might be (but I cannot interpret the results for sure)
that
-------------------- bad case --------------------
(byte-compile-preprocess
'(defun delete-process <at> emacs-fix
(arg)
"Allows interactive calls."
(interactive "^P")))
=>
(defalias 'delete-process <at> emacs-fix
#'(lambda (arg) "Allows interactive calls."
(macroexp--funcall-if-compiled
'#[0 "\300:\203\0\303\304\300\"\202\0\304\300!\205\0\305\302\306\301#\207"
[lexical "Unused lexical argument ‘arg’" arg apply
byte-compile-warning-enabled-p byte-compile-warn-x
"%s"]
4...])
;; this dangling interactive form ultimately seems to
;; trigger the warning
(interactive "^P")))
-------------------- bad case --------------------
while
-------------------- good case --------------------
(byte-compile-preprocess
'(defun delete-process <at> emacs-fix
(arg)
"Allows interactive calls."
(interactive "^P")
nil))
=>
(defalias 'delete-process <at> emacs-fix
#'(lambda (arg) "Allows interactive calls."
(interactive "^P")
(macroexp--funcall-if-compiled
'#[0 "\300:\203\0\303\304\300\"\202\0\304\300!\205\0\305\302\306\301#\207"
[lexical "Unused lexical argument ‘arg’" arg apply
byte-compile-warning-enabled-p byte-compile-warn-x
"%s"]
4])
nil))
-------------------- good case --------------------
so `byte-compile-preprocess' could be the culprit here, inserting the
warning wrapped into the `macroexp--funcall-if-compiled' in the wrong
place.
This bug report was last modified 1 year and 300 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.