[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/adoc-mode 56cfbecca2 002/199: added adoc-enable-two-line-t
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/adoc-mode 56cfbecca2 002/199: added adoc-enable-two-line-title |
Date: |
Sun, 3 Sep 2023 06:59:11 -0400 (EDT) |
branch: elpa/adoc-mode
commit 56cfbecca2f8afa66df1430f82689a567e2ccebc
Author: Florian Kaufmann <sensorflo@gmail.com>
Commit: Florian Kaufmann <sensorflo@gmail.com>
added adoc-enable-two-line-title
---
adoc-mode.el | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
diff --git a/adoc-mode.el b/adoc-mode.el
index 689ac77553..0e3d986987 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -195,6 +195,24 @@ configuration file."
"Default title sub type, see `adoc-title-descriptor'."
:group 'adoc )
+(defcustom adoc-enable-two-line-title t
+ "Wether or not two line titles shall be fontified.
+
+nil means never fontify. t means always fontify. A number means
+only fontify if the line below has NOT the lenght of the given
+number. You could use a number for example when all your
+delimited block lines have a certain length.
+
+This is usefull because adoc-mode has troubles to properly
+distinguish between two line titles and a line of text before a
+delimited block. Note however that adoc-mode knows the AsciiDoc
+rule that the length of a two line title underline can differ at
+most 3 chars from the length of the title text."
+ :type '(choice (const nil)
+ (const t)
+ number)
+ :group 'adoc)
+
(defface adoc-orig-default
'((t (:inherit (default))))
"The default face before buffer-face-mode was in effect.
@@ -915,8 +933,11 @@ subgroups:
`(list
;; matcher function
(lambda (end)
- (and (re-search-forward ,(adoc-re-two-line-title del) end t)
- (< (abs (- (length (match-string 1)) (length (match-string 2)))) 3)
+ (and adoc-enable-two-line-title
+ (re-search-forward ,(adoc-re-two-line-title del) end t)
+ (< (abs (- (length (match-string 1)) (length (match-string 2)))) 3)
+ (or (not (numberp adoc-enable-two-line-title))
+ (not (equal adoc-enable-two-line-title (length (match-string
2)))))
(not (text-property-not-all (match-beginning 0) (match-end 0)
'adoc-reserved nil))))
;; highlighers
'(1 ,text-face t)
- [nongnu] branch elpa/adoc-mode created (now 809fb47a26), ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode c5fec9c015 001/199: initial commit, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 56cfbecca2 002/199: added adoc-enable-two-line-title,
ELPA Syncer <=
- [nongnu] elpa/adoc-mode 46c99fbd51 006/199: bugfix in font lock regexp for comments, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode e144653832 005/199: refactored title constructs, initiated testing adoc-mode, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 625388ac44 010/199: improved superscript/subsctipt unfontify, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 9d4bb33fca 016/199: reworked lists items and adoc-align prefix, incl. tests,, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 03f080fe6b 019/199: extended delimited block tests with checking adoc-align face, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 276e822b59 004/199: Merge markup-faces into font_lock_delimited_blocks, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode f4bbbea2ff 003/199: replaced adoc's own faces with markup-faces library, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 7a87ac9e5c 007/199: added customization var for delimited block regexps, added tests, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 113eba1bfe 008/199: changed/added docstring, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode b0d75800d0 012/199: edited comment, ELPA Syncer, 2023/09/03