[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/telephone-line 315054ffb4 068/195: Minor fixes
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/telephone-line 315054ffb4 068/195: Minor fixes |
Date: |
Wed, 5 Jan 2022 02:59:27 -0500 (EST) |
branch: elpa/telephone-line
commit 315054ffb49b4f3ba3d604943122d6514ea7b060
Author: Daniel Bordak <dbordak@fastmail.fm>
Commit: Daniel Bordak <dbordak@fastmail.fm>
Minor fixes
---
telephone-line-utils.el | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/telephone-line-utils.el b/telephone-line-utils.el
index c95c2b7318..5df118320c 100644
--- a/telephone-line-utils.el
+++ b/telephone-line-utils.el
@@ -42,10 +42,10 @@
(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)
+ (let ((s (if (string-match "[\])]?[ ]*\\'" string)
(replace-match "" t t string)
string)))
- (if (string-match "\\`[ ]*[\[(]" s)
+ (if (string-match "\\`[ ]*[\[(]?" s)
(replace-match "" t t s)
s)))
@@ -152,16 +152,16 @@ color1 and color2."
(alt-char :initarg :alt-char)
(image-cache :initform (make-hash-table :test 'equal :size 10))))
-(defmethod telephone-line-separator-height ((obj telephone-line-separator))
+(cl-defmethod telephone-line-separator-height ((obj telephone-line-separator))
(or telephone-line-height (frame-char-height)))
-(defmethod telephone-line-separator-width ((obj telephone-line-separator))
+(cl-defmethod telephone-line-separator-width ((obj telephone-line-separator))
(or (oref obj forced-width) (ceiling (telephone-line-separator-height obj)
2)))
(defclass telephone-line-subseparator (telephone-line-separator)
((pattern-func :initarg :pattern-func :initform
#'telephone-line-row-pattern-hollow)))
-(defmethod telephone-line-separator-create-body ((obj
telephone-line-separator))
+(cl-defmethod telephone-line-separator-create-body ((obj
telephone-line-separator))
"Create a bytestring of a PBM image body of dimensions WIDTH and HEIGHT, and
shape created from AXIS-FUNC and PATTERN-FUNC."
(let* ((height (telephone-line-separator-height obj))
(width (telephone-line-separator-width obj))
@@ -184,19 +184,19 @@ color1 and color2."
(append left-padding row right-padding))
body)))
-(defmethod telephone-line-separator-create-body ((obj
telephone-line-subseparator))
+(cl-defmethod telephone-line-separator-create-body ((obj
telephone-line-subseparator))
(telephone-line--pad-body (call-next-method)
(+ (ceiling (telephone-line-separator-width obj)
(frame-char-width))
telephone-line-separator-extra-padding)))
-(defmethod telephone-line-separator--arg-handler (arg) :static
+(cl-defmethod telephone-line-separator--arg-handler (arg) :static
"Translate ARG into an appropriate color for a separator."
(if (facep arg)
(face-attribute arg :background)
arg))
-(defmethod telephone-line-separator-render-image ((obj
telephone-line-separator) foreground background)
+(cl-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))
@@ -206,20 +206,20 @@ color1 and color2."
background foreground))
(oref obj image-cache)))))
-(defmethod telephone-line-separator-render-unicode ((obj
telephone-line-separator) foreground background)
+(cl-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)
+(cl-defmethod telephone-line-separator-render ((obj telephone-line-separator)
foreground background)
(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))
+(cl-defmethod telephone-line-separator-clear-cache ((obj
telephone-line-separator))
(clrhash (oref obj image-cache)))
:autoload
- [nongnu] branch elpa/telephone-line created (now ff526441a2), ELPA Syncer, 2022/01/05
- [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 <=
- [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, 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