From 013424c62ac27cc96317012024bca802dd22c7fe Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 29 Sep 2021 17:19:49 -0500 Subject: Move the prompt to acdw-circe --- init.el | 13 +++---------- lisp/acdw-circe.el | 15 +++++++++++++++ 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/init.el b/init.el index f1419c1..20fb9f9 100644 --- a/init.el +++ b/init.el @@ -1051,7 +1051,8 @@ specific to most general, they are these: ((t (:inherit (modus-themes-slant)))))) (:bind "C-c C-p" #'circe-command-PART - "C-l" #'lui-track-jump-to-indicator) + "C-l" #'lui-track-jump-to-indicator + "" #'circe-chat@set-prompt) (:advise circe-command-PART :after #'circe-part@kill-buffer circe-command-QUIT :after #'circe-quit@kill-buffer @@ -1062,15 +1063,7 @@ specific to most general, they are these: #'enable-circe-color-nicks ;; #'enable-circe-display-images #'enable-circe-new-day-notifier - (defun circe-chat@set-prompt () - (lui-set-prompt - (concat - (propertize - (acdw-irc/margin-format (buffer-name) " " "> ") - 'face 'circe-prompt-face - 'read-only t - 'intangible t - 'cursor-intangible t)))))) + #'circe-chat@set-prompt)) (autoload 'circe-nick-color-reset "circe-color-nicks") (add-hook 'modus-themes-after-load-theme-hook diff --git a/lisp/acdw-circe.el b/lisp/acdw-circe.el index 69b10be..e85587b 100644 --- a/lisp/acdw-circe.el +++ b/lisp/acdw-circe.el @@ -17,6 +17,21 @@ (let ((short-url (0x0-shorten-uri (0x0--choose-server) url))) (circe-command-SAY short-url))) +;;; Hooks + +(defun circe-chat@set-prompt () + "Set the prompt to the buffer name, shortening it." + (interactive) ; set interactive to unfuck the prompt when need be + (lui-set-prompt + (propertize + (concat + (acdw-irc/margin-format (buffer-name) "" ">") + " ") + 'face 'circe-prompt-face + 'read-only t + 'intangible t + 'cursor-intangible t))) + ;;; Advices (defun circe-part@kill-buffer (&rest _) -- cgit 1.4.1-21-gabe81