unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#65608: Fwd: [PATCH] project.el: Use list of strings p for safe local variable
       [not found] <87r0nqct63.fsf@breatheoutbreathe.in>
@ 2023-08-30  7:10 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-08-30 11:22   ` Dmitry Gutov
  0 siblings, 1 reply; 5+ messages in thread
From: Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-30  7:10 UTC (permalink / raw)
  To: 65608; +Cc: dmitry, stefankangas

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

Stefan Kangas suggested I resend this patch to this mailing list so that
it's not lost even though it can't be applied yet.

Joseph Turner <joseph@breatheoutbreathe.in> writes:

> Might make sense to merge this into 29.2?
>
> [2. text/x-diff; 0001-project.el-Use-list-of-strings-p-for-safe-local-vari.patch]...


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-project.el-Use-list-of-strings-p-for-safe-local-vari.patch --]
[-- Type: text/x-diff, Size: 1587 bytes --]

From 8237eb21c81b3e5ededd42a3a2d5b9770d45ca92 Mon Sep 17 00:00:00 2001
From: Joseph Turner <joseph@breatheoutbreathe.in>
Date: Fri, 25 Aug 2023 21:31:06 -0700
Subject: [PATCH] project.el: Use list-of-strings-p for safe-local-variable
 predicate

* lisp/progmodes/project.el (project-vc-ignores)
(project-vc-extra-root-markers)
---
 lisp/progmodes/project.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 8d8bf594628..882173a65d0 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -397,7 +397,7 @@ the buffer's value of `default-directory'."
 (defcustom project-vc-ignores nil
   "List of patterns to add to `project-ignores'."
   :type '(repeat string))
-;;;###autoload(put 'project-vc-ignores 'safe-local-variable #'listp)
+;;;###autoload(put 'project-vc-ignores 'safe-local-variable #'list-of-strings-p)
 
 (defcustom project-vc-merge-submodules t
   "Non-nil to consider submodules part of the parent project.
@@ -452,7 +452,7 @@ variables, such as `project-vc-ignores' or `project-vc-name'."
   :type '(repeat string)
   :version "29.1"
   :package-version '(project . "0.9.0"))
-;;;###autoload(put 'project-vc-extra-root-markers 'safe-local-variable (lambda (val) (and (listp val) (not (memq nil (mapcar #'stringp val))))))
+;;;###autoload(put 'project-vc-extra-root-markers 'safe-local-variable #'list-of-strings-p)
 
 ;; FIXME: Using the current approach, major modes are supposed to set
 ;; this variable to a buffer-local value.  So we don't have access to
-- 
2.41.0


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

* bug#65608: Fwd: [PATCH] project.el: Use list of strings p for safe local variable
  2023-08-30  7:10 ` bug#65608: Fwd: [PATCH] project.el: Use list of strings p for safe local variable Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-30 11:22   ` Dmitry Gutov
  2023-08-30 17:54     ` Stefan Kangas
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Gutov @ 2023-08-30 11:22 UTC (permalink / raw)
  To: Joseph Turner, 65608; +Cc: stefankangas

On 30/08/2023 10:10, Joseph Turner via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:
> Stefan Kangas suggested I resend this patch to this mailing list so that
> it's not lost even though it can't be applied yet.

Just to clarify for posterity: it can't be applied yet because 
list-of-string-p is not in Emacs 26. Or 27 (which we might bump the 
requirement to in not-too-distant future).





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

* bug#65608: Fwd: [PATCH] project.el: Use list of strings p for safe local variable
  2023-08-30 11:22   ` Dmitry Gutov
@ 2023-08-30 17:54     ` Stefan Kangas
  2023-08-31  0:30       ` Dmitry Gutov
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Kangas @ 2023-08-30 17:54 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 65608-done, Joseph Turner

Version: 30.1

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 30/08/2023 10:10, Joseph Turner via Bug reports for GNU Emacs, the
> Swiss army knife of text editors wrote:
> > Stefan Kangas suggested I resend this patch to this mailing list so that
> > it's not lost even though it can't be applied yet.
>
> Just to clarify for posterity: it can't be applied yet because
> list-of-string-p is not in Emacs 26. Or 27 (which we might bump the
> requirement to in not-too-distant future).

Right.  Note that `list-of-strings-p' was added in Emacs 28, though.
So I added a comment to that effect in commit 9647ddb2993, and I'm
closing the bug.





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

* bug#65608: Fwd: [PATCH] project.el: Use list of strings p for safe local variable
  2023-08-30 17:54     ` Stefan Kangas
@ 2023-08-31  0:30       ` Dmitry Gutov
  2023-08-31  6:45         ` Stefan Kangas
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry Gutov @ 2023-08-31  0:30 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 65608-done, Joseph Turner

On 30/08/2023 20:54, Stefan Kangas wrote:
> Right.  Note that `list-of-strings-p' was added in Emacs 28, though.

I think you meant to say Emacs 29 here.

> So I added a comment to that effect in commit 9647ddb2993, and I'm
> closing the bug.

Thank you.





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

* bug#65608: Fwd: [PATCH] project.el: Use list of strings p for safe local variable
  2023-08-31  0:30       ` Dmitry Gutov
@ 2023-08-31  6:45         ` Stefan Kangas
  0 siblings, 0 replies; 5+ messages in thread
From: Stefan Kangas @ 2023-08-31  6:45 UTC (permalink / raw)
  To: Dmitry Gutov; +Cc: 65608-done, Joseph Turner

Dmitry Gutov <dmitry@gutov.dev> writes:

> On 30/08/2023 20:54, Stefan Kangas wrote:
> > Right.  Note that `list-of-strings-p' was added in Emacs 28, though.
>
> I think you meant to say Emacs 29 here.

Yes, indeed.





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

end of thread, other threads:[~2023-08-31  6:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <87r0nqct63.fsf@breatheoutbreathe.in>
2023-08-30  7:10 ` bug#65608: Fwd: [PATCH] project.el: Use list of strings p for safe local variable Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-30 11:22   ` Dmitry Gutov
2023-08-30 17:54     ` Stefan Kangas
2023-08-31  0:30       ` Dmitry Gutov
2023-08-31  6:45         ` Stefan Kangas

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).