all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#71812: [PATCH] Flag checkdoc-package-keywords-flag as a :safe variable
@ 2024-06-28  5:23 Jules Tamagnan
  2024-06-29  3:37 ` Stefan Kangas
  0 siblings, 1 reply; 3+ messages in thread
From: Jules Tamagnan @ 2024-06-28  5:23 UTC (permalink / raw)
  To: 71812

[-- Attachment #1: Type: text/plain, Size: 1443 bytes --]

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'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: safe.patch --]
[-- Type: text/patch, Size: 926 bytes --]

From 96c335bb5ab68b7fcf2d3079df15045ad79d19d3 Mon Sep 17 00:00:00 2001
From: Jules Tamagnan <jtamagnan@gmail.com>
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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#71812: [PATCH] Flag checkdoc-package-keywords-flag as a :safe variable
  2024-06-28  5:23 bug#71812: [PATCH] Flag checkdoc-package-keywords-flag as a :safe variable Jules Tamagnan
@ 2024-06-29  3:37 ` Stefan Kangas
  2024-06-29 21:07   ` Jules Tamagnan
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Kangas @ 2024-06-29  3:37 UTC (permalink / raw)
  To: Jules Tamagnan, 71812-done

Version: 31.1

Jules Tamagnan <jtamagnan@gmail.com> writes:

> From 96c335bb5ab68b7fcf2d3079df15045ad79d19d3 Mon Sep 17 00:00:00 2001
> From: Jules Tamagnan <jtamagnan@gmail.com>
> 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

Thanks, installed on master as commit d3b100d4192.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#71812: [PATCH] Flag checkdoc-package-keywords-flag as a :safe variable
  2024-06-29  3:37 ` Stefan Kangas
@ 2024-06-29 21:07   ` Jules Tamagnan
  0 siblings, 0 replies; 3+ messages in thread
From: Jules Tamagnan @ 2024-06-29 21:07 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 71812-done

Stefan Kangas <stefankangas@gmail.com> writes:

> Version: 31.1
>
> ...
>
> Thanks, installed on master as commit d3b100d4192.

Brilliant, thank you for the super quick response and integration. I
really appreciate it!

Best,
Jules





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-29 21:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-28  5:23 bug#71812: [PATCH] Flag checkdoc-package-keywords-flag as a :safe variable Jules Tamagnan
2024-06-29  3:37 ` Stefan Kangas
2024-06-29 21:07   ` Jules Tamagnan

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.