From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 11320 invoked from network); 7 Sep 2021 20:35:52 -0000 Received: from mx1.math.uh.edu (129.7.128.32) by inbox.vuxu.org with ESMTPUTF8; 7 Sep 2021 20:35:52 -0000 Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mNhos-00GuCh-9J for ml@inbox.vuxu.org; Tue, 07 Sep 2021 15:35:50 -0500 Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.94) (envelope-from ) id 1mNhor-002YhA-QT for ml@inbox.vuxu.org; Tue, 07 Sep 2021 15:35:49 -0500 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94) (envelope-from ) id 1mNhor-002Yh5-2N for ding@lists.math.uh.edu; Tue, 07 Sep 2021 15:35:49 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mNhoo-00GuCX-EW for ding@lists.math.uh.edu; Tue, 07 Sep 2021 15:35:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References :Message-ID:Date:Subject:From:To:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=+6cFeNrzpm8p3GTMOS7yGsY2Z1c0mY+9M3QJsyKW77c=; b=eOQCUgJ7sIyIASsgwOYmTSOujH BHNT1VBMvxB25iABA6RY1BYq/FrblH9aJYxEBTRO3OxH6YHhGrw84+LzlYZHUo/K3+MhvLbgmDQJn KHJ2uEzWtXCOZ1pe8om9Rm0TNu7u+k18dHsEwh3UhzyF77NAic521Nq8Em5HudpNqK4I=; Received: from ciao.gmane.io ([116.202.254.214]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mNhoh-0001SE-A0 for ding@gnus.org; Tue, 07 Sep 2021 22:35:42 +0200 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mNhof-0007i8-Ja for ding@gnus.org; Tue, 07 Sep 2021 22:35:37 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org To: ding@gnus.org From: Emanuel Berg Subject: Re: for a given emacs session: insert a subject with an increasing counter Date: Tue, 07 Sep 2021 22:35:28 +0200 Message-ID: <87bl54unsf.fsf@zoho.eu> References: <87v93maplq.fsf@mat.ucm.es> <87h7f629rj.fsf@ucl.ac.uk> <87o89e85vg.fsf@mat.ucm.es> <87k0k2aynw.fsf@tullinup.koldfront.dk> <8735qpd3jj.fsf@mat.ucm.es> <87tuj5j6f9.fsf@gmail.com> <87wnnw747v.fsf@mat.ucm.es> <87ilzcnwc3.fsf@zoho.eu> <87fsuggqes.fsf@ericabrahamsen.net> <87zgsour1m.fsf@zoho.eu> <87fsuguozt.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cancel-Lock: sha1:2nVrbtP/GE4Nn1E3iVyg1Aw5Q40= Mail-Copies-To: never List-ID: Precedence: bulk > Ah, now I understand what you mean. With `let' inside, the > variable will reset, so it cannot count, but with `let' > outside (the closure), as you say "it can treat it like > a globally-defined variable". But now, the byte-compiler will complain Warning: the function ‘insert-subject-counter’ is not known to be defined. so now we need not `defvar' but "deffunc" to make it explicitly global/dynamic :P -- underground experts united https://dataswamp.org/~incal