From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tongjie Chen Newsgroups: gmane.emacs.bugs Subject: bug#54240: emacs/lisp/emacs-lisp/derived.el patch Date: Thu, 3 Mar 2022 22:28:23 -0500 Message-ID: References: <87sfrzgdpp.fsf@gnus.org> <87a6e6pn8j.fsf@web.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000129c1105d95c1c2b" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5726"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 54240@debbugs.gnu.org, Lars Ingebrigtsen To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 04 04:29:15 2022 Return-path: Envelope-to: geb-bug-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 1nPyd0-0001G2-DU for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Mar 2022 04:29:14 +0100 Original-Received: from localhost ([::1]:33816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nPycz-0001o5-73 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 03 Mar 2022 22:29:13 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:52314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nPyco-0001nn-F0 for bug-gnu-emacs@gnu.org; Thu, 03 Mar 2022 22:29:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nPyco-0004TW-6R for bug-gnu-emacs@gnu.org; Thu, 03 Mar 2022 22:29:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nPycn-0007W3-VC for bug-gnu-emacs@gnu.org; Thu, 03 Mar 2022 22:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Tongjie Chen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Mar 2022 03:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54240 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 54240-submit@debbugs.gnu.org id=B54240.164636452228866 (code B ref 54240); Fri, 04 Mar 2022 03:29:01 +0000 Original-Received: (at 54240) by debbugs.gnu.org; 4 Mar 2022 03:28:42 +0000 Original-Received: from localhost ([127.0.0.1]:44298 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPycU-0007VV-0n for submit@debbugs.gnu.org; Thu, 03 Mar 2022 22:28:42 -0500 Original-Received: from mail-ot1-f44.google.com ([209.85.210.44]:35388) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nPycS-0007VJ-I4 for 54240@debbugs.gnu.org; Thu, 03 Mar 2022 22:28:41 -0500 Original-Received: by mail-ot1-f44.google.com with SMTP id l25-20020a9d7a99000000b005af173a2875so6371789otn.2 for <54240@debbugs.gnu.org>; Thu, 03 Mar 2022 19:28:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=82ssG/CmHLpFKncldFOccUQ5OtUSACW/FeczNx9jpg0=; b=N8GG1oql+7wSUpgw4Dk/Hsq/K8gwDUf6eD3+ji5kxQtYd1MCIOx6hL+zTCpR9oCSzy BKD0V1IjH5dZ0utj4l+R0tvOZv5jQSzRAJYnW/nPITW7zCDFjC7zDpEuBTUeo0Jzc0xh faL3QcEYCRkBRUX5/9QuxXtynoNDQT5cClewgU3oerIYEpBRk1Sy4J2aY4Xb9zurU9Cn u8abPNTuHQv5aOvcWXwyiO82SlWi4DkYBwemdCbVk64vNPf+0S8S2QWx3vrY917ajbNe uZewroYvmzGtIvK9+YAG87nhOK7BeG1TRxcQ2KmRcnBnie/AKFO+RR13A+VwlheFqBuC Ninw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=82ssG/CmHLpFKncldFOccUQ5OtUSACW/FeczNx9jpg0=; b=JYW3Bks9XIxri61yBzyXc6BJud6Te37IKmr1SopealkK5IC38Q7eiQm0YpHTQj5r/h uhO0YHZz7Opr52Cb8P1iNkw3F5tdDQOOeG6ZebWpjmoKaTLMkMKYQX0wyH9MdW9WGpGf fDq8DhJelUB6mU+sAMmYmnCfGpO7XidxooapfZ2wSugh+rkwV3GTK6yfWbRwwPNoSIJI 9Q+dfIEzh+dL2IbrmWrFVD553mbQFHX+ct/fU8alMKNLiC9y7Ddq2bOVcPJYGpr/Ss+9 7J1RJ95rPc/R8LdKrmMiawuPZ6vQgdRQr9OrifQmQDVEc7VLHInXR+bXV3ohaQRo01W4 iZDg== X-Gm-Message-State: AOAM531ii3dPsTnM1rmQfDE5RHo1848bjWx8I1S2akG+Qbw2j+rsl9cB rN8m1J5/N9XGI6k4teQFm0afggu6DA9wX8LL+l8= X-Google-Smtp-Source: ABdhPJxeBgVJIXS07KfAlrPYBDpo9NcbtcqjwTYNXZR4EmSWCww5/XY23lS+HaQi4SjGpRCo/t210EAs6M41FphW3uU= X-Received: by 2002:a9d:5f95:0:b0:5af:4acc:68b2 with SMTP id g21-20020a9d5f95000000b005af4acc68b2mr21532504oti.359.1646364514751; Thu, 03 Mar 2022 19:28:34 -0800 (PST) In-Reply-To: <87a6e6pn8j.fsf@web.de> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:227985 Archived-At: --000000000000129c1105d95c1c2b Content-Type: text/plain; charset="UTF-8" Thanks Michael. I tested this improved quoting and it worked. Once the abbrev table is defined, jdee will no longer run into problems. A strange thing is when eval the previous non patched defun, jdee will work. Wonder if "mode" was leaked somewhere. On Thu, Mar 3, 2022 at 7:36 PM Michael Heerdegen wrote: > Lars Ingebrigtsen writes: > > > > - (define-abbrev-table (derived-mode-abbrev-table-name mode) nil) > > > + ,(define-abbrev-table (derived-mode-abbrev-table-name mode) nil) > > > > The code looks correct the way it is, I think? > > To me this looks like a regression introduced when converting to lexical > binding. Look at the symbol 'mode': it's implicitly quoted so it can't > refer to the lexical variable and you get the error reported. > > The patch unquotes too much however, looks like we want something like > > > > - (define-abbrev-table (derived-mode-abbrev-table-name mode) nil) > > > + (define-abbrev-table (derived-mode-abbrev-table-name ',mode) nil) > > (does that work?) > > Michael. > -- Best, Tongjie --000000000000129c1105d95c1c2b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks=C2=A0Michael. I tested this improved quoting and it= worked. Once the abbrev table is defined, jdee will no longer run into pro= blems.=C2=A0

A strange thing is when eval the previous n= on patched defun, jdee will work. Wonder if "mode" was leaked som= ewhere.



--
Best,
Tongjie
--000000000000129c1105d95c1c2b--