branch: elpa/telephone-line
commit dd5a939edd41c51d4860ed8076646127ed93c128
Author: Bart Bakker <[email protected]>
Commit: Bart Bakker <[email protected]>
Fix error in erc segment when erc is not loaded
Without package 'erc-track loaded `erc-modified-channels-object` is not
defined.
---
telephone-line-segments.el | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/telephone-line-segments.el b/telephone-line-segments.el
index b7b176ac1c..ebc6e71f19 100644
--- a/telephone-line-segments.el
+++ b/telephone-line-segments.el
@@ -79,8 +79,9 @@ mouse-3: Toggle minor modes"
'mouse-2 #'mode-line-widen))))
(telephone-line-defsegment* telephone-line-erc-modified-channels-segment
- (s-with erc-modified-channels-object
- s-trim (s-chop-suffix "]") (s-chop-prefix "[")))
+ (when (boundp 'erc-modified-channels-object)
+ (s-with erc-modified-channels-object
+ s-trim (s-chop-suffix "]") (s-chop-prefix "["))))
(eval-after-load 'evil
'(telephone-line-defsegment* telephone-line-evil-tag-segment