From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#30241: Emacs 26.0.91: "Generalized variables" are not defined. Date: Wed, 24 Jan 2018 15:49:03 -0500 Message-ID: References: <20180124200652.GA4493@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: blaine.gmane.org 1516826902 17583 195.159.176.226 (24 Jan 2018 20:48:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 24 Jan 2018 20:48:22 +0000 (UTC) Cc: 30241@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jan 24 21:48:17 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeRxm-0003gh-PF for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Jan 2018 21:48:06 +0100 Original-Received: from localhost ([::1]:45319 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eeRzn-00022M-Cj for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Jan 2018 15:50:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43716) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eeRzh-000225-O0 for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2018 15:50:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eeRze-0006FL-K2 for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2018 15:50:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33458) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eeRze-0006F9-GA for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2018 15:50:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eeRze-000284-95 for bug-gnu-emacs@gnu.org; Wed, 24 Jan 2018 15:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Jan 2018 20:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30241 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30241-submit@debbugs.gnu.org id=B30241.15168269518119 (code B ref 30241); Wed, 24 Jan 2018 20:50:02 +0000 Original-Received: (at 30241) by debbugs.gnu.org; 24 Jan 2018 20:49:11 +0000 Original-Received: from localhost ([127.0.0.1]:41355 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeRyo-00026t-Rv for submit@debbugs.gnu.org; Wed, 24 Jan 2018 15:49:11 -0500 Original-Received: from mail-wm0-f51.google.com ([74.125.82.51]:43439) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eeRyn-00026d-Hb for 30241@debbugs.gnu.org; Wed, 24 Jan 2018 15:49:09 -0500 Original-Received: by mail-wm0-f51.google.com with SMTP id g1so10832106wmg.2 for <30241@debbugs.gnu.org>; Wed, 24 Jan 2018 12:49:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Mphb++XhYZ/oKGeGziL0HyfFaACAQAIuNI9FUFoX/l4=; b=c4Z+yNaQ4VtdjDDW5bgprXW1Htr2R6uoFo7Pn3ihUqtK/CjZgvnFFDLfhnWH/W0Utd Po+KyI+9Dj140NYoFXESQVfwFGvwDtyIVhmOiLr71FSHG98vqtF26Md16HzOu0NbNH9B 7C4fX2f3ZjRqncMLaE93kuGbNAQsnJf1rt7JK0Q0M/knG1fX4pFOpudqhRpY7fLB0rWG nP1jSACu2beit+93AtvBmQfpXtUlb1v8bcw3Cp/qbgwumMeiYooOqi8zks251egDRogM 86BgUJwhNh1ErcTp0xy441a/aWcettKcIqTiQHDI2LPvUmkz150k7X6CHWKaKELlrmFg Xh7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Mphb++XhYZ/oKGeGziL0HyfFaACAQAIuNI9FUFoX/l4=; b=EkK11ZPxnRgwXueiyvlUj3iFVmxStW7oHHlB09vRZKyMNtxLFKYA90E9dvI+hK3IRu CqhCMv4nUuJYrhda78LnRmKOxgRxDorXsVW021Ysm751lnetQuGmQ14uTidIEia9WeHe YElYDbQ5KFGPC3LgJDx26qKnIFc6ZeIdGrwfjr6Xc5TAa0q6arTAaVDp4CS4fbSpE/bg 9asYaoUK47Skz8dQkrgilsbF5/CJWrBd0mk9fRF5w2dnSi4O9h3LoP2hqCZhIcMkyTTI LZXVi1M1SDbfatKlWvhIOAjo748N1KHlXaGQF5dCakAGa33cigulkSfj+pTLdf9TsO3C dKHA== X-Gm-Message-State: AKwxytdiWWNjyN23aoIhD7wedpOvHjlbgelW20VY8ROLeqYKz9axoB1K QjF7nfY+t3T90hBIZ/QPCAXcM3hVHps0zLeAsOY= X-Google-Smtp-Source: AH8x226HrYSGYKaEpXwrBsNNqrJ6QwsQuOw+M5sQi34/t2V2Kngqo2M+DK0HS88oqz++d0g275UUXDHhcnWbBMYKWCY= X-Received: by 10.28.35.200 with SMTP id j191mr6452915wmj.146.1516826943695; Wed, 24 Jan 2018 12:49:03 -0800 (PST) Original-Received: by 10.223.182.77 with HTTP; Wed, 24 Jan 2018 12:49:03 -0800 (PST) In-Reply-To: <20180124200652.GA4493@ACM> X-Google-Sender-Auth: JfeJECw3LtdKyjIa2LOgy8Itmbo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:142481 Archived-At: On Wed, Jan 24, 2018 at 3:06 PM, Alan Mackenzie wrote: > (add-function :before sit-for (lambda () (acm-backtrace 5))) > (add-function :before 'sit-for (....)) > (add-function :before #'sit-for (.....)) > (add-function :before (symbol-function 'sit-for) (....)) > > , and got nothing but unhelpful error messages back, such as > > Symbol's value as variable is void: sit-for Your last form works for me, but the lambda has to accept the same arguments as sit-for. (add-function :before (symbol-function 'sit-for) (lambda (&rest _) (acm-backtrace 5))) I think advice-add would make more sense for that use case though. (advice-add 'sit-for :before (lambda (&rest _) (acm-backtrace 5)))