Compare commits

...

2 commits

Author SHA1 Message Date
91f0b224e1 Add a formatter for notices 2023-12-12 11:19:20 -08:00
7a2a4523aa Add GitLab CI configuration 2020-05-13 22:52:59 -07:00
2 changed files with 39 additions and 0 deletions

29
.gitlab-ci.yml Normal file
View file

@ -0,0 +1,29 @@
image: silex/emacs:26.3-alpine-dev
stages:
- package
- deploy
package:
stage: package
before_script:
- rm -rf public/
- mkdir public/
script: >
emacs --batch --load package --load package-x --funcall package-initialize
--eval "(let ((package-archive-upload-base \"public/\"))
(package-upload-file \"circe-serenity.el\"))"
artifacts:
paths:
- public/
pages:
stage: deploy
only:
- master
dependencies:
- package
script: echo "Done"
artifacts:
paths:
- public

View file

@ -202,6 +202,16 @@ passed on to `lui-format'."
(circe-serenity--define-formatter 'circe-serenity-server-nick-regain-formatter (circe-serenity--define-formatter 'circe-serenity-server-nick-regain-formatter
'circe-format-server-nick-regain) 'circe-format-server-nick-regain)
(defun circe-serenity-notice-formatter (&rest keywords)
"Format a notice.
KEYWORDS should be a plist with at least a :nick and :body key."
(propertize
(lui-format
(format "{intro:%ds} -{nick}- {body}" circe-serenity-longest-nick)
(plist-put keywords :intro "***"))
'wrap-prefix (circe-serenity--fill-string)))
(circe-serenity--define-formatter 'circe-serenity-notice-formatter 'circe-format-notice)
;;;###autoload ;;;###autoload
(defun enable-circe-serenity () (defun enable-circe-serenity ()
"Enable Serenity for Circe." "Enable Serenity for Circe."