[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/adoc-mode af7cd59e1b 013/199: added first-whites-fixed-wid
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/adoc-mode af7cd59e1b 013/199: added first-whites-fixed-width |
Date: |
Sun, 3 Sep 2023 06:59:12 -0400 (EDT) |
branch: elpa/adoc-mode
commit af7cd59e1babd04bff7f06d898c0335dc7893f69
Author: Florian Kaufmann <sensorflo@gmail.com>
Commit: Florian Kaufmann <sensorflo@gmail.com>
added first-whites-fixed-width
---
adoc-mode.el | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/adoc-mode.el b/adoc-mode.el
index 15d18bf238..0b73af46d9 100644
--- a/adoc-mode.el
+++ b/adoc-mode.el
@@ -1014,6 +1014,26 @@ When LITERAL-P is non-nil, the contained text is literal
text."
'(1 '(face adoc-hide-delimiter adoc-reserved t) t)
'(1 '(face adoc-replacement adoc-reserved t) t))))
+;; - To ensure that indented lines are nicely aligned. They only look aligned
if
+;; the whites at line beginning have a fixed with font.
+;; - Some faces have properties which are also visbile on whites
+;; (underlines/backgroundcolor/...), for example links typically gave
+;; underlines. If now a link in an indented paragraph (e.g. because its a
list
+;; item), spawns multiple lines, then without countermeasures the blanks at
+;; line beginning would also be underlined, which looks akward.
+(defun adoc-flf-first-whites-fixed-width(end)
+ (and (re-search-forward "\\(^[ \t]+\\)" end t)
+ ;; dont replace adoc-monospace with adoc-orig-default because that is
+ ;; already a fixed with font, and the semantic context might expext
+ ;; that the blanks have equal widht as the context
+ (text-property-not-all (match-beginning 0) (match-end 0) 'face
'adoc-monospace)))
+
+;; See adoc-flf-first-whites-fixed-width
+(defun adoc-kw-first-whites-fixed-width ()
+ (list
+ 'adoc-flf-first-whites-fixed-width
+ '(1 adoc-orig-default t)))
+
(defun adoc-unfontify-region-function (beg end)
;;
(font-lock-default-unfontify-region beg end)
@@ -1512,14 +1532,7 @@ When LITERAL-P is non-nil, the contained text is literal
text."
'(1 adoc-secondary-text t))
(list "\\[[^]\n]*?\\(?:id\\)=\"\\([^\"\n]*?\\)\"[^]\n]*?\\]"
'(1 adoc-anchor t))
- ;; - If e.g. in a list item a reference/link continues over new line, then
- ;; the following prevents the trailing whites from having underlines (that
- ;; is adoc-reference face)
- ;; - It also aligns better if the other text is variable pitch
- ;; BUG: should not be applyied in literal paragraphs (because there
typically
- ;; the surrounding font has another pitch)
- ;; (list "\\([ \t]*\n\\)" '(1 adoc-text t))
- (list "\\(^[ \t]+\\)" '(1 adoc-align t))
+ (adoc-kw-first-whites-fixed-width)
;; -- warnings
;; todo: add tooltip explaining what is the warning all about
- [nongnu] elpa/adoc-mode 46c99fbd51 006/199: bugfix in font lock regexp for comments, (continued)
- [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
- [nongnu] elpa/adoc-mode af7cd59e1b 013/199: added first-whites-fixed-width,
ELPA Syncer <=
- [nongnu] elpa/adoc-mode 5421059e54 015/199: small change in regexp for unconstrained quote, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 879f594ac9 017/199: comment change / removed a few unneeded adoc face variables, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 6cb365085b 018/199: removed/abandoned lexxer stuff, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 2a088d1e83 020/199: added meta-face-cleanup, initial version, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode eb20a274e0 024/199: made it easier to run tests, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode de18a17505 031/199: fl keyword for comments now in new-style, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 8349f0e05e 032/199: added better support for attribute lists, no tests written yet, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode c8b39080f8 025/199: added that inline subst can't match across block boundaries, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 3ba0822b91 028/199: bugfix: quotes shall not cross labeled list item boundaries, ELPA Syncer, 2023/09/03
- [nongnu] elpa/adoc-mode 2da645a750 040/199: attribute-list can have a local face alist / two faces for target of an inline macro can be specified, ELPA Syncer, 2023/09/03