[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/topspace d0e7e89413 094/181: Put topspace-empty-line-in
From: |
ELPA Syncer |
Subject: |
[elpa] externals/topspace d0e7e89413 094/181: Put topspace-empty-line-indicator inside fringe (#9) |
Date: |
Tue, 23 Aug 2022 12:58:37 -0400 (EDT) |
branch: externals/topspace
commit d0e7e8941354d0b585e0c8146762c05f2b99ed55
Author: Trevor Pogue <trevorpogue@gmail.com>
Commit: GitHub <noreply@github.com>
Put topspace-empty-line-indicator inside fringe (#9)
---
README.md | 28 ++++++++++++++++++++++++----
topspace.el | 28 ++++++++++++++++++++++++----
2 files changed, 48 insertions(+), 8 deletions(-)
diff --git a/README.md b/README.md
index e0c04e3497..33167971a3 100644
--- a/README.md
+++ b/README.md
@@ -87,13 +87,33 @@ then be active only when that function returns a non-nil
value."
(defcustom topspace-empty-line-indicator
#'topspace-default-empty-line-indicator
"Text that will appear in each empty topspace line above the top text line.
-By default it is \"~\" when `indicate-empty-lines' is non-nil, otherwise \"\".
-Can be set to either a constant string or a function that returns a string."
+Can be set to either a constant string or a function that returns a string.
+
+By default it will show the empty-line bitmap in the left fringe
+if `indicate-empty-lines' is non-nil, otherwise nothing.
+The default bitmap is the one that the `empty-line' logical fringe indicator
+maps to in `fringe-indicator-alist'.
+This is done by adding a 'display property to the string (see
+`topspace-default-empty-line-indicator' for more details).
+
+ You can alternatively show a string in the body of each top space line by
+having `topspace-empty-line-indicator' return a string without the 'display
+property added. If you do this you may be interested in also changing the
+string's face like so: (propertize indicator-string 'face 'fringe)."
:type '(choice 'string (function :tag "String function")))
(defun topspace-default-empty-line-indicator ()
- "Return \"~\" with face 'fringe if `indicate-empty-lines` non-nil else \"\"."
- (if indicate-empty-lines (propertize "~" 'face 'fringe) ""))
+ "Put the empty-line bitmap in fringe if `indicate-empty-lines' is non-nil.
+
+The bitmap used is the one that the `empty-line' logical fringe indicator
+maps to in `fringe-indicator-alist'."
+ (if indicate-empty-lines
+ (let ((bitmap (catch 'tag
+ (dolist (x fringe-indicator-alist)
+ (when (eq (car x) 'empty-line)
+ (throw 'tag (cdr x)))))))
+ (propertize " " 'display (list `left-fringe bitmap `fringe)))
+ ""))
(defcustom topspace-mode-line " T"
"Mode line lighter for Topspace.
diff --git a/topspace.el b/topspace.el
index 37b5b00657..40d9721af6 100644
--- a/topspace.el
+++ b/topspace.el
@@ -150,13 +150,33 @@ then be active only when that function returns a non-nil
value."
(defcustom topspace-empty-line-indicator
#'topspace-default-empty-line-indicator
"Text that will appear in each empty topspace line above the top text line.
-By default it is \"~\" when `indicate-empty-lines' is non-nil, otherwise \"\".
-Can be set to either a constant string or a function that returns a string."
+Can be set to either a constant string or a function that returns a string.
+
+By default it will show the empty-line bitmap in the left fringe
+if `indicate-empty-lines' is non-nil, otherwise nothing.
+The default bitmap is the one that the `empty-line' logical fringe indicator
+maps to in `fringe-indicator-alist'.
+This is done by adding a 'display property to the string (see
+`topspace-default-empty-line-indicator' for more details).
+
+ You can alternatively show a string in the body of each top space line by
+having `topspace-empty-line-indicator' return a string without the 'display
+property added. If you do this you may be interested in also changing the
+string's face like so: (propertize indicator-string 'face 'fringe)."
:type '(choice 'string (function :tag "String function")))
(defun topspace-default-empty-line-indicator ()
- "Return \"~\" with face 'fringe if `indicate-empty-lines` non-nil else \"\"."
- (if indicate-empty-lines (propertize "~" 'face 'fringe) ""))
+ "Put the empty-line bitmap in fringe if `indicate-empty-lines' is non-nil.
+
+The bitmap used is the one that the `empty-line' logical fringe indicator
+maps to in `fringe-indicator-alist'."
+ (if indicate-empty-lines
+ (let ((bitmap (catch 'tag
+ (dolist (x fringe-indicator-alist)
+ (when (eq (car x) 'empty-line)
+ (throw 'tag (cdr x)))))))
+ (propertize " " 'display (list `left-fringe bitmap `fringe)))
+ ""))
(defcustom topspace-mode-line " T"
"Mode line lighter for Topspace.
- [elpa] externals/topspace 156dabbe05 070/181: Remove html typo in readme, (continued)
- [elpa] externals/topspace 156dabbe05 070/181: Remove html typo in readme, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 8493ed0687 087/181: Fix bug where topspace-mode doesn't work locally (#6), ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 97c69d912e 088/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 04da9d1b5a 064/181: Create FUNDING.yml, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 0d85f3a0b0 074/181: It works except theres an error on startup, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 42ee241730 065/181: Update FUNDING.yml, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 22b87d68cb 077/181: Create changelog.yml, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 96f86179ef 083/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 2329b63363 091/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 4455f47ed4 093/181: Reword docstrings, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace d0e7e89413 094/181: Put topspace-empty-line-indicator inside fringe (#9),
ELPA Syncer <=
- [elpa] externals/topspace 9d6f0ef459 099/181: Fix terminal bug and minor mouse scrolling bug, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 6d3b5e5cf7 103/181: Update README.md, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace df7cb1ce4f 107/181: Bump version: 0.1.2 → 0.2.0, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace edb0d582ae 108/181: Update Changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace c21ceb5e3a 109/181: Set back Unreleased as recent version in changelog, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace e3cd398678 112/181: Fix bug caused by #11 when scrolling with topspace disabled, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace cb9dbf5c0f 114/181: Start adding tests, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace af98947c27 115/181: Prevent "Beginning of buffer" error message (#12), ELPA Syncer, 2022/08/23
- [elpa] externals/topspace ba275f7c94 119/181: Fix off-by-one-line scroll bug at top of buffer introduced in #10, ELPA Syncer, 2022/08/23
- [elpa] externals/topspace 334cf13ab5 121/181: Internal optimization, ELPA Syncer, 2022/08/23