summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw-erc.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/lisp/acdw-erc.el b/lisp/acdw-erc.el index 8cf9734..6038f5a 100644 --- a/lisp/acdw-erc.el +++ b/lisp/acdw-erc.el
@@ -87,19 +87,20 @@ If USE-TLS is non-nil, use TLS."
87 "The prompt to show for ERC." 87 "The prompt to show for ERC."
88 ;; Rewrite s-truncate to avoid dependency. 88 ;; Rewrite s-truncate to avoid dependency.
89 (let ((name (buffer-name)) 89 (let ((name (buffer-name))
90 (ellipsis "...") 90 (ellipsis "~")
91 (len erc-fill-static-center)) 91 (len erc-fill-static-center))
92 (if (and len (> (length name) (- len 2))) 92 (if (and len (> (length name) (- len 2)))
93 (format "%s%s>" 93 (format "%s%s>"
94 (substring name 0 (- len 2 (length ellipsis))) 94 (substring name 0 (- len 2 (length ellipsis)))
95 ellipsis) 95 ellipsis)
96 (format "%s%s>" (let ((ss) ; Rewrite s-repeat to avoid dependency. 96 (format "%s%s>"
97 (num (- len 2 (length name)))) 97 name
98 (while (> num 0) 98 (let ((ss) ; Rewrite s-repeat to avoid dependency.
99 (setq ss (cons " " ss)) 99 (num (- len 2 (length name))))
100 (setq num (1- num))) 100 (while (> num 0)
101 (apply #'concat ss)) 101 (setq ss (cons " " ss))
102 name)))) 102 (setq num (1- num)))
103 (apply #'concat ss))))))
103 104
104(provide 'acdw-erc) 105(provide 'acdw-erc)
105;;; acdw-erc.el ends here 106;;; acdw-erc.el ends here