GNU bug report logs - #70409
30.0.50; `latexenc-find-file-coding-system` uses `TeX-master` before we know it's safe

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Mon, 15 Apr 2024 22:44:02 UTC

Severity: normal

Found in version 30.0.50

Full log


Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
 text editors" <bug-gnu-emacs <at> gnu.org>
Cc: 70409 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: 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
Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> 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




This bug report was last modified 1 year and 58 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.