diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/+circe.el | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/lisp/+circe.el b/lisp/+circe.el index 9078907..501bd21 100644 --- a/lisp/+circe.el +++ b/lisp/+circe.el | |||
@@ -66,9 +66,21 @@ message the current topic." | |||
66 | 66 | ||
67 | ;;; Formatting messages | 67 | ;;; Formatting messages |
68 | 68 | ||
69 | (defun +circe-format-meta (string) | 69 | (defun +circe-format-meta (string &optional no-nick) |
70 | "Return a format string for `lui-format' for metadata messages." | 70 | "Return a format string for `lui-format' for metadata messages. |
71 | (format "{nick:%1$d.%1$ds} *** %s" (- +circe-left-margin 3) string)) | 71 | Include nick unless NO-NICK is non-nil. If NO-NICK is a string, |
72 | replace {nick} in the string with {NO-NICK}." | ||
73 | (cond | ||
74 | ((stringp no-nick) | ||
75 | (format "{%1$s:%2$d.%2$ds} *** %3$s" | ||
76 | no-nick (- +circe-left-margin 3) string)) | ||
77 | (no-nick | ||
78 | (format (format "%%%ds *** %s" (- +circe-left-margin 3) string) " ")) | ||
79 | (t | ||
80 | (format "{nick:%1$d.%1$ds} *** %s" (- +circe-left-margin 3) string)))) | ||
81 | |||
82 | (defun +circe-format-meta* (string) | ||
83 | "Return a format string for `lui-format' for metadata messages, /without/ ") | ||
72 | 84 | ||
73 | (defmacro +lui-make-formatting-list-rx (char) | 85 | (defmacro +lui-make-formatting-list-rx (char) |
74 | "Make a formatting regex for CHAR delimiters. | 86 | "Make a formatting regex for CHAR delimiters. |