|
From: | Emanuel Berg |
Subject: | Re: closure within closure, incorrect (?) byte-compiler warnings |
Date: | Tue, 09 Nov 2021 00:35:39 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
>> You might want to `M-x report-emacs-bug` (and if so, please >> put me in the `X-Debbugs-Cc:`). > > OK, I hope to do that soon ... This sums it up ... three bugs? ;;; -*- lexical-binding: t -*- ;;; ;;; this file: ;;; http://user.it.uu.se/~embe8573/emacs-init/geh.el ;;; https://dataswamp.org/~incal/emacs-init/geh.el (let ((data-item 1) (more-data 2) ) (defun echo-data (&optional data) (interactive (list (read-number "number: " (or data-item more-data)))) (message "data: %s" (or data data-item)) )) ;; (echo-data 5) ;; (echo-data) ;; (call-interactively #'echo-data) ;; Emacs bugs: ;; ;; 1. Byte compiler warnings (two cases) relating to the ;; interactive spec: ;; ;; geh.el:7:1: Warning: Unused lexical variable `more-data' ;; geh.el:10:54: Warning: reference to free variable ‘data-item’ ;; geh.el:10:64: Warning: reference to free variable ‘more-data’ ;; ;; 2. When the compiled version is used interactively: ;; ;; Symbol's value as variable is void: data-item -- underground experts united https://dataswamp.org/~incal
[Prev in Thread] | Current Thread | [Next in Thread] |