[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/adoc-mode 0ea3de138a 091/199: refactored adoc-kwf-attribli
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/adoc-mode 0ea3de138a 091/199: refactored adoc-kwf-attriblist |
Date: |
Sun, 3 Sep 2023 06:59:37 -0400 (EDT) |
branch: elpa/adoc-mode
commit 0ea3de138a7b9b3e059aeb7ed1d56a3657532b11
Author: sensorflo <sensorflo@gmail.com>
Commit: sensorflo <sensorflo@gmail.com>
refactored adoc-kwf-attriblist
- moved let form deeper down
- renamed end2 -> attribute-list-end
- added comments
---
adoc-mode.el | 40 +++++++++++++++++++++-------------------
1 file changed, 21 insertions(+), 19 deletions(-)
diff --git a/adoc-mode.el b/adoc-mode.el
index 2de6492396..5d05c16011 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -1276,25 +1276,27 @@ text having adoc-reserved set to 'block-del."
(and found (not prevented))))
(defun adoc-kwf-attriblist (end)
- (let* ((end2 end)
- pos-or-id)
- (while (< (point) end)
- (goto-char (or (text-property-not-all (point) end 'adoc-attribute-list
nil)
- end))
- (when (< (point) end)
- (setq pos-or-id 0)
- (setq end2 (or (text-property-any (point) end 'adoc-attribute-list nil)
- end))
- (while (re-search-forward (adoc-re-attribute-list-elt) end2 t)
- (when (match-beginning 1)
- (setq pos-or-id (buffer-substring-no-properties (match-beginning 1)
(match-end 1)))
- (put-text-property (match-beginning 1) (match-end 1) 'face
markup-attribute-face))
- (let ((group (if (match-beginning 2) 2 3))
- (face (adoc-attribute-elt-face pos-or-id (get-text-property
(match-beginning 0) 'adoc-attribute-list))))
- (put-text-property (match-beginning group) (match-end group) 'face
face))
- (when (numberp pos-or-id) (setq pos-or-id (1+ pos-or-id)))))))
-
- (goto-char end2))))
+ ;; for each attribute list before END
+ (while (< (point) end)
+ (goto-char (or (text-property-not-all (point) end 'adoc-attribute-list nil)
+ end))
+ (when (< (point) end)
+ (let ((attribute-list-end
+ (or (text-property-any (point) end 'adoc-attribute-list nil)
+ end))
+ (pos-or-id 0))
+
+ ;; for each attribute in current attribute list
+ (while (re-search-forward (adoc-re-attribute-list-elt)
attribute-list-end t)
+ (when (match-beginning 1)
+ (setq pos-or-id (buffer-substring-no-properties (match-beginning
1) (match-end 1)))
+ (put-text-property (match-beginning 1) (match-end 1) 'face
markup-attribute-face))
+ (let ((group (if (match-beginning 2) 2 3))
+ (face (adoc-attribute-elt-face pos-or-id (get-text-property
(match-beginning 0) 'adoc-attribute-list))))
+ (put-text-property (match-beginning group) (match-end group) 'face
face))
+ (when (numberp pos-or-id) (setq pos-or-id (1+ pos-or-id))))
+
+ (goto-char attribute-list-end))))
nil)
(defun adoc-facespec-subscript ()
- [nongnu] elpa/adoc-mode d3517e596d 102/199: all special inline macros are now fontified before the general inline macro, (continued)
- [nongnu] elpa/adoc-mode d3517e596d 102/199: all special inline macros are now fontified before the general inline macro, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode e36c0105ab 104/199: improved fontifying for footnotes, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 21bb167f67 108/199: improved comments and whites, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 8f8a1ef307 111/199: bumped version to 0.6.5, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode c117d58b4b 119/199: Merge pull request #1 from lukesanantonio/master, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 7ec9c3569d 134/199: Make TODO notes stand out, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 296df94325 135/199: Fix a bunch of typos, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 99917e0bdd 069/199: adoc-re-inline-macro can now be told to match only an empty attribute list, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode a976f1ac84 085/199: edited commentary section, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 7aa44fea5b 089/199: in menu, unicode chars for (R) and (TM) were interchanged, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 0ea3de138a 091/199: refactored adoc-kwf-attriblist,
ELPA Syncer <=
- [nongnu] elpa/adoc-mode 9bea822e07 136/199: Add license badge, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 1cbd1297be 137/199: Restructure the README a bit, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode b2d2bcb2cd 138/199: Really kill all the tabs, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 17fab9724a 143/199: Fix duplicated test names, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode e0d08ee6d2 144/199: Delete obsolete Cask file, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 43eda399d3 148/199: Tweak the package description, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 468fdc0fd9 149/199: Update some package metadata, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 86c2735a58 150/199: Update the copyright, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 888a38beb2 154/199: Bundle the mode's menu definition with the mode's keymap, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 506e015e11 159/199: [#9] Disable broken tests, ELPA Syncer, 2023/09/03