From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jules Tamagnan Newsgroups: gmane.emacs.bugs Subject: bug#71812: [PATCH] Flag checkdoc-package-keywords-flag as a :safe variable Date: Thu, 27 Jun 2024 22:23:59 -0700 Message-ID: <87v81ttzbk.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5405"; mail-complaints-to="usenet@ciao.gmane.io" To: 71812@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jun 28 08:05:09 2024 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 1sN4jN-0001AE-BX for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 28 Jun 2024 08:05:09 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sN4jJ-0002s9-Qv; Fri, 28 Jun 2024 02:05:05 -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 1sN4jI-0002re-CW for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2024 02:05:04 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sN4jH-0005z4-VN for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2024 02:05:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sN4jG-0000pk-HD for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2024 02:05:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jules Tamagnan Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 28 Jun 2024 06:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 71812 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.17195546623025 (code B ref -1); Fri, 28 Jun 2024 06:05:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 28 Jun 2024 06:04:22 +0000 Original-Received: from localhost ([127.0.0.1]:51420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sN4ib-0000mh-Ss for submit@debbugs.gnu.org; Fri, 28 Jun 2024 02:04:22 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:51160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sN4iX-0000mL-Rk for submit@debbugs.gnu.org; Fri, 28 Jun 2024 02:04:20 -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 1sN45f-0002Pk-Gn for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2024 01:24:07 -0400 Original-Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sN45c-0000w5-U6 for bug-gnu-emacs@gnu.org; Fri, 28 Jun 2024 01:24:07 -0400 Original-Received: by mail-pg1-x52a.google.com with SMTP id 41be03b00d2f7-71816f36d4dso127822a12.2 for ; Thu, 27 Jun 2024 22:24:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719552243; x=1720157043; darn=gnu.org; h=mime-version:message-id:date:subject:to:from:from:to:cc:subject :date:message-id:reply-to; bh=hc5LPWVUIHmcWHuEi4phAOnei2WvaoiB0QZruD3OI34=; b=V2BJsCESxP45nO1OpPB3IKGOojRxph6/KxbDeBe/Ult/DxzzDBPV/oB8Hw/CZwRiAc vEorXS+7IZjUBRNp2229dSYWTiOwsV26JG3cXLBpEryPIz5F1heqrG2KXiGgyJFTTke5 o9j/f09K6PmTDE1SCJwo5hyfKw3AM6geS2VdxSBs+c2oHiZ5fTpOiYuPsdNdlNmtojMm 5TkMiky38naxNbvhWU8NpnseL1OiqPRAs6+9DfpeAN7t5J/KQakmjpW5TOb8XixNh630 W/HsnTCne1Usxu4PbVdyfh/d/KaCemspJPrhhiTm0AVWrviJRgTZfbX0eBGP0XIJL1JH Zkqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719552243; x=1720157043; h=mime-version:message-id:date:subject:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hc5LPWVUIHmcWHuEi4phAOnei2WvaoiB0QZruD3OI34=; b=vfoK9yejVpVawILOm4doKDsPk7J2f/Fn4LSHqr0GnXk/utYUxsU0M2DpTmVfVPxhsb eF83fjyE1HshOrf8xoms3ROI8g32EIwkdc3pF4e9dePPsDYQ4FHouRXk3YuuZrwvt7YW pu01ca1lFPHIXvBiBtBPObW/ujOCS5IYSDzYz1IV5274uSlQrBrL/fDPyWY3CWDg1TAw Ox6iRjsC8mNQlmXDeqn3gZeXvf3ZKCap/qTjB5JEn01B7F9+z6vSNiHPYw3O1uM6gX4d 00UQ8409AerTXFbCRT/PPQCSFJXIndZ/3FtrFI8kwgvDoLeDNBvy72G1t555EAglAs2R /1Tg== X-Gm-Message-State: AOJu0Yxr19GYLHXHTVOE5KICnyi5cYovCHGAsdZVdiPnEEO9rDtFYHxL VxuziD5GTaJsT3IjgNPmyzEF09f4w4UMYINsbXEsJ/Vx4LecVdB5gs4pMw== X-Google-Smtp-Source: AGHT+IGamrYudEmuRtm3LTnTnDmr7F7S4/d2Y2oX310e3w4aNc22hnHzGR6EMaHomo5RJwhqqpwBHQ== X-Received: by 2002:a05:6a20:3514:b0:1bd:24f9:1124 with SMTP id adf61e73a8af0-1bd24f9124fmr9461408637.27.1719552242772; Thu, 27 Jun 2024 22:24:02 -0700 (PDT) Original-Received: from jat-framework (c-73-189-85-43.hsd1.ca.comcast.net. [73.189.85.43]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-1fac11d8695sm6592165ad.109.2024.06.27.22.24.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 22:24:02 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=jtamagnan@gmail.com; helo=mail-pg1-x52a.google.com 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_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288049 Archived-At: --=-=-= Content-Type: text/plain Tags: patch * Problem Recently I was collaborating on a package that provided a .dir-locals.el file where this `checkdoc-package-keywords-flag' was being set. I then had to figure out what variable was considered unsafe and decide whether it was unsafe or not. This caused some extra mental overhead and development friction. * Solution It would be great if this variable were already considered safe to reduce overhead on developers. * Implementation After looking at how this variable was used I noticed that it was only consumed in `checkdoc-current-buffer' and that it seemed safe to mark as safe. I added a single autoload line as is done throughout the rest of the file for similar variables --- Best, Jules --- In GNU Emacs 31.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.42, cairo version 1.18.0) Repository revision: 9cb2a2040888c28587bed2b0902d9da90720f9a0 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101013 System Description: NixOS 24.11 (Vicuna) Configured using: 'configure --prefix=/nix/store/93m6yix8f6pcg75418xjx7k81lrj5a6s-emacs-git-20240626.0 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-cairo --with-xft --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --with-xinput2 --with-xwidgets --with-dbus --with-selinux' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=safe.patch >From 96c335bb5ab68b7fcf2d3079df15045ad79d19d3 Mon Sep 17 00:00:00 2001 From: Jules Tamagnan Date: Thu, 27 Jun 2024 22:04:58 -0700 Subject: [PATCH] Flag checkdoc-package-keywords-flag as a :safe variable * lisp/emacs-lisp/checkdoc.el: Mark 'checkdoc-package-keywords-flag' as a safe local variable. --- lisp/emacs-lisp/checkdoc.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index c22dfb2eb26..bda5150cf07 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -289,6 +289,7 @@ checkdoc-package-keywords-flag Currently, all recognized keywords must be on `finder-known-keywords'." :version "25.1" :type 'boolean) +;;;###autoload(put 'checkdoc-package-keywords-flag 'safe-local-variable #'booleanp) (defvar checkdoc-style-functions nil "Hook run after the standard style check is completed. -- 2.45.1 --=-=-=--