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

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

[elpa] externals/auctex 0322057 55/71: Fix misc minor issues


From: Tassilo Horn
Subject: [elpa] externals/auctex 0322057 55/71: Fix misc minor issues
Date: Fri, 17 Dec 2021 15:00:36 -0500 (EST)

branch: externals/auctex
commit 0322057c2fc9bf22a8e224e774d2622d9f654c6a
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Commit: Ikumi Keita <ikumi@ikumi.que.jp>

    Fix misc minor issues
    
    * latex.el (LaTeX-env-figure): Ensure temporal marker is cleaned in
    all cases.
    (LaTeX-current-verbatim-macro): Include asterisk, if present, in
    returned name.
    * tex-info.el (TeX-texinfo-mode): Set `TeX-comment-start-regexp'.
    * tex.el (TeX-verbatim-p): Call `TeX-verbatim-p-function' with
    argument POS.
    (TeX-verbatim-p-function): State explicitly in doc string about the
    argument POS of the function.
---
 latex.el    | 7 +++----
 tex-info.el | 1 +
 tex.el      | 7 ++++---
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/latex.el b/latex.el
index e3699c5..52a0a9c 100644
--- a/latex.el
+++ b/latex.el
@@ -1229,9 +1229,7 @@ If SHORT-CAPTION is non-nil pass it as an optional 
argument to
               (LaTeX-newline)
               (indent-according-to-mode)))
         ;; bottom caption (default)
-        (when active-mark
-          (goto-char end-marker)
-          (set-marker end-marker nil))
+        (when active-mark (goto-char end-marker))
         (save-excursion
           (LaTeX-newline)
           (indent-according-to-mode)
@@ -1249,6 +1247,7 @@ If SHORT-CAPTION is non-nil pass it as an optional 
argument to
         ;; Insert an empty line between caption and marked region, if any.
         (when active-mark (LaTeX-newline) (forward-line -1))
         (indent-according-to-mode)))
+    (set-marker end-marker nil)
     (when (and (member environment '("table" "table*"))
                ;; Suppose an existing tabular environment should just
                ;; be wrapped into a table if there is an active region.
@@ -3451,7 +3450,7 @@ non-parenthetical delimiters, like \\verb+foo+, are 
recognized."
         (goto-char (car macro-boundaries))
         (forward-char (length TeX-esc))
         (buffer-substring-no-properties
-         (point) (progn (skip-chars-forward "@A-Za-z") (point)))))))
+         (point) (progn (skip-chars-forward "@A-Za-z*") (point)))))))
 
 (defun LaTeX-verbatim-p (&optional pos)
   "Return non-nil if position POS is in a verbatim-like construct."
diff --git a/tex-info.el b/tex-info.el
index 126eb4f..6a77fc5 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -671,6 +671,7 @@ value of `Texinfo-mode-hook'."
   (set (make-local-variable 'comment-start) "@c ")
   (set (make-local-variable 'comment-start-skip) "@c +\\|@comment +")
   (set (make-local-variable 'comment-use-syntax) nil)
+  (setq TeX-comment-start-regexp "@c\\(?:omment\\)?\\>")
   (set (make-local-variable 'words-include-escapes) t)
   (set (make-local-variable 'imenu-generic-expression)
        texinfo-imenu-generic-expression)
diff --git a/tex.el b/tex.el
index 0338bef..ab6d3d9 100644
--- a/tex.el
+++ b/tex.el
@@ -5190,16 +5190,17 @@ Brace insertion is only done if point is in a math 
construct and
 ;;; Verbatim constructs
 
 (defvar TeX-verbatim-p-function nil
-  "Mode-specific function to be called by `TeX-verbatim-p'.")
+  "Mode-specific function to be called by `TeX-verbatim-p'.
+It must accept optional argument POS for position.")
 (make-variable-buffer-local 'TeX-verbatim-p-function)
 
 ;; XXX: We only have an implementation for LaTeX mode at the moment (Oct 2009).
-(defun TeX-verbatim-p (&optional _pos)
+(defun TeX-verbatim-p (&optional pos)
   "Return non-nil if position POS is in a verbatim-like construct.
 A mode-specific implementation is required.  If it is not
 available, the function always returns nil."
   (when TeX-verbatim-p-function
-    (funcall TeX-verbatim-p-function)))
+    (funcall TeX-verbatim-p-function pos)))
 
 
 ;;; Comments



reply via email to

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