summaryrefslogtreecommitdiffstats
path: root/.emacs.d/lisp/bandali-erc.el
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2023-04-21 15:43:36 -0400
committerAmin Bandali <bandali@gnu.org>2023-04-21 15:43:36 -0400
commit535c73d96e2cf9adbd2dfa31d87f4b7960359926 (patch)
tree00881571a6768194e28a000e551bd25093824012 /.emacs.d/lisp/bandali-erc.el
parente5cb5c0eb43b74241217b258b23fac56e9c0e258 (diff)
downloadconfigs-535c73d96e2cf9adbd2dfa31d87f4b7960359926.tar.gz
configs-535c73d96e2cf9adbd2dfa31d87f4b7960359926.tar.xz
configs-535c73d96e2cf9adbd2dfa31d87f4b7960359926.zip
* .emacs.d/lisp/bandali-erc.el: Small tweaks/fixes.
Diffstat (limited to '')
-rw-r--r--.emacs.d/lisp/bandali-erc.el65
1 files changed, 41 insertions, 24 deletions
diff --git a/.emacs.d/lisp/bandali-erc.el b/.emacs.d/lisp/bandali-erc.el
index a365ac7..8cd1457 100644
--- a/.emacs.d/lisp/bandali-erc.el
+++ b/.emacs.d/lisp/bandali-erc.el
@@ -63,8 +63,6 @@
(add-to-list 'erc-modules 'notifications)
(add-to-list 'erc-modules 'smiley))
(add-to-list 'erc-modules 'spelling)
- (declare-function erc-update-modules "erc")
- (erc-update-modules)
;; (set-face-attribute
;; 'erc-nick-default-face nil
@@ -116,13 +114,12 @@
erc-save-buffer-on-part nil
erc-save-queries-on-quit nil)
- ;; erc-match
- (setq
- erc-pal-highlight-type 'nick
- erc-pals
- '("bremner" "^gopar" "^iank" "quidam" "^rwp" "sudoman"
- "technomancy" "thomzane"))
(with-eval-after-load 'erc-match
+ (setq
+ erc-pal-highlight-type 'nick
+ erc-pals
+ '("bremner" "^gopar" "^iank" "quidam" "^rwp" "sudoman"
+ "technomancy" "thomzane"))
(set-face-attribute
'erc-pal-face nil
:foreground 'unspecified
@@ -131,13 +128,23 @@
;; :background (face-attribute 'font-lock-string-face :background)
:background "#ffffdf"))
- ;; erc-pcomplete
- (setq erc-pcomplete-nick-postfix ",")
-
- ;; erc-stamp
- (setq erc-timestamp-only-if-changed-flag nil
- erc-timestamp-format "%T "
- erc-insert-timestamp-function 'erc-insert-timestamp-left)
+ (with-eval-after-load 'erc-pcomplete
+ (setq erc-pcomplete-nick-postfix ",")
+ ;; for matterircd nick (username) completions
+ ;; (advice-add
+ ;; #'pcomplete-erc-nicks
+ ;; :around
+ ;; (lambda (orig-fun &rest args)
+ ;; (let ((nicks (apply orig-fun args)))
+ ;; (if (string-match-p "matterircd" (symbol-name (erc-network)))
+ ;; (mapcar (lambda (nick) (concat "@" nick)) nicks)
+ ;; nicks))))
+ )
+
+ (with-eval-after-load 'erc-stamp
+ (setq erc-timestamp-only-if-changed-flag nil
+ erc-timestamp-format "%T "
+ erc-insert-timestamp-function 'erc-insert-timestamp-left))
(with-eval-after-load 'erc-match
(set-face-attribute
'erc-timestamp-face nil
@@ -145,15 +152,18 @@
:weight 'unspecified
:background 'unspecified))
- ;; erc-track
- (setq
- erc-track-enable-keybindings nil
- erc-track-exclude-types '("JOIN" "MODE" "NICK" "PART" "QUIT"
- "324" "329" "332" "333" "353" "477")
- erc-track-position-in-mode-line t
- erc-track-priority-faces-only 'all
- erc-track-shorten-function nil
- erc-track-showcount t)
+ (with-eval-after-load 'erc-track
+ (setq
+ erc-track-enable-keybindings nil
+ erc-track-exclude-types '("JOIN" "MODE" "NICK" "PART" "QUIT"
+ "324" "329" "332" "333" "353" "477")
+ erc-track-position-in-mode-line t
+ erc-track-priority-faces-only 'all
+ erc-track-shorten-function nil
+ erc-track-showcount t))
+
+ (declare-function erc-update-modules "erc")
+ (erc-update-modules)
;; key bindings
(global-set-key (kbd "C-c w e") #'erc-switch-to-buffer-other-window)
@@ -179,5 +189,12 @@
(erc-tls :server "na.tilde.chat" :port 6697
:client-certificate t)))
+;; (global-set-key
+;; (kbd "C-c e c")
+;; (lambda ()
+;; (interactive)
+;; (erc :server "localhost" :port 6667
+;; :id 'matterircd-canonical)))
+
(provide 'bandali-erc)
;;; bandali-erc.el ends here