[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/annotate ec0ed147a2 170/372: - fixed error for regexp sear
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/annotate ec0ed147a2 170/372: - fixed error for regexp search in 'annotate--font-lock-matcher' |
Date: |
Fri, 4 Feb 2022 16:58:56 -0500 (EST) |
branch: elpa/annotate
commit ec0ed147a29f706c1c2453c173f7592b52ca0bd7
Author: cage <cage-invalid@invalid>
Commit: cage <cage-invalid@invalid>
- fixed error for regexp search in 'annotate--font-lock-matcher'
Sometimes some modes/package puts overlay on the last character of a
buffer (notably SLIME when the parenthesis of a form are not
balanced). This will make 're-search-forward' in the aforementioned
function fails and font lock becomes a mess (e.g. text color
disappears).
---
annotate.el | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/annotate.el b/annotate.el
index b34091d8af..b90f575667 100644
--- a/annotate.el
+++ b/annotate.el
@@ -638,16 +638,17 @@ annotation plus the newline."
(if (>= (point) limit)
nil ; no match found before limit
(progn
- ;; go to the end of the longest overlay under point
- (let ((overlays (sort (overlays-at (point))
+ ;; go to the end of the longest annotation under point
+ (let ((overlays (sort (cl-remove-if-not 'annotationp
+ (overlays-at (point)))
(lambda (x y)
(> (overlay-end x) (overlay-end y))))))
- (if overlays
- (goto-char (overlay-end (car overlays)))))
- ;; capture the area from the overlay to EOL for the modification guard
- ;; and the newline itself for the annotation.
- (re-search-forward "\\(.*\\(\n\\)\\)")
- t)))
+ (when overlays
+ (goto-char (overlay-end (car overlays)))))
+ ;; capture the area from the overlay to EOL (regexp match #1)
+ ;; for the modification guard and the newline itself (regexp
+ ;; match #2) for the annotation.
+ (re-search-forward "\\(.*\\(\n\\)\\)" limit t))))
(cl-defstruct annotate-group
words
- [nongnu] elpa/annotate fd9c403ecc 164/372: - changed quotation mark sentence., (continued)
- [nongnu] elpa/annotate fd9c403ecc 164/372: - changed quotation mark sentence., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate a28e7b4fd2 028/372: refactored and documented export function, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate b2cd959cfa 053/372: Annotations of long lines start at the next line, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e98c93a12b 072/372: - added 'annotate-' prefix to public symbols;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 6289c87bf8 029/372: annotation buffer now has proper file name, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e1daa61b99 065/372: use `locate-user-emacs-file` to specify default save file, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 392197f943 155/372: Merge branch 'master' into annotations-on-their-own-line, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 3bb486d0cf 158/372: - changed `let*' with `let'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate c007611614 159/372: - removed useless rebinding of 'annotate-annotation-position-policy'., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate c7891d8d24 163/372: - tried to make the file more "site friendly"., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate ec0ed147a2 170/372: - fixed error for regexp search in 'annotate--font-lock-matcher',
ELPA Syncer <=
- [nongnu] elpa/annotate 1525550f85 182/372: - changed test for annotation rejection and removed (maybe) useless check., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 2e858729cb 200/372: - saving annotations with newlines seems to works;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 31e3c24726 195/372: - updated version and documentation, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e933d84692 214/372: - fixed removing of annotation in 'annotate-before-change-fn', ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e03edfb2c2 218/372: - increased version number;, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate e2c365a376 222/372: - added reference to the issue., ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 44b378b16a 219/372: Merge pull request #62 from cage2/master, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate f0a71bb148 223/372: Merge pull request #64 from cage2/fix-face-detection, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 8ac52808e8 226/372: - added a couple of functions to allow an user to change the file that, ELPA Syncer, 2022/02/04
- [nongnu] elpa/annotate 9ea6c4fc71 247/372: - signalled errors when query parsing errors occurs., ELPA Syncer, 2022/02/04