[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/telephone-line 105defac6e 100/195: Remove telephone-line-t
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/telephone-line 105defac6e 100/195: Remove telephone-line-trim |
Date: |
Wed, 5 Jan 2022 02:59:30 -0500 (EST) |
branch: elpa/telephone-line
commit 105defac6e96eb143cf5fe10c8a2e34fa9011607
Author: Daniel Bordak <dbordak@fastmail.fm>
Commit: Daniel Bordak <dbordak@fastmail.fm>
Remove telephone-line-trim
This was so rarely useful over built-in trimming that it should probably
just be handled on a case-by-case basis. I don't even remember what segments
might have this issue.
---
telephone-line-utils.el | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/telephone-line-utils.el b/telephone-line-utils.el
index 3965e8721a..0ad4051fdf 100644
--- a/telephone-line-utils.el
+++ b/telephone-line-utils.el
@@ -24,6 +24,7 @@
(require 'color)
(require 'eieio)
(require 'seq)
+(require 'subr-x)
(defcustom telephone-line-height nil
"Override the mode-line height."
@@ -40,15 +41,6 @@
:type 'boolean
:group 'telephone-line-evil)
-(defun telephone-line-trim (string)
- "Ad-hoc string trim which removes spaces and up to the first brace from
STRING."
- (let ((s (if (string-match "[\])]?[ ]*\\'" string)
- (replace-match "" t t string)
- string)))
- (if (string-match "\\`[ ]*[\[(]?" s)
- (replace-match "" t t s)
- s)))
-
(defun telephone-line-create-axis (length)
"Create an axis of length LENGTH.
For odd lengths, this is a sequence from -floor(LENGTH/2) to
@@ -254,7 +246,7 @@ Segment is not precompiled."
(defun telephone-line-raw (str &optional compiled)
"Conditionally render STR as mode-line data, or just verify output if not
COMPILED.
Return nil for blank/empty strings."
- (let ((trimmed-str (telephone-line-trim (format-mode-line str))))
+ (let ((trimmed-str (string-trim (format-mode-line str))))
(unless (seq-empty-p trimmed-str)
(if compiled
(replace-regexp-in-string "%" "%%" trimmed-str)
- [nongnu] elpa/telephone-line de93becc18 039/195: Merge pull request #12 from bjpbakker/fix/erc-segment, (continued)
- [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, 2022/01/05
- [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 <=
- [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
- [nongnu] elpa/telephone-line 909c1779e4 089/195: Fixed rainbow face examples, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line aa2c6840c9 107/195: Add separator gallery, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 09ff89a090 110/195: Add alias for modal colorsym, rename tl-evil-face to tl-modal-face, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 541c7d80d9 103/195: Corrected axis algorithm, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 0715ee7d15 064/195: Fix Readme formatting, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 5c47442844 083/195: Update readme + screenshots, ELPA Syncer, 2022/01/05
- [nongnu] elpa/telephone-line 30225c9778 069/195: Fix Emacs 25, oops, ELPA Syncer, 2022/01/05