unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Arash Esbati <arash@gnu.org>
To: 70409@debbugs.gnu.org
Cc: monnier@iro.umontreal.ca
Subject: bug#70409: 30.0.50; `latexenc-find-file-coding-system` uses `TeX-master` before we know it's safe
Date: Tue, 16 Apr 2024 12:19:21 +0200	[thread overview]
Message-ID: <m2a5ltip92.fsf@macmutant.fritz.box> (raw)
In-Reply-To: <jwvr0f6s29r.fsf-monnier+@gnu.org> (Stefan Monnier via's message of "Mon, 15 Apr 2024 18:42:36 -0400")

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org> writes:

> diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
> index 02ee1242c72..e7b1522751f 100644
> --- a/lisp/textmodes/tex-mode.el
> +++ b/lisp/textmodes/tex-mode.el
> @@ -89,6 +89,7 @@ tex-main-file
>  if the variable is non-nil."
>    :type '(choice (const :tag "None" nil)
>                   file)
> +  :safe #'stringp
>    :group 'tex-file)
>  
>  ;;;###autoload
> @@ -2213,6 +2214,10 @@ tex-guess-main-file
>  			  header-re (+ (point) 10000) t))))
>  	    (throw 'found (expand-file-name buffer-file-name))))))))
>  
> +(unless (get 'TeX-master 'safe-local-variable) ;Don't override AUCTeX's setting.
> +  (put 'TeX-master 'safe-local-variable
> +       (lambda (x) (or (booleanp x) (stringp x)))))
> +

Is there a reason why leave out the values `dwim' and `shared'?  tex.el
defines `TeX-master' like this:

  (defcustom TeX-master t
    :safe (lambda (x)
            (or (stringp x)
                (member x (quote (t nil shared dwim))))))

Best, Arash





  reply	other threads:[~2024-04-16 10:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-15 22:42 bug#70409: 30.0.50; `latexenc-find-file-coding-system` uses `TeX-master` before we know it's safe Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-16 10:19 ` Arash Esbati [this message]
2024-04-16 12:54   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-16 20:46     ` Arash Esbati
2024-04-16 11:49 ` Eli Zaretskii
2024-04-16 12:53   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-16 13:35     ` Eli Zaretskii
2024-04-17 17:52       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=m2a5ltip92.fsf@macmutant.fritz.box \
    --to=arash@gnu.org \
    --cc=70409@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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).