[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-superstar bd36b34d93 066/162: further minimized test s
From: |
Stefan Kangas |
Subject: |
[nongnu] elpa/org-superstar bd36b34d93 066/162: further minimized test slomode.el |
Date: |
Fri, 31 Dec 2021 19:35:26 -0500 (EST) |
branch: elpa/org-superstar
commit bd36b34d934da21b7101e2c989be815f012580b8
Author: D. Williams <d.williams@posteo.net>
Commit: D. Williams <d.williams@posteo.net>
further minimized test slomode.el
---
tests/slomode.el | 35 +++++++++--------------------------
1 file changed, 9 insertions(+), 26 deletions(-)
diff --git a/tests/slomode.el b/tests/slomode.el
index 3dd8c3af02..0bbb3730a5 100644
--- a/tests/slomode.el
+++ b/tests/slomode.el
@@ -1,32 +1,23 @@
;; this is a temporary file for testing slowdown issues.
-;; edit the variable test-case to 1,2 or 3, then run:
-;; emacs -Q -l slomode-redux-1.el <your sample file>
+;; edit the variable test-case to 1 or 2, then run:
+;; emacs -Q -l slomode.el <your sample file>
;; start the test with ‘M-x slo-mode’.
(require 'org)
-(defvar test-case 1
+(defvar test-case 2
"Check one of several plausible test cases.")
-(setq inhibit-compacting-font-caches nil)
+(if (= test-case 1)
+ (setq how-kw 'prepend)
+ (setq how-kw nil))
-(cond ((= test-case 1)
- ;; same as 2 and 3 combined
- (defun slo-compose ()
- (compose-region (match-beginning 1) (match-end 1) ?◉)
- 'slo-face))
- ((= test-case 2)
- (defun slo-compose ()
- 'slo-face))
- ((= test-case 3)
- (defun slo-compose ()
- (compose-region (match-beginning 1) (match-end 1) ?◉)
- nil)))
+(setq inhibit-compacting-font-caches nil)
(defface slo-face '((default . nil)) "Sloface")
(defvar slo-keywords
- '(("^\\**\\(?1:\\*\\) "
- (1 (slo-compose) prepend))))
+ `(("^\\**\\(?1:\\*\\) "
+ (1 slo-face ,how-kw))))
(defun slo-fontify-buffer ()
"Fontify the buffer."
@@ -36,13 +27,6 @@
(font-lock-ensure)
(font-lock-flush))))
-(defun un-slo ()
- (save-excursion
- (goto-char (point-min))
- (while (re-search-forward "^\\*+ " nil t)
- (decompose-region (match-beginning 0) (match-end 0)))))
-
-
;;; Mode commands
;;;###autoload
(define-minor-mode slo-mode
@@ -55,5 +39,4 @@
(slo-fontify-buffer))
(t
(font-lock-remove-keywords nil slo-keywords)
- (un-slo)
(slo-fontify-buffer))))
- [nongnu] elpa/org-superstar 59391390df 056/162: Added support for making leading stars invisible., (continued)
- [nongnu] elpa/org-superstar 59391390df 056/162: Added support for making leading stars invisible., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 7e2ca95932 033/162: added new, more modular sample inputs for incoming unit testing, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar d6071eb477 071/162: Updating README to fit first major version (1.0.0), Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar c3de9e52a8 035/162: adding reference files in faceup format, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 4517690c41 021/162: Copied description from README, added more UTF8 bullet hints., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar da32880de2 047/162: Honor org-odd-levels-only when computing heading levels., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar db21c0f07e 037/162: removing already moved file. git is weird., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar d04eb018fd 060/162: Moved old announcements to the bottom of the README., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 92336ba0fe 054/162: added a new variable for upcoming feature: remove-leading-stars, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar c9f1406645 067/162: forgot quote, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar bd36b34d93 066/162: further minimized test slomode.el,
Stefan Kangas <=
- [nongnu] elpa/org-superstar 6fcf4b58fb 059/162: Treat org-hide-leading-stars-before-indent-mode like the base variable., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 377ad5af7b 051/162: Preparing documentation for new release, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar d2f03b9666 041/162: removed spurious whitespace, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 6089c47f8b 031/162: Major cleanup: fix fontification edge cases, remove redundant variables., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 212cf5821e 063/162: Version bump to signify patch., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar e59514a287 055/162: implementing first draft version of invisible leading bullets, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar db2e27d68a 049/162: Adding first draft of TODO item support., Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 95ad994f82 072/162: fixed typo, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 2f9f9d6b21 070/162: version bump to 1.0.0, Stefan Kangas, 2021/12/31
- [nongnu] elpa/org-superstar 61bf289b42 073/162: Removed no longer needed temporary testing file., Stefan Kangas, 2021/12/31