From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: lexical-binding is turned on in more use cases Date: Sun, 08 Mar 2020 19:41:44 -0400 Message-ID: References: <83pndo9zeb.fsf@gnu.org> <83o8t6bx2p.fsf@gnu.org> <83k13ubv3g.fsf@gnu.org> <83imjebsrh.fsf@gnu.org> <20200308193048.GB4832@ACM> Mime-Version: 1.0 Content-Type: text/x-markdown; coding=UTF-8 Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="60456"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Mar 09 03:12:19 2020 Return-path: Envelope-to: ged-emacs-devel@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 1jB7ty-000Fcg-Gi for ged-emacs-devel@m.gmane-mx.org; Mon, 09 Mar 2020 03:12:18 +0100 Original-Received: from localhost ([::1]:35210 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jB7tx-00045Q-GE for ged-emacs-devel@m.gmane-mx.org; Sun, 08 Mar 2020 22:12:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56119) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jB7tG-0003C3-2K for emacs-devel@gnu.org; Sun, 08 Mar 2020 22:11:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jB7tF-0006x4-0j for emacs-devel@gnu.org; Sun, 08 Mar 2020 22:11:33 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:50211) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jB7tD-0006v1-07; Sun, 08 Mar 2020 22:11:31 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 603CE814B5; Sun, 8 Mar 2020 19:41:47 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B6B9280E46; Sun, 8 Mar 2020 19:41:45 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1583710905; bh=QLQQwjhQrhSOdDPyX73KuhTvgGLAKDEvsYeFjNt1g48=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=KALxNazvUBFgUvY7pDmZ/zBMHckc79d9rrD+sSsrdqWsz6HtXa+jAGbm01FLVwHib RmL1RdkXnPqRyLWNciZEQ1aH3hGVcd79MvFegRx39Pp/fU7Mifa/tBBXyfThJ+Ecvl 2B30Q4/gs898NRfxoPl7Tk51bx8IUu8pdSWP8dc1PGo4KUqUFpFDpaYXZZAjlGfRxX VJGqHrFiJ17nvbtKdr4aIiK4EpdFLRp6/ClEl8eM/mQCdFcrsiCPbTfnsSgrKQuw0I MvONehptsoN08XAMbsLKWs8kLOaXltfbf/NJdB3mCsizTYXZaRUpWGv4DV+KTDHI7u dU4zb2j1r2p/A== Original-Received: from pastel (unknown [216.154.50.221]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 801A2120805; Sun, 8 Mar 2020 19:41:45 -0400 (EDT) In-Reply-To: <20200308193048.GB4832@ACM> (Alan Mackenzie's message of "Sun, 8 Mar 2020 19:30:48 +0000") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:245372 Archived-At: > . This complained about c-syntactic-context being unbound, so I > tried: > > M-: (let ((c-syntactic-context (c-guess-basic-syntax))) > (c-align-cpp-indent-to-body)) > > , and was puzzled that c-syntactic-context was _still_ unbound. So I > checked the spelling, and was more puzzled. Eventually I used setq, > which worked, but caused me further problems later on in my Emacs > session. Indeed `c-syntactic-context` is only declared as dynamically scoped in some files but not globally, for some reason. It's rather unusual. The more common pattern is to write (defvar c-syntactic-context nil) which would not make you bump into this problem. > Furthermore, c-syntactic-context is explicitly declared a dynamic > variable by a defvar form. But a `defvar` with no 2nd arg (i.e. no default value), which means it only affects the current file (not sure if this is part of the reason why you have `(defvar c-syntactic-context)` both `cc-cmds.el` and in `cc-vars.el`, but it would explain it tho the `(cc-bytecomp-defvar c-syntactic-context)` in `cc-vars.el` makes the whole situation much more murky). > THIS IS A MAJOR BACKWARD STEP FOR EMACS!!!! ;-) > Looking at the git log, it appears this change was made nearly a year ago. Indeed, it's a wonder you managed to survive with such a majorly broken Emacs for so long ;-) Stefan