summary refs log tree commit diff stats
path: root/lisp/acdw-erc.el
diff options
context:
space:
mode:
authorCase Duckworth2021-07-02 21:45:37 -0500
committerCase Duckworth2021-07-02 21:45:37 -0500
commitb66f5ec1d87eb036b579ecd400fe505afb4a0f9b (patch)
treee6c43bcc19a0842bc1aec2b26c20d5b70cb4fbe4 /lisp/acdw-erc.el
parentMerge branch 'main' of https://tildegit.org/acdw/emacs (diff)
downloademacs-b66f5ec1d87eb036b579ecd400fe505afb4a0f9b.tar.gz
emacs-b66f5ec1d87eb036b579ecd400fe505afb4a0f9b.zip
Modify erc config
Diffstat (limited to 'lisp/acdw-erc.el')
-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