[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/telephone-line 8bc83573c3 061/195: Fix unicode separators
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/telephone-line 8bc83573c3 061/195: Fix unicode separators |
Date: |
Wed, 5 Jan 2022 02:59:27 -0500 (EST) |
branch: elpa/telephone-line
commit 8bc83573c36248923ecb5469404befffc3c2a799
Author: Daniel Bordak <dbordak@fastmail.fm>
Commit: Daniel Bordak <dbordak@fastmail.fm>
Fix unicode separators
Well, not entirely, but at least fix the issues introduced with the new
separators.
---
telephone-line-separators.el | 6 +++---
telephone-line-utils.el | 40 +++++++++++++++++++++-------------------
2 files changed, 24 insertions(+), 22 deletions(-)
diff --git a/telephone-line-separators.el b/telephone-line-separators.el
index 18909e0296..fc4b3d3245 100644
--- a/telephone-line-separators.el
+++ b/telephone-line-separators.el
@@ -43,15 +43,15 @@
(defvar telephone-line-abs-left
(telephone-line-separator "abs-left"
:axis-func (telephone-line-complement abs)
- :alt-char #xe0b2))
+ :alt-char #xe0b0))
(defvar telephone-line-abs-hollow-right
(telephone-line-subseparator "abs-hollow-right"
:axis-func #'abs
- :alt-char #xe0b2))
+ :alt-char #xe0b3))
(defvar telephone-line-abs-hollow-left
(telephone-line-subseparator "abs-hollow-left"
:axis-func (telephone-line-complement abs)
- :alt-char #xe0b2))
+ :alt-char #xe0b1))
(defvar telephone-line-cubed-right
(telephone-line-separator "cubed-right"
diff --git a/telephone-line-utils.el b/telephone-line-utils.el
index 473f472f49..f975900f33 100644
--- a/telephone-line-utils.el
+++ b/telephone-line-utils.el
@@ -188,26 +188,28 @@ color1 and color2."
(face-attribute arg :background)
arg))
+(defmethod telephone-line-separator-render-image ((obj
telephone-line-separator) foreground background)
+ (let ((hash-key (concat background "_" foreground)))
+ ;; Return cached image if we have it.
+ (or (gethash hash-key (oref obj image-cache))
+ (puthash hash-key
+ (telephone-line-propertize-image
+ (telephone-line--create-pbm-image
(telephone-line-separator-create-body obj)
+ background foreground))
+ (oref obj image-cache)))))
+
+(defmethod telephone-line-separator-render-unicode ((obj
telephone-line-separator) foreground background)
+ (list :propertize (char-to-string (oref obj alt-char))
+ 'face (list :foreground foreground
+ :background background
+ :inverse-video t)))
+
(defmethod telephone-line-separator-render ((obj telephone-line-separator)
foreground background)
- (telephone-line-separator--render obj
- (telephone-line-separator--arg-handler foreground)
- (telephone-line-separator--arg-handler background)))
-
-(defmethod telephone-line-separator--render ((obj telephone-line-separator)
foreground background)
- (if window-system
- (let ((hash-key (concat background "_" foreground)))
- ;; Return cached image if we have it.
- (or (gethash hash-key (oref obj image-cache))
- (puthash hash-key
- (telephone-line-propertize-image
- (telephone-line--create-pbm-image
(telephone-line-separator-create-body obj)
- background foreground))
- (oref obj image-cache))))
-
- (list :propertize (char-to-string (oref obj alt-char))
- 'face (list :foreground foreground
- :background background
- :inverse-video t))))
+ (let ((fg-color (telephone-line-separator--arg-handler foreground))
+ (bg-color (telephone-line-separator--arg-handler background)))
+ (if window-system
+ (telephone-line-separator-render-image obj fg-color bg-color)
+ (telephone-line-separator-render-unicode obj fg-color bg-color))))
(defmethod telephone-line-separator-clear-cache ((obj
telephone-line-separator))
(clrhash (oref obj image-cache)))
- [nongnu] elpa/telephone-line a84f75000c 017/195: Face hierarchy, (continued)
- [nongnu] elpa/telephone-line a84f75000c 017/195: Face hierarchy, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 6fd0211efe 045/195: Add GPL badge, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line b6dcd27331 025/195: Add install instructions, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 502285b6bc 077/195: Add support for xah-fly-keys, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 315054ffb4 068/195: Minor fixes, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 48f2894e95 046/195: Add initial support for multiple frames, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 1f2389212b 024/195: Remove -enable and -disable entirely, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line de93becc18 039/195: Merge pull request #12 from bjpbakker/fix/erc-segment, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 5ccd246d25 049/195: Documentation update, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line ae636f7ca2 041/195: Version bump, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 8bc83573c3 061/195: Fix unicode separators,
ELPA Syncer <=
- [nongnu] elpa/telephone-line 1b52832b44 054/195: Nameless indentation, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 676b57d819 081/195: Made subseparator colors customizeable, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 00600d46c9 042/195: Merge branch 'master' of github.com:dbordak/telephone-line, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 3bb5cee841 074/195: Update readme.org, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line f5a1d0cbd2 057/195: Move over to new OO separators, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line cac54930a1 115/195: Improve even heights., ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 105defac6e 100/195: Remove telephone-line-trim, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 0fec3265a0 118/195: Fix terminology before it's too late., ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line bf0e4394ec 104/195: Previous fix didn't account for hollow separators, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 2906d39401 116/195: Oops, don't want accidental rounding., ELPA Syncer, 2022/01/05