auctex-devel
[Top][All Lists]
Advanced

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

Re: Cleaning up temporal markers


From: Arash Esbati
Subject: Re: Cleaning up temporal markers
Date: Wed, 07 Jul 2021 12:27:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50

Hi Keita,

Ikumi Keita <ikumi@ikumi.que.jp> writes:

> Elisp reference recommends to make markers point nowhere when they are
> no longer necessary:
> ,----
> |    Insertion and deletion in a buffer must check all the markers and
> | relocate them if necessary.  This slows processing in a buffer with a
> | large number of markers.  For this reason, it is a good idea to make a
> | marker point nowhere if you are sure you don’t need it any more.
> | Markers that can no longer be accessed are eventually removed (*note
> | Garbage Collection::).
> `----
>
> AUCTeX sometimes leaves temporal markers without clearing them up. So I
> propose to apply the attached patch.

I've checked only the 2 functions `LaTeX-env-figure' and
`LaTeX-fill-region-as-paragraph' and my understanding is that for
let-bound markers in a function body, you don't have to clean up as
described above.  These are the parts of the functions:

    (defun LaTeX-env-figure (environment)
      "..."
      (let* (...
             start-marker end-marker)
        ...

    (defun LaTeX-fill-region-as-paragraph (from to &optional justify-flag)
      "..."
      (interactive "*r\nP")
      (let ((end-marker (save-excursion (goto-char to) (point-marker))))
        ...

IIRC the Emacs lisp reference is not clear about this point.  It would
be good if someone gives a definite answer about my assumption above.

Best, Arash



reply via email to

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