[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/popup 05f5492 069/184: Change buffer-contents from string
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/popup 05f5492 069/184: Change buffer-contents from string to propertied string for detecting end of popup. |
Date: |
Wed, 6 Oct 2021 00:01:08 -0400 (EDT) |
branch: elpa/popup
commit 05f54923946f9270deb215c91c676f150e3768f2
Author: uk-ar <yuuki.ari@gmail.com>
Commit: uk-ar <yuuki.ari@gmail.com>
Change buffer-contents from string to propertied string for detecting end
of popup.
---
tests/popup-test.el | 38 ++++++++++++++++++--------------------
1 file changed, 18 insertions(+), 20 deletions(-)
diff --git a/tests/popup-test.el b/tests/popup-test.el
index 0b811dc..a8357b0 100644
--- a/tests/popup-test.el
+++ b/tests/popup-test.el
@@ -118,26 +118,24 @@ batch mode."
(cdr strings)))))
(defun popup-test-helper-buffer-contents ()
- (with-output-to-string
- (loop with start = (point-min)
- for overlay in (sort* (overlays-in (point-min) (point-max))
- '< :key 'overlay-start)
- for overlay-start = (overlay-start overlay)
- for overlay-end = (overlay-end overlay)
- for prefix = (buffer-substring-no-properties start overlay-start)
- for befstr = (overlay-get overlay 'before-string)
- for substr = (or (overlay-get overlay 'display)
- (buffer-substring-no-properties
- overlay-start overlay-end))
- for aftstr = (overlay-get overlay 'after-string)
- do (princ prefix)
- unless (overlay-get overlay 'invisible) do
- (when befstr (princ befstr))
- (princ substr)
- (when aftstr (princ aftstr))
- do (setq start overlay-end)
- finally (princ (buffer-substring-no-properties start (point-max))))
- ))
+ (loop with start = (point-min)
+ with contents
+ for overlay in (sort* (overlays-in (point-min) (point-max))
+ '< :key 'overlay-start)
+ for overlay-start = (overlay-start overlay)
+ for overlay-end = (overlay-end overlay)
+ for prefix = (buffer-substring start overlay-start)
+ for befstr = (overlay-get overlay 'before-string)
+ for substr = (or (overlay-get overlay 'display)
+ (buffer-substring overlay-start overlay-end))
+ for aftstr = (overlay-get overlay 'after-string)
+ collect prefix into contents
+ unless (overlay-get overlay 'invisible) collect
+ (concat befstr substr aftstr) into contents
+ do (setq start overlay-end)
+ finally (return (concat (apply 'concat contents)
+ (buffer-substring start (point-max))))
+ ))
;; Test for helper method
(ert-deftest popup-test-test-helper ()
- [nongnu] elpa/popup 4ab00e1 141/184: Use https scheme as possible, (continued)
- [nongnu] elpa/popup 4ab00e1 141/184: Use https scheme as possible, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 333ea5e 167/184: Bump version., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 9052d11 143/184: Improve eldoc for `popup-tip` and `popup-menu*`, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 6f4bba9 007/184: Update copyright., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 8937b92 003/184: Refactoring and auto-test., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup f15c82b 014/184: Merge pull request #10 from tkf/inhibit-read-only, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 2f1c9d8 056/184: Refactoring: new variable in popup-create-line-string, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 6a2520d 040/184: Add folding test case when on the corner, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 17a0cd4 080/184: Add :initial-cursor keyword option to popup-menu*., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 37c8761 070/184: Refactoring all test cases, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 05f5492 069/184: Change buffer-contents from string to propertied string for detecting end of popup.,
ELPA Syncer <=
- [nongnu] elpa/popup 23652e7 064/184: Use face inheritance to avoid duplication, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup aa8762f 077/184: Fix travis configuration file for using cl-lib, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup ca3cc7f 106/184: Add: initial-index keyword argument to function `popup-menu*'. (initial-index argument is optional argument), ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 4bee35b 128/184: Add screenshot images, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 871d893 083/184: Merge pull request #54 from auto-complete/use-cl-lib, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup a3d1bfd 112/184: Fix test., ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup a73a3b1 104/184: Fix for using cask, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 0f640e0 087/184: remove require because popup already requires it, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 33dac62 127/184: Fix MELPA stable link, ELPA Syncer, 2021/10/06
- [nongnu] elpa/popup 982f4ec 108/184: Untabify, ELPA Syncer, 2021/10/06