[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] Let it byte compile even with GNU Emacs 29.3
From: |
Arash Esbati |
Subject: |
Re: [PATCH 1/3] Let it byte compile even with GNU Emacs 29.3 |
Date: |
Wed, 08 May 2024 09:48:30 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Werner Fink <werner@suse.de> writes:
> Signed-off-by: Werner Fink <werner@suse.de>
> ---
Hi Werner,
thanks for the change set. I have some question, see below.
> latex.el | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/latex.el b/latex.el
> index 5c6a8510..0f970949 100644
> --- a/latex.el
> +++ b/latex.el
> @@ -2030,7 +2030,7 @@ TYPE is one of the symbols mac or env."
> ;; over [>=] and a balanced {}
> ((looking-at-p "[>=]")
> (forward-char 1)
> - (with-syntax-table syntax (forward-sexp)))
> + (with-syntax-table syntax (ignore-errors (forward-sexp))))
Can you please elaborate why `ignore-errors' is needed here? IIUC this
is about byte compiling with Emacs 29.3? I have no problems compiling
latex.el with Emacs 30 until now.
> From 26c22d66eea3307106da436edb7ad7fc4e3abe8f Mon Sep 17 00:00:00 2001
> From: Werner Fink <werner@suse.de>
> Date: Tue, 7 May 2024 09:01:17 +0200
> Subject: [PATCH 2/3] Enable initial reset for LaTeX classes
>
> Enable initial reset for LaTeX classes to load the class mode
> at creation of the document. The declared variable is called
> LaTeX-global-class-files and not TeX-global-class-files.
>
> Signed-off-by: Werner Fink <werner@suse.de>
> ---
> latex.el | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/latex.el b/latex.el
> index 0f970949..957586c2 100644
> --- a/latex.el
> +++ b/latex.el
> @@ -2714,7 +2714,7 @@ Initialized once at the first time you prompt for a
> LaTeX class.
> May be reset with `\\[universal-argument] \\[TeX-normal-mode]'.")
>
> ;; Add the variable to `TeX-normal-mode-reset-list':
> -(add-to-list 'TeX-normal-mode-reset-list 'TeX-global-class-files)
> +(add-to-list 'TeX-normal-mode-reset-list 'LaTeX-global-class-files)
>
> (defcustom TeX-arg-input-file-search t
> "If `TeX-arg-input-file' should search for files.
> --
>
> 2.43.0
Argh, thanks, `TeX-global-class-files' is plain wrong.
> From f9c892d072b6fd58b934c46ed334381e8e6f4786 Mon Sep 17 00:00:00 2001
> From: Werner Fink <werner@suse.de>
> Date: Tue, 7 May 2024 09:17:30 +0200
> Subject: [PATCH 3/3] Update dinbrief class
>
> Nowadays UTF-8 is standard, also port the features of the letter class
> to dinbrief class.
>
> Signed-off-by: Werner Fink <werner@suse.de>
> ---
> style/dinbrief.el | 45 ++++++++++++++++++++++++++++++++-------------
> 1 file changed, 32 insertions(+), 13 deletions(-)
>
> diff --git a/style/dinbrief.el b/style/dinbrief.el
> index c3108466..49e1071c 100644
> --- a/style/dinbrief.el
> +++ b/style/dinbrief.el
> @@ -32,14 +32,26 @@
> (require 'tex)
> (require 'latex)
>
> +;; Silence the compiler:
> +(declare-function font-latex-add-keywords
> + "font-latex"
> + (keywords class))
> +
> +(defvar LaTeX-dinbrief-class-options
> + '("10pt" "11pt" "12pt" "norm" "a4paper" "a5paper" "b5paper"
> + "letterpaper" "legalpaper" "executivepaper" "twoside"
> + "addresshigh" "addressstd" "onecolumn" "twocolumn")
> + "Package options for the letter class.")
> +
> (TeX-add-style-hook
> "dinbrief"
> (lambda ()
> - (add-hook 'LaTeX-document-style-hook
> - #'LaTeX-dinbrief-style)
> (LaTeX-add-environments
> '("letter" LaTeX-dinbrief-env-recipient)
> "dinquote")
> + (add-hook 'LaTeX-document-style-hook
> + #'LaTeX-dinbrief-style)
I suspect this change is just aesthetic?
> (defmacro LaTeX-dinbrief-insert (&rest args)
> @@ -77,17 +104,9 @@
> (beginning-of-line 1))
> (open-line 2)
> (indent-relative-first-indent-point)
> - (LaTeX-dinbrief-insert TeX-esc "usepackage"
> - LaTeX-optop "latin1,utf8" LaTeX-optcl
> - TeX-grop "inputenc" TeX-grcl)
> - (newline-and-indent)
> - (LaTeX-dinbrief-insert TeX-esc "usepackage"
> - LaTeX-optop "T1" LaTeX-optcl
> - TeX-grop "fontenc" TeX-grcl)
> - (indent-relative-first-indent-point)
> (LaTeX-dinbrief-insert TeX-esc "usepackage"
> TeX-grop "ngerman" TeX-grcl))
> - (TeX-run-style-hooks "inputenc" "fontenc" "ngerman"))
> + (TeX-run-style-hooks "ngerman"))
I agree with dropping inputenc, but fontenc is a different beast, and
for German text, I think \usepackage[T1]{fontenc} is a good choice which
we should keep. And what about switching from \usepackage{ngerman} to
\usepackage[ngerman]{babel}?
Best, Arash