unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Joseph Turner <joseph@breatheoutbreathe.in>
To: emacs-devel@gnu.org
Subject: [PATCH] Make ispell localwords safe local variable
Date: Mon, 14 Aug 2023 22:40:24 -0700	[thread overview]
Message-ID: <87zg2s97x0.fsf@breatheoutbreathe.in> (raw)

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

Hello,

In this PR <https://github.com/alphapapa/makem.sh/pull/39>, we made it
possible for checkdoc/ispell to ignore localwords stored in a
.dir-locals.el when run in batch mode.

It seemed appropriate to upstream this fix.

Joseph


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Make-ispell-localwords-safe-local-variable.patch --]
[-- Type: text/x-diff, Size: 1015 bytes --]

From 3af6882c316de7a551a0ce25cd7b6c35b93cd90b Mon Sep 17 00:00:00 2001
From: Joseph Turner <joseph@breatheoutbreathe.in>
Date: Mon, 14 Aug 2023 22:35:28 -0700
Subject: [PATCH] Make ispell localwords safe local variable

* lisp/textmodes/ispell.el (ispell-buffer-session-localwords):
Make safe local variable to so that checkdoc can ignore words in a
project in batch mode.
---
 lisp/textmodes/ispell.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el
index 97c4ce9f32d..c73f92aa0b3 100644
--- a/lisp/textmodes/ispell.el
+++ b/lisp/textmodes/ispell.el
@@ -1747,6 +1747,7 @@ Ispell is then restarted because the local words could conflict.")
 
 (defvar-local ispell-buffer-session-localwords nil
   "List of words accepted for session in this buffer.")
+(put 'ispell-buffer-session-localwords 'safe-local-variable #'list-of-strings-p)
 
 (defvar ispell-parser 'use-mode-name
   "Indicates whether ispell should parse the current buffer as TeX Code.
-- 
2.41.0


             reply	other threads:[~2023-08-15  5:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-15  5:40 Joseph Turner [this message]
2023-08-15 11:56 ` [PATCH] Make ispell localwords safe local variable Eli Zaretskii
2023-08-16  1:41   ` Joseph Turner
2023-08-16 12:20     ` Eli Zaretskii
2023-08-16 17:12       ` Jim Porter
2023-08-16 23:04         ` Joseph Turner
2023-08-26  8:10           ` Eli Zaretskii
2023-12-01  6:56             ` Joseph Turner
2023-12-01  8:03               ` Eli Zaretskii
2023-12-01  8:24                 ` Joseph Turner
2023-12-01 11:28                   ` Eli Zaretskii
2023-08-17  2:00     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zg2s97x0.fsf@breatheoutbreathe.in \
    --to=joseph@breatheoutbreathe.in \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).