[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/auto-overlays b08e944 23/93: Changes related to new LaT
From: |
Stefan Monnier |
Subject: |
[elpa] externals/auto-overlays b08e944 23/93: Changes related to new LaTeX functionality: |
Date: |
Mon, 14 Dec 2020 13:00:30 -0500 (EST) |
branch: externals/auto-overlays
commit b08e944a6bfc475b8d0dadaebd3b305befc46859
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: tsc25 <toby-predictive@dr-qubit.org>
Changes related to new LaTeX functionality:
electric environments, dictionary switching based on docclass, and more.
---
auto-overlay-common.el | 7 ++++--
auto-overlays.el | 66 ++++++++++++++++++++++++++++++--------------------
2 files changed, 45 insertions(+), 28 deletions(-)
diff --git a/auto-overlay-common.el b/auto-overlay-common.el
index 96b36a5..089261e 100644
--- a/auto-overlay-common.el
+++ b/auto-overlay-common.el
@@ -5,7 +5,7 @@
;; Copyright (C) 2006 Toby Cubitt
;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
-;; Version: 0.1
+;; Version: 0.1.1
;; Keywords: automatic, overlays
;; URL: http://www.dr-qubit.org/emacs.php
@@ -30,6 +30,9 @@
;;; Change Log:
;;
+;; Version 0.1.1
+;; * bugfix in `auto-overlay-local-binding'
+;;
;; Version 0.1
;; * initial version split from auto-overlays
@@ -230,7 +233,7 @@ See `auto-overlay-highest-priority-at-point' for a
definition of
point `(identity ,symbol))))
(if overlay
(overlay-get overlay symbol)
- (eval symbol)))
+ (when (boundp symbol) (eval symbol))))
)
;; auto-overlay-common.el ends here
diff --git a/auto-overlays.el b/auto-overlays.el
index 418a8ee..7952162 100644
--- a/auto-overlays.el
+++ b/auto-overlays.el
@@ -2,7 +2,7 @@
;;; auto-overlays.el --- automatic regexp-delimited overlays for emacs
-;; Copyright (C) 2005 2006 2007 Toby Cubitt
+;; Copyright (C) 2005-2007 Toby Cubitt
;; Author: Toby Cubitt <toby-predictive@dr-qubit.org>
;; Version: 0.8
@@ -30,6 +30,10 @@
;;; Change Log:
;;
+;; Version 0.8.1
+;; * modified `auto-o-run-after-change-functions' to cope more robustly with
+;; the pending functions that it calls themselves scheduling other functions
+;;
;; Version 0.8
;; * modified to allow sets of regexps that are shared between buffers to be
;; enabled and disabled independently in each of those buffers
@@ -804,26 +808,33 @@ was saved."
;; functions that should run after a change to the buffer, in the correct
;; order.
- ;; run pending pre-suicide functions
- (when auto-o-pending-pre-suicide
- (mapc (lambda (f) (apply (car f) (cdr f))) auto-o-pending-pre-suicide)
- (setq auto-o-pending-pre-suicide nil))
- ;; run pending suicides
- (when auto-o-pending-suicides
- (mapc 'auto-o-suicide auto-o-pending-suicides)
- (setq auto-o-pending-suicides nil))
- ;; run pending post-suicide functions
- (when auto-o-pending-post-suicide
- (mapc (lambda (f) (apply (car f) (cdr f))) auto-o-pending-post-suicide)
- (setq auto-o-pending-post-suicide nil))
- ;; run updates
- (when auto-o-pending-updates
- (mapc (lambda (l) (apply 'auto-overlay-update l)) auto-o-pending-updates)
- (setq auto-o-pending-updates nil))
- ;; run pending post-update functions
- (when auto-o-pending-post-update
- (mapc (lambda (f) (apply (car f) (cdr f))) auto-o-pending-post-update)
- (setq auto-o-pending-post-update nil))
+ ;; repeat until all the pending functions have been cleared (it may be
+ ;; necessary to run multiple times since the pending functions may
+ ;; themselves cause more functions to be added to the pending lists)
+ (while (or auto-o-pending-pre-suicide auto-o-pending-suicides
+ auto-o-pending-post-suicide auto-o-pending-updates
+ auto-o-pending-post-update)
+ ;; run pending pre-suicide functions
+ (when auto-o-pending-pre-suicide
+ (mapc (lambda (f) (apply (car f) (cdr f))) auto-o-pending-pre-suicide)
+ (setq auto-o-pending-pre-suicide nil))
+ ;; run pending suicides
+ (when auto-o-pending-suicides
+ (mapc 'auto-o-suicide auto-o-pending-suicides)
+ (setq auto-o-pending-suicides nil))
+ ;; run pending post-suicide functions
+ (when auto-o-pending-post-suicide
+ (mapc (lambda (f) (apply (car f) (cdr f))) auto-o-pending-post-suicide)
+ (setq auto-o-pending-post-suicide nil))
+ ;; run updates
+ (when auto-o-pending-updates
+ (mapc (lambda (l) (apply 'auto-overlay-update l)) auto-o-pending-updates)
+ (setq auto-o-pending-updates nil))
+ ;; run pending post-update functions
+ (when auto-o-pending-post-update
+ (mapc (lambda (f) (apply (car f) (cdr f))) auto-o-pending-post-update)
+ (setq auto-o-pending-post-update nil))
+ )
)
@@ -838,10 +849,12 @@ was saved."
;; FIXME: we should do more to avoid doing multiple, redundant
;; updates. Currently, only updates for identical regions are
- ;; filtered, not updates for overlapping regions.
+ ;; filtered (by add-to-list), not updates for overlapping regions.
(add-to-list 'auto-o-pending-updates
- (list (line-number-at-pos start)
- (when end (line-number-at-pos end))
+ (list (setq start (line-number-at-pos start))
+ (when (and end (setq end (line-number-at-pos end))
+ (not (= start end)))
+ end)
set-id))
)
@@ -999,8 +1012,9 @@ was saved."
(looking-at (auto-o-regexp o-self)))
(= (match-end 0) (overlay-end o-self)))
;; if we have a parent overlay, call appropriate suicide function,
- ;; schedule an update (necessary for complicated reasons!) then delete
- ;; ourselves
+ ;; schedule an update (necessary since if match regexp contains
+ ;; "context", we may be comitting suicide only for the match overlay to
+ ;; be recreated in a slightly different place), then delete ourselves
(when (overlay-get o-self 'parent)
(funcall (auto-o-suicide-function o-self) o-self))
;; Note: not supplying the 'set-id can avoid multiple, effectively
- [elpa] externals/auto-overlays 36efcfd 89/93: Handle empty group in auto-o-regexp-match., (continued)
- [elpa] externals/auto-overlays 36efcfd 89/93: Handle empty group in auto-o-regexp-match., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 5996143 73/93: Refactor auto-overlays-(in|[highest-priority-]at-point) search functions:, Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays c795dc2 81/93: Fix bug in auto-overlay-trigger-update., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 00fb155 91/93: * auto-overlay: Mark or remove unused vars, Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays d207912 93/93: * docs/auto-overlay-manual.texinfo: Move as a consequence of the git split, Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 0f1ee97 08/93: Version 0.12.2 of the predictive completion package., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 5b53236 09/93: Version 0.13.1 of the predictive completion package., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 2fabf34 19/93: Various small enhancements and bug-fixes, Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays a530bba 29/93: Ensure properties due to match overlays that are being superceded are removed from overlays., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 8108af9 33/93: Replaced a couple of cl functions that had crept in., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays b08e944 23/93: Changes related to new LaTeX functionality:,
Stefan Monnier <=
- [elpa] externals/auto-overlays 5db4a85 32/93: Fixed bug in auto-o-match-overlay that incorrectly set parent property, Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 67776d2 25/93: Parse functions must set basic overlay properties themselves, Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays c40d2a5 20/93: Shared regexp sets can once again be enabled and disabled independently in each buffer., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 105a69b 34/93: Simplified predictive-define-all-prefixes., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays a21ba4b 44/93: Fix auto-overlay bug related to overlapping overlays., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays dbf21cb 47/93: minor corrections auto-overlay docs, Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays f268d75 42/93: Fixed bug in auto-overlay-unload-definition., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 9448575 40/93: Updated documentation to reflect changes to auto-overlay-start/stop/save/load functions., Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays 7ca8286 50/93: Added auto-o-schedule-delete-in-front-or-behind-suicide, Stefan Monnier, 2020/12/14
- [elpa] externals/auto-overlays a73aeff 51/93: Use eq for comparison when adding to auto-o-pending-suicides, instead of equal, Stefan Monnier, 2020/12/14