From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: hendeigr Newsgroups: gmane.emacs.help Subject: Re: Error with add-function and process-filter Date: Mon, 11 Mar 2024 18:21:21 +0000 Message-ID: References: <87h6hczlzj.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10703"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Monnier , help-gnu-emacs@gnu.org To: tpeplt Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 11 19:28:23 2024 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rjkNr-0002XS-Aa for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 11 Mar 2024 19:28:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rjkJ7-0001IG-0p; Mon, 11 Mar 2024 14:23:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rjkHc-0007lk-AV for help-gnu-emacs@gnu.org; Mon, 11 Mar 2024 14:22:03 -0400 Original-Received: from mail-4325.protonmail.ch ([185.70.43.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rjkHV-0007jO-NN for help-gnu-emacs@gnu.org; Mon, 11 Mar 2024 14:21:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1710181300; x=1710440500; bh=1J21RllnzFHzmFBfxPTOURFegY97NZ/SHFuPcpbG52I=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=b85u+MpyiVrTtHzh2TtwUKhbWXigiRYdgj2tALl8D8MdngZ07Lk1cXuGc6grSqfQw c4D1Q2lm0uPZwJTttOccRer2eLC1jJgDzkgkg2cGvPIcaUf+2eLcO0lCcVGb5n0gEF Bn+w1qkUqYrp5RoYSw/77fWUBZIwvnlvQeTmJ6G530VW6S4J+mjCQ53vqM5j0daDMq 9IQwgGYY/sO4EzYsbfyRNcpMhoa1rY6vMa3+AliKSPOaXEFMGmStXqyeS5s2Qcy3Ix I0j5RwheJ98A9yf/R7Xi3Gq8qZ6JLsJ9VdRMkTRHFhs9DePb1aXRtgKZ0TuQG9Xy58 eXxnZI2Yn1Y4A== In-Reply-To: <87h6hczlzj.fsf@gmail.com> Feedback-ID: 22618419:user:proton Received-SPF: pass client-ip=185.70.43.25; envelope-from=hendeigr@protonmail.com; helo=mail-4325.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:146077 Archived-At: Sent with Proton Mail secure email. On Monday, 11 March 2024 at 18:01, tpeplt wrote: > > > (add-function :before (process-filter h-proc) #'h/trace) > > > [...] > > > However, am getting this error: > > > Symbol=E2=80=99s value as variable is void: v > >=20 > > My crystal ball tells me you forgot to activate `lexical-binding` > > because you didn't see the message that must have been emitted at some > > point: > >=20 > > Warning: Use of gv-ref probably requires lexical-binding > >=20 > > If you're using a new enough Emacs you can click on the orange "/d" in > > your mode line to fix the problem. >=20 >=20 > If you are not using a new enough version of Emacs, then add the > following line to the beginning (the very first line) of your Emacs Lisp > file: >=20 > ;; -- lexical-binding: t; -- >=20 > That is what clicking on the "/d" will do for you. >=20 > -- That's got it! Thank you both for your prompt responses. Now its time for m= e to learn more about dynamic binding vs lexical binding! Thanks again, James