From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58506: Use ".dir-locals.eld" and ".dir-locals-2.eld" when they exist Date: Sat, 15 Oct 2022 12:22:32 -0400 Message-ID: References: <87sfjsgkl4.fsf@posteo.net> <865ygn4pno.fsf@mail.linkov.net> <87y1tiabq5.fsf@gnus.org> <87czauzhch.fsf@gmail.com> <87k052h1zt.fsf@posteo.net> <87ilkl78cd.fsf@gnus.org> <874jw577gn.fsf@posteo.net> <87ilkl5sow.fsf@gnus.org> <87v8ol5ngw.fsf@posteo.net> <87wn912nsc.fsf@gnus.org> <877d115df7.fsf@posteo.net> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20842"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 58506@debbugs.gnu.org, Lars Ingebrigtsen , Stefan Kangas , Robert Pluim , Juri Linkov To: Philip Kaludercic Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 15 18:23:10 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 1ojjwM-0005Ds-BJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Oct 2022 18:23:10 +0200 Original-Received: from localhost ([::1]:45560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ojjwL-0002sD-5h for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 15 Oct 2022 12:23:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37020) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ojjwE-0002rW-Tz for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2022 12:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43494) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ojjwE-0004ov-Ma for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2022 12:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ojjwE-0003j1-8p for bug-gnu-emacs@gnu.org; Sat, 15 Oct 2022 12:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Oct 2022 16:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58506 X-GNU-PR-Package: emacs Original-Received: via spool by 58506-submit@debbugs.gnu.org id=B58506.166585096514276 (code B ref 58506); Sat, 15 Oct 2022 16:23:02 +0000 Original-Received: (at 58506) by debbugs.gnu.org; 15 Oct 2022 16:22:45 +0000 Original-Received: from localhost ([127.0.0.1]:42572 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojjvw-0003iC-NJ for submit@debbugs.gnu.org; Sat, 15 Oct 2022 12:22:44 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ojjvt-0003hy-8v for 58506@debbugs.gnu.org; Sat, 15 Oct 2022 12:22:43 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B6E34807C3; Sat, 15 Oct 2022 12:22:35 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3880480011; Sat, 15 Oct 2022 12:22:34 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1665850954; bh=IIMm3DtocwAaACOawnrYwO5szomSQOmMxR7nrcwUgzk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Su1ZhpP2ZJHyX7iWyAJ1qQzBZBEWOSBvebCo8XjRIO+IgeHM/KaO76mUlCnaZYafZ XU6fonm0PCeuVwi0WJuWUM6RsWKUzv3cFtzDyw/nPwklPCLKxhR9R9Bz684MiN5/qf 0tjbjFQ7tQqGLsBfGRHYWUho7E+Zkx4ULQA/I4D/LUO42HnvxA244pjmM9dEMzY+Dk p48RlgMZYy+D2wBdxH0Jy9g6vvwKe+ijFHKKHNLM7uO1f1Nv9VUdYKIuM1/HDoAu9f Fy3VwdK+FsNcj64EKdK4C8F766qTzvX8aUOLUPsbvaREdd5RKJtDSx9eWYL6Vyumfs CL4JUaHCtPlfA== Original-Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A088612098D; Sat, 15 Oct 2022 12:22:33 -0400 (EDT) In-Reply-To: <877d115df7.fsf@posteo.net> (Philip Kaludercic's message of "Sat, 15 Oct 2022 15:12:12 +0000") 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:245575 Archived-At: > There is unsafep, but that is too strict for what we want. E.g. > > (unsafep '(setq tab-width 3)) ;; => (global-variable tab-width) We have our own safety predicates for setting variables, so the `unsafep` test should only be applied to the computation of the value to which we want to set the variable. After checking it's safe, we can run that code to get the value, and then we can call the variable's own safety predicate to check that the computed value is safe. Sefan