[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auctex 0f8901dc5d 01/18: Set up outline mode variables
From: |
Tassilo Horn |
Subject: |
[elpa] externals/auctex 0f8901dc5d 01/18: Set up outline mode variables early (bug#69254) |
Date: |
Sun, 17 Mar 2024 07:37:09 -0400 (EDT) |
branch: externals/auctex
commit 0f8901dc5dff4687def1250983ff1a66d2322db5
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>
Set up outline mode variables early (bug#69254)
* latex.el (LaTeX-mode-cleanup):
(LaTeX-common-initialization):
Revert the fix for bug#65750 partially so that call to outline mode in
`LaTeX-mode-hook' works.
* context.el (ConTeXt-mode-common-initialization):
(ConTeXt-mode-cleanup):
* tex-info.el: (Texinfo-mode):
(Texinfo-mode-cleanup):
Follow the above change for LaTeX mode.
---
context.el | 10 +++-------
latex.el | 23 ++++++-----------------
tex-info.el | 26 ++++++--------------------
3 files changed, 15 insertions(+), 44 deletions(-)
diff --git a/context.el b/context.el
index 5ee0217d91..86991ccf93 100644
--- a/context.el
+++ b/context.el
@@ -1875,9 +1875,8 @@ that is, you do _not_ have to cater for this yourself by
adding \\\\\\=' or $."
;; Outline support
(require 'outline)
(set (make-local-variable 'outline-level) #'ConTeXt-outline-level)
- ;; Moved after `run-mode-hooks'. (bug#65750)
- ;; (set (make-local-variable 'outline-regexp) (ConTeXt-outline-regexp t))
- ;;(make-local-variable 'outline-heading-end-regexp)
+ (set (make-local-variable 'outline-regexp) (ConTeXt-outline-regexp t))
+ (make-local-variable 'outline-heading-end-regexp)
(setq TeX-header-end (ConTeXt-header-end)
TeX-trailer-start (ConTeXt-trailer-start))
@@ -1913,10 +1912,7 @@ Run after mode hooks and file local variables
application."
"[ \t]*\\("
(ConTeXt-paragraph-commands-regexp) "\\|"
"\\$\\$\\|" ; Plain TeX display math
- "$\\)"))
-
- (or (local-variable-p 'outline-regexp)
- (setq-local outline-regexp (ConTeXt-outline-regexp t))))
+ "$\\)")))
(defun context-guess-current-interface ()
"Guess what ConTeXt interface the current buffer is using."
diff --git a/latex.el b/latex.el
index 83de0e84f4..de70c7f57d 100644
--- a/latex.el
+++ b/latex.el
@@ -8268,16 +8268,6 @@ Run after mode hooks and file local variables
application."
(if (bound-and-true-p filladapt-mode)
(turn-off-filladapt-mode))
- ;; Don't overwrite the value the user set by hooks or file
- ;; (directory) local variables.
- (or (local-variable-p 'outline-regexp)
- (setq-local outline-regexp (LaTeX-outline-regexp t)))
- (or (local-variable-p 'outline-heading-alist)
- (setq outline-heading-alist
- (mapcar (lambda (x)
- (cons (concat "\\" (nth 0 x)) (nth 1 x)))
- LaTeX-section-list)))
-
;; Keep `LaTeX-paragraph-commands-regexp' in sync with
;; `LaTeX-paragraph-commands' in case the latter is updated by
;; hooks or file (directory) local variables.
@@ -8441,13 +8431,12 @@ function would return non-nil and `(match-string 1)'
would return
(require 'outline)
(set (make-local-variable 'outline-level) #'LaTeX-outline-level)
- ;; Moved after `run-mode-hooks'. (bug#65750)
- ;; (set (make-local-variable 'outline-regexp) (LaTeX-outline-regexp t))
- ;; (when (boundp 'outline-heading-alist)
- ;; (setq outline-heading-alist
- ;; (mapcar (lambda (x)
- ;; (cons (concat "\\" (nth 0 x)) (nth 1 x)))
- ;; LaTeX-section-list)))
+ (set (make-local-variable 'outline-regexp) (LaTeX-outline-regexp t))
+ (when (boundp 'outline-heading-alist)
+ (setq outline-heading-alist
+ (mapcar (lambda (x)
+ (cons (concat "\\" (nth 0 x)) (nth 1 x)))
+ LaTeX-section-list)))
(setq-local TeX-auto-full-regexp-list
(delete-dups (append LaTeX-auto-regexp-list
diff --git a/tex-info.el b/tex-info.el
index fc10f0184f..9f919ee309 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -31,9 +31,6 @@
(require 'texinfo)
-;; Silence the compiler for variables:
-(defvar outline-heading-alist)
-
;;; Environments:
(defvar Texinfo-environment-list
'(("cartouche") ("command") ("copying") ("defcv") ("deffn") ("defivar")
@@ -672,13 +669,12 @@ value of `Texinfo-mode-hook'."
(set (make-local-variable 'syntax-propertize-function)
texinfo-syntax-propertize-function)
- ;; Moved after `run-mode-hooks'. (bug#65750)
- ;; (setq-local outline-heading-alist
- ;; (mapcar (lambda (x) (cons (concat "@" (car x)) (cadr x)))
- ;; texinfo-section-list))
- ;; (setq-local outline-regexp
- ;; (concat (regexp-opt (mapcar #'car outline-heading-alist) t)
- ;; "\\>"))
+ (setq-local outline-heading-alist
+ (mapcar (lambda (x) (cons (concat "@" (car x)) (cadr x)))
+ texinfo-section-list))
+ (setq-local outline-regexp
+ (concat (regexp-opt (mapcar #'car outline-heading-alist) t)
+ "\\>"))
;; Mostly AUCTeX stuff
(set (make-local-variable 'TeX-command-current) #'TeX-command-master)
@@ -873,16 +869,6 @@ Run after mode hooks and file local variables application."
texinfo-chapter-level-regexp
"\\)")))
- ;; Outline settings.
- (or (local-variable-p 'outline-heading-alist)
- (setq-local outline-heading-alist
- (mapcar (lambda (x) (cons (concat "@" (car x)) (cadr x)))
- texinfo-section-list)))
- (or (local-variable-p 'outline-regexp)
- (setq-local outline-regexp
- (concat (regexp-opt (mapcar #'car outline-heading-alist) t)
- "\\>")))
-
(or (local-variable-p 'TeX-complete-list)
(setq-local TeX-complete-list
(list (list "@\\([a-zA-Z]*\\)" 1 #'TeX-symbol-list-filtered
nil)
- [elpa] externals/auctex updated (f124fe7d28 -> 0a477ebe9e), Tassilo Horn, 2024/03/17
- [elpa] externals/auctex 04814a0ea5 06/18: Track the latest version of usrguide.tex, Tassilo Horn, 2024/03/17
- [elpa] externals/auctex e2d2827e39 03/18: ; * style/ltx-base.el ("ltx-base"): Fix last change., Tassilo Horn, 2024/03/17
- [elpa] externals/auctex 0f8901dc5d 01/18: Set up outline mode variables early (bug#69254),
Tassilo Horn <=
- [elpa] externals/auctex 806bdb01ca 09/18: Improve usage of texmathp.el outside AUCTeX, Tassilo Horn, 2024/03/17
- [elpa] externals/auctex 8d34ef21e6 02/18: Track the latest version of clsguide.tex, Tassilo Horn, 2024/03/17
- [elpa] externals/auctex b47a44611f 05/18: * style/ltx-base.el ("ltx-base"): Add macros from fntguide.pdf., Tassilo Horn, 2024/03/17
- [elpa] externals/auctex 509a71b436 16/18: Revert "Mark options as buffer-local with the :local keyword", Tassilo Horn, 2024/03/17
- [elpa] externals/auctex 212bb3a3a1 11/18: ; * tex.el (TeX-process-check): Fix typo (bug#34645)., Tassilo Horn, 2024/03/17
- [elpa] externals/auctex 074e1c9fd1 15/18: * tex.el: Delete Emacs<27 compat code from commit 087b030001., Tassilo Horn, 2024/03/17
- [elpa] externals/auctex 2ee39c4e26 17/18: ; * latex.el: Fix copyright year after last revert., Tassilo Horn, 2024/03/17
- [elpa] externals/auctex 89df2bbf59 12/18: ; * doc/changes.texi: Announce `LaTeX-flymake-chktex-options'., Tassilo Horn, 2024/03/17
- [elpa] externals/auctex ff03bccb38 07/18: Add an entry about previewing of TikZ pictures, Tassilo Horn, 2024/03/17
- [elpa] externals/auctex 1e39768287 14/18: Robustify in-buffer completion for surrounding comments, Tassilo Horn, 2024/03/17