emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/auctex 806bdb01ca 09/18: Improve usage of texmathp.el o


From: Tassilo Horn
Subject: [elpa] externals/auctex 806bdb01ca 09/18: Improve usage of texmathp.el outside AUCTeX
Date: Sun, 17 Mar 2024 07:37:12 -0400 (EDT)

branch: externals/auctex
commit 806bdb01ca76c96e1d152b2c2cdfeee19ca32fe8
Author: Arash Esbati <arash@gnu.org>
Commit: Arash Esbati <arash@gnu.org>

    Improve usage of texmathp.el outside AUCTeX
    
    * texmathp.el (texmathp): Add a check if the current major mode
    derives from `TeX-mode'.  (bug#69681)
---
 texmathp.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/texmathp.el b/texmathp.el
index 3316c461e9..b4ccf7ce4a 100644
--- a/texmathp.el
+++ b/texmathp.el
@@ -1,6 +1,6 @@
 ;;; texmathp.el -- Code to check if point is inside LaTeX math environment  
-*- lexical-binding: t; -*-
 
-;; Copyright (C) 1998-2022  Free Software Foundation, Inc.
+;; Copyright (C) 1998-2024  Free Software Foundation, Inc.
 
 ;; Author: Carsten Dominik <dominik@strw.LeidenUniv.nl>
 ;; Maintainer: auctex-devel@gnu.org
@@ -325,8 +325,10 @@ See the variable `texmathp-tex-commands' about which 
commands are checked."
     ;; return immediately nil.  This relies on the function
     ;; `LaTeX-verbatim-p'.  We add a check here in case this library
     ;; is used stand-alone without latex.el provided by AUCTeX
-    ;; (bug#61410):
-    (if (and (fboundp 'LaTeX-verbatim-p)
+    ;; (bug#61410) and the `major-mode' doesn't derive from `TeX-mode'
+    ;; (bug#69681):
+    (if (and (derived-mode-p 'TeX-mode)
+             (fboundp 'LaTeX-verbatim-p)
              (LaTeX-verbatim-p (cdr match)))
         (progn
           (setq texmathp-why `(nil . ,(cdr match)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]