auctex-diffs
[Top][All Lists]
Advanced

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

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. 4a0bfe342160c7935159b


From: Ikumi Keita
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. 4a0bfe342160c7935159b37a5ffbf99cd0f3a21d
Date: Mon, 12 Jul 2021 02:51:52 -0400 (EDT)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  4a0bfe342160c7935159b37a5ffbf99cd0f3a21d (commit)
      from  5aef4bb0e7cc47dd7387d2324a5510b62a50a1d6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4a0bfe342160c7935159b37a5ffbf99cd0f3a21d
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Date:   Thu Jun 10 17:21:18 2021 +0900

    Clean up temporal markers
    
    * latex.el (LaTeX-env-figure, LaTeX-fill-region-as-paragraph)
    (LaTeX-fill-region-as-para-do,LaTeX-fill-paragraph)
    (LaTeX-fill-region):
    * style/dinbrief.el (LaTeX-dinbrief-env-recipient):
    * style/letter.el (LaTeX-env-recipient):
    * tex-info.el (Texinfo-reftex-section-info):
    * tex.el (TeX-parse-argument):
    Clean up temporal markers after their usage so that they don't slow
    down the subsequent editing in the buffer.

diff --git a/latex.el b/latex.el
index 74ec036..083e530 100644
--- a/latex.el
+++ b/latex.el
@@ -1205,7 +1205,9 @@ If SHORT-CAPTION is non-nil pass it as an optional 
argument to
                               (unless (zerop (length float))
                                 (concat LaTeX-optop float
                                         LaTeX-optcl)))
-    (when active-mark (goto-char start-marker))
+    (when active-mark
+      (goto-char start-marker)
+      (set-marker start-marker nil))
     (when center
       (insert TeX-esc "centering")
       (indent-according-to-mode)
@@ -1227,7 +1229,9 @@ 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))
+        (when active-mark
+          (goto-char end-marker)
+          (set-marker end-marker nil))
         (save-excursion
           (LaTeX-newline)
           (indent-according-to-mode)
@@ -4026,7 +4030,8 @@ performed in that case."
             ;; ELSE part follows - loop termination relies on a fact
             ;; that (LaTeX-fill-region-as-para-do) moves point past
             ;; the filled region
-            (LaTeX-fill-region-as-para-do from end-marker justify-flag)))))))
+            (LaTeX-fill-region-as-para-do from end-marker justify-flag)))))
+    (set-marker end-marker nil)))
 
 ;; The content of `LaTeX-fill-region-as-para-do' was copied from the
 ;; function `fill-region-as-paragraph' in `fill.el' (CVS Emacs,
@@ -4086,7 +4091,10 @@ space does not end a sentence, so don't break a line 
there."
     (goto-char from-plus-indent))
 
   (if (not (> to (point)))
-      nil ;; There is no paragraph, only whitespace: exit now.
+      ;; There is no paragraph, only whitespace: exit now.
+      (progn
+        (set-marker to nil)
+        nil)
 
     (or justify (setq justify (current-justification)))
 
@@ -4211,10 +4219,12 @@ space does not end a sentence, so don't break a line 
there."
                          (concat "^\\([ \t]*" TeX-comment-start-regexp "+\\)*"
                                  "[ \t]*")
                          (line-beginning-position)))
-              (LaTeX-fill-newline)))))
+              (LaTeX-fill-newline)))
+          (set-marker end-marker nil)))
       ;; Leave point after final newline.
       (goto-char to)
       (unless (eobp) (forward-char 1))
+      (set-marker to nil)
       ;; Return the fill-prefix we used
       fill-prefix)))
 
@@ -4492,7 +4502,8 @@ depends on the value of `LaTeX-syntactic-comments'."
                                               (line-beginning-position 2)
                                               justify)
               (goto-char end-marker)
-              (beginning-of-line)))
+              (beginning-of-line)
+              (set-marker end-marker nil)))
           (LaTeX-fill-code-comment justify)))
        ;; Syntax-aware filling:
        ;; * `LaTeX-syntactic-comments' enabled: Everything.
@@ -4634,6 +4645,7 @@ formatting."
                        (concat "^\\($\\|[ \t]+$\\|[ \t]*"
                                TeX-comment-start-regexp "+[ \t]*$\\)")))
             (forward-line 1))))
+      (set-marker next-par nil)
       (set-marker to nil)))
   (message "Formatting%s...done" (or what "")))
 
diff --git a/style/dinbrief.el b/style/dinbrief.el
index 57bf773..fe8a5e9 100644
--- a/style/dinbrief.el
+++ b/style/dinbrief.el
@@ -169,7 +169,8 @@
                             (marker-position addr-end) 'move)
                       (progn
                         (newline)
-                        (indent-to addr-column))))))))
+                        (indent-to addr-column)))))
+              (set-marker addr-end nil))))
       (LaTeX-dinbrief-insert "\n")
       (indent-to indentation))
     (if (not (zerop (length postremark)))
diff --git a/style/letter.el b/style/letter.el
index a07aba5..5c64c28 100644
--- a/style/letter.el
+++ b/style/letter.el
@@ -146,7 +146,8 @@
                             (marker-position addr-end) 'move)
                       (progn
                         (newline)
-                        (indent-to addr-column))))))))
+                        (indent-to addr-column)))))
+              (set-marker addr-end nil))))
       (insert "\n")
       (indent-to indentation))
     (insert TeX-esc "opening"
diff --git a/tex-info.el b/tex-info.el
index ea6cab0..4a7aed0 100644
--- a/tex-info.el
+++ b/tex-info.el
@@ -478,8 +478,10 @@ is assumed by default."
            (if (nth 1 reftex-label-menu-flags) ; section number flag
                (concat section-number " "))
            text))
-    (list 'toc "toc" text file marker level section-number
-          literal (marker-position marker))))
+    (prog1
+        (list 'toc "toc" text file marker level section-number
+              literal (marker-position marker))
+      (set-marker marker nil))))
 
 (defun Texinfo-reftex-hook ()
   "Hook function to plug Texinfo into RefTeX."
diff --git a/tex.el b/tex.el
index d07b479..2c5da74 100644
--- a/tex.el
+++ b/tex.el
@@ -3502,7 +3502,8 @@ See `TeX-parse-macro' for details."
                       (insert TeX-arg-opening-brace)
                       (goto-char (marker-position end))
                       (insert TeX-arg-closing-brace)
-                      (setq insert-flag t))))
+                      (setq insert-flag t)
+                      (set-marker end nil))))
                  ((= arg 0)) ; nop for clarity
                  ((> arg 0)
                   (TeX-parse-argument optional t)

-----------------------------------------------------------------------

Summary of changes:
 latex.el          | 24 ++++++++++++++++++------
 style/dinbrief.el |  3 ++-
 style/letter.el   |  3 ++-
 tex-info.el       |  6 ++++--
 tex.el            |  3 ++-
 5 files changed, 28 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

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