summaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
m---------lisp/alloy-mode0
m---------lisp/amx0
-rw-r--r--lisp/bandali-erc.el109
-rw-r--r--lisp/bandali-gnus.el6
-rw-r--r--lisp/bandali-ido.el77
-rw-r--r--lisp/bandali-multi-term.el81
-rw-r--r--lisp/bandali-projectile.el70
-rw-r--r--lisp/bandali-theme.el28
-rw-r--r--lisp/bandali-utils.el20
m---------lisp/boxquote0
m---------lisp/hl-todo0
m---------lisp/page-break-lines0
m---------lisp/s0
m---------lisp/scpaste0
14 files changed, 110 insertions, 281 deletions
diff --git a/lisp/alloy-mode b/lisp/alloy-mode
new file mode 160000
+Subproject 0d05bdd10c77ec04c3d61eccf67e68c08284951
diff --git a/lisp/amx b/lisp/amx
new file mode 160000
+Subproject ccfc92c600df681df5e8b5fecec328c462ceb71
diff --git a/lisp/bandali-erc.el b/lisp/bandali-erc.el
index 754f7ee..c76bd1e 100644
--- a/lisp/bandali-erc.el
+++ b/lisp/bandali-erc.el
@@ -24,6 +24,9 @@
;;; Code:
+(defvar b/erc-detach-on-kill t
+ "Whether killing a channel should send a DETACH command (for ZNC).")
+
(with-eval-after-load 'erc
(make-directory (b/var "erc/dcc/") t)
(csetq
@@ -36,6 +39,7 @@
erc-lurker-hide-list '("JOIN" "PART" "QUIT")
erc-nick "bandali"
erc-prompt "erc>"
+ erc-prompt-for-password nil
erc-rename-buffers t
erc-server-reconnect-attempts 5
erc-server-reconnect-timeout 3)
@@ -62,30 +66,41 @@
(erc-update-modules)
;; erc-fill
- (csetq
- erc-fill-column 77
- erc-fill-function 'erc-fill-static
- erc-fill-static-center 18)
+ ;; (csetq
+ ;; erc-fill-column 77
+ ;; erc-fill-function 'erc-fill-variable
+ ;; erc-fill-static-center 18)
+ ;; to disable:
+ ;; (erc-fill-mode -1)
;; erc-match
- ;; (csetq
- ;; erc-pal-highlight-type 'message
- ;; erc-pals
- ;; '("aindilis" "blackbeard" "bremner" "brettgilio" "civodul" "dto"
- ;; "ggoes" "jrasata" "jxself" "mplsCorwin" "quiliro" "rindolf" "rwp"
- ;; "sachac" "technomancy"))
- ;; (with-eval-after-load 'erc-match
- ;; (set-face-attribute
- ;; 'erc-pal-face nil
- ;; :foreground 'unspecified
- ;; :weight 'unspecified
- ;; ;; :inherit 'font-lock-string-face
- ;; ;; :background (face-attribute 'font-lock-string-face :background)
- ;; :background "#ffffed"))
+ (csetq
+ erc-pal-highlight-type 'nick
+ erc-pals '("aindilis" "blackbeard" "brettgilio" "civodul" "dto"
+ "ggoes" "jrasata" "mplsCorwin" "rwp" "technomancy"))
+ (with-eval-after-load 'erc-match
+ (set-face-attribute
+ 'erc-pal-face nil
+ :foreground 'unspecified
+ :weight 'unspecified
+ ;; :inherit 'font-lock-string-face
+ ;; :background (face-attribute 'font-lock-string-face :background)
+ :background "#ffffed"))
;; erc-pcomplete
(csetq erc-pcomplete-nick-postfix ", ")
+ ;; erc-stamp
+ (csetq 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
+ :foreground "#aaaaaa"
+ :weight 'unspecified
+ :background 'unspecified))
+
;; erc-track
(csetq
erc-track-enable-keybindings nil
@@ -98,23 +113,49 @@
;; key bindings
(global-set-key (kbd "C-c w e") #'erc-switch-to-buffer-other-window)
- (define-key erc-mode-map (kbd "M-a") #'erc-track-switch-buffer))
-
-(with-eval-after-load 'znc
- (let ((pwd (let ((auth (auth-source-search :host "znca")))
- (cond
- ((null auth) (error "Couldn't find znca's authinfo"))
- (t (funcall (plist-get (car auth) :secret)))))))
- (csetq znc-servers
- `(("znc.emacsconf.org" 6697 t
- ((freenode "bandali/freenode" ,pwd)))
- ("znc.emacsconf.org" 6697 t
- ((oftc "bandali/oftc" ,pwd)))
- ("znc.emacsconf.org" 6697 t
- ((tildechat "bandali/tildechat" ,pwd)))))))
+ (define-key erc-mode-map (kbd "M-a") #'erc-track-switch-buffer)
+
+ ;; hooks
+ (defun b/erc-detach-or-kill-channel ()
+ (if b/erc-detach-on-kill
+ (when (erc-server-process-alive)
+ (let ((tgt (erc-default-target)))
+ (erc-server-send (format "DETACH %s" tgt) nil tgt)))
+ (erc-kill-channel)))
+ (add-hook 'erc-kill-channel-hook #'b/erc-detach-or-kill-channel)
+ (remove-hook 'erc-kill-channel-hook #'erc-kill-channel))
+
;; global key bindings
-(global-set-key (kbd "C-c a e e") #'znc-erc)
-(global-set-key (kbd "C-c a e a") #'znc-all)
+(global-set-key
+ (kbd "C-c a e f")
+ (lambda ()
+ (interactive)
+ (let* ((auth (auth-source-search :host "znca"))
+ (p (if (null auth)
+ (error "Couldn't find znca's authinfo")
+ (funcall (plist-get (car auth) :secret)))))
+ (erc-tls :server "znc.emacsconf.org" :port 6697
+ :password (concat "bandali/freenode:" p)))))
+(global-set-key
+ (kbd "C-c a e o")
+ (lambda ()
+ (interactive)
+ (let* ((auth (auth-source-search :host "znca"))
+ (p (if (null auth)
+ (error "Couldn't find znca's authinfo")
+ (funcall (plist-get (car auth) :secret)))))
+ (erc-tls :server "znc.emacsconf.org" :port 6697
+ :password (concat "bandali/oftc:" p)))))
+(global-set-key
+ (kbd "C-c a e t")
+ (lambda ()
+ (interactive)
+ (let* ((auth (auth-source-search :host "znca"))
+ (p (if (null auth)
+ (error "Couldn't find znca's authinfo")
+ (funcall (plist-get (car auth) :secret)))))
+ (erc-tls :server "znc.emacsconf.org" :port 6697
+ :password (concat "bandali/tildechat:" p)))))
(provide 'bandali-erc)
;;; bandali-erc.el ends here
diff --git a/lisp/bandali-gnus.el b/lisp/bandali-gnus.el
index 4aa41ab..39c9af8 100644
--- a/lisp/bandali-gnus.el
+++ b/lisp/bandali-gnus.el
@@ -385,9 +385,9 @@
https://shemshak.org/~bandali")
(defvar b/uwaterloo-signature "Amin Bandali, MMath
https://bndl.org")
- (defvar b/csc-signature "Amin Bandali | https://bndl.org
-System Administrator, Systems Committee
-Computer Science Club, University of Waterloo")
+ (defvar b/csc-signature "Amin Bandali (https://bndl.org)
+Systems Committee <syscom@csclub.uwaterloo.ca>
+Computer Science Club of the University of Waterloo")
(defvar b/sfl-signature "Amin Bandali
Free Software Consultant
Savoir-faire Linux
diff --git a/lisp/bandali-ido.el b/lisp/bandali-ido.el
deleted file mode 100644
index 3f1769a..0000000
--- a/lisp/bandali-ido.el
+++ /dev/null
@@ -1,77 +0,0 @@
-;;; bandali-ido.el --- bandali's Ido setup -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2018-2020 Amin Bandali
-
-;; Author: Amin Bandali <bandali@gnu.org>
-;; Keywords: convenience, matching
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; My (currently unused) Ido setup.
-
-;;; Code:
-
-(use-package ido
- :demand
- :bind
- (:map ido-common-completion-map
- ([escape] . minibuffer-keyboard-quit)
- ("DEL" . b/ido-backspace))
- :config
- (require 'delsel)
- (defun b/ido-backspace ()
- "Forward to `backward-delete-char'. On error (read-only), quit."
- (interactive)
- (condition-case nil
- (backward-delete-char 1)
- (error
- (minibuffer-keyboard-quit))))
- (ido-mode 1)
- (ido-everywhere 1)
- :custom
- (ido-enable-flex-matching t)
- ;; (ido-enable-regexp t)
- ;; (ido-enable-prefix t)
- (ido-max-window-height 10)
- (ido-use-virtual-buffers t))
-
-(use-package ido-vertical-mode
- :defer 0.3
- :config
- (ido-vertical-mode 1)
- :custom
- (ido-vertical-define-keys 'C-n-C-p-up-and-down)
- (ido-vertical-show-count t))
-
-(use-package ido-completing-read+
- :defer 0.3
- :after ido
- :config
- (ido-ubiquitous-mode 1))
-
-(use-package crm-custom
- :defer 0.3
- :after crm
- :config
- (crm-custom-mode 1))
-
-(use-package ido-at-point
- :defer 0.3
- :config
- (ido-at-point-mode 1))
-
-(provide 'bandali-ido)
-;;; bandali-ido.el ends here
diff --git a/lisp/bandali-multi-term.el b/lisp/bandali-multi-term.el
deleted file mode 100644
index 1e02e36..0000000
--- a/lisp/bandali-multi-term.el
+++ /dev/null
@@ -1,81 +0,0 @@
-;;; bandali-multi-term.el --- bandali's multi-term setup -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2020 Amin Bandali
-
-;; Author: Amin Bandali <bandali@gnu.org>
-;; Keywords: terminals
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; My multi-term configuration.
-
-;;; Code:
-
-(use-package multi-term
- :disabled
- :defer 0.6
- :bind (("C-c a s m m" . multi-term)
- ("C-c a s m d" . multi-term-dedicated-toggle)
- ("C-c a s m p" . multi-term-prev)
- ("C-c a s m n" . multi-term-next)
- :map term-mode-map
- ("C-c C-j" . term-char-mode))
- :config
- (setq multi-term-program "screen"
- multi-term-program-switches (concat "-c"
- (getenv "XDG_CONFIG_HOME")
- "/screen/screenrc")
- ;; TODO: add separate bindings for connecting to existing
- ;; session vs. always creating a new one
- multi-term-dedicated-select-after-open-p t
- multi-term-dedicated-window-height 20
- multi-term-dedicated-max-window-height 30
- term-bind-key-alist
- '(("C-c C-c" . term-interrupt-subjob)
- ("C-c C-e" . term-send-esc)
- ("C-c C-j" . term-line-mode)
- ("C-k" . kill-line)
- ;; ("C-y" . term-paste)
- ("C-y" . term-send-raw)
- ("M-f" . term-send-forward-word)
- ("M-b" . term-send-backward-word)
- ("M-p" . term-send-up)
- ("M-n" . term-send-down)
- ("M-j" . term-send-raw-meta)
- ("M-y" . term-send-raw-meta)
- ("M-/" . term-send-raw-meta)
- ("M-0" . term-send-raw-meta)
- ("M-1" . term-send-raw-meta)
- ("M-2" . term-send-raw-meta)
- ("M-3" . term-send-raw-meta)
- ("M-4" . term-send-raw-meta)
- ("M-5" . term-send-raw-meta)
- ("M-6" . term-send-raw-meta)
- ("M-7" . term-send-raw-meta)
- ("M-8" . term-send-raw-meta)
- ("M-9" . term-send-raw-meta)
- ("<C-backspace>" . term-send-backward-kill-word)
- ("<M-DEL>" . term-send-backward-kill-word)
- ("M-d" . term-send-delete-word)
- ("M-," . term-send-raw)
- ("M-." . comint-dynamic-complete))
- term-unbind-key-alist
- '("C-z" "C-x" "C-c" "C-h"
- ;; "C-y"
- "<ESC>")))
-
-(provide 'bandali-multi-term)
-;;; bandali-multi-term.el ends here
diff --git a/lisp/bandali-projectile.el b/lisp/bandali-projectile.el
deleted file mode 100644
index dbef93e..0000000
--- a/lisp/bandali-projectile.el
+++ /dev/null
@@ -1,70 +0,0 @@
-;;; bandali-projectile.el --- bandali's Projectile setup -*- lexical-binding: t; -*-
-
-;; Copyright (C) 2020 Amin Bandali
-
-;; Author: Amin Bandali <bandali@gnu.org>
-;; Keywords: convenience
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;; My Projectile setup.
-
-;;; Code:
-
-(use-package projectile
- :disabled
- :defer 0.5
- :bind-keymap ("C-c p" . projectile-command-map)
- :config
- (make-directory (b/var "projectile/") t)
- (projectile-mode)
-
- (defun b/projectile-mode-line-fun ()
- "Report project name and type in the modeline."
- (let ((project-name (projectile-project-name))
- (project-type (projectile-project-type)))
- (format "%s%s"
- projectile-mode-line-prefix
- (if project-type
- (format ":%s" project-type)
- ""))))
- (setq projectile-mode-line-function 'b/projectile-mode-line-fun)
-
- (defun my-projectile-invalidate-cache (&rest _args)
- ;; ignore the args to `magit-checkout'
- (projectile-invalidate-cache nil))
-
- (eval-after-load 'magit-branch
- '(progn
- (advice-add 'magit-checkout
- :after #'my-projectile-invalidate-cache)
- (advice-add 'magit-branch-and-checkout
- :after #'my-projectile-invalidate-cache)))
-
- (when (featurep 'which-key)
- (which-key-add-key-based-replacements
- "C-c p" "projectile"
- "C-c p s" "projectile/search"
- "C-c p x" "projectile/execute"
- "C-c p 4" "projectile/other-window"))
- :custom
- (projectile-cache-file (b/var "projectile/cache.el"))
- (projectile-completion-system 'ivy)
- (projectile-known-projects-file (b/var "projectile/known-projects.el"))
- (projectile-mode-line-prefix " proj"))
-
-(provide 'bandali-projectile)
-;;; bandali-projectile.el ends here
diff --git a/lisp/bandali-theme.el b/lisp/bandali-theme.el
index 7706bcc..13929cb 100644
--- a/lisp/bandali-theme.el
+++ b/lisp/bandali-theme.el
@@ -24,18 +24,20 @@
;;; Code:
-(require 'refinery-theme)
-(load-theme 'refinery t)
+(with-eval-after-load 'package
+ (require 'refinery-theme)
+ (load-theme 'refinery t))
-(require 'smart-mode-line)
-;; thanks, but no thanks; don't make fixed-width fills.
-(defun sml/fill-for-buffer-identification nil "")
-(setq sml/theme 'respectful)
-(sml/setup)
-(smart-mode-line-enable)
+;; (require 'smart-mode-line)
+;; ;; thanks, but no thanks; don't make fixed-width fills.
+;; (defun sml/fill-for-buffer-identification nil "")
+;; (setq sml/theme 'respectful)
+;; (let ((sml/no-confirm-load-theme t))
+;; (sml/setup)
+;; (smart-mode-line-enable))
-(require 'minions)
-(minions-mode)
+;; (require 'minions)
+;; (minions-mode)
(defvar b/org-mode-font-lock-keywords
'(("[ \t]*\\(#\\+\\(BEGIN\\|END\\|begin\\|end\\)_\\(\\S-+\\)\\)[ \t]*\\([^\n:]*\\)"
@@ -54,7 +56,8 @@
(mapc #'disable-theme custom-enabled-themes)
(load-theme 'refinery t)
(when (featurep 'smart-mode-line)
- (sml/apply-theme 'bandali))
+ (let ((sml/no-confirm-load-theme t))
+ (sml/apply-theme 'respectful)))
(font-lock-remove-keywords
'org-mode b/org-mode-font-lock-keywords)
(when (featurep 'erc-hl-nicks)
@@ -68,7 +71,8 @@
(mapc #'disable-theme custom-enabled-themes)
(load-theme 'refinery-dark t)
(when (featurep 'smart-mode-line)
- (sml/apply-theme 'dark))
+ (let ((sml/no-confirm-load-theme t))
+ (sml/apply-theme 'dark)))
(font-lock-add-keywords
'org-mode b/org-mode-font-lock-keywords t)
(when (featurep 'erc-hl-nicks)
diff --git a/lisp/bandali-utils.el b/lisp/bandali-utils.el
index 95c2878..6669b2a 100644
--- a/lisp/bandali-utils.el
+++ b/lisp/bandali-utils.el
@@ -24,10 +24,22 @@
;;; Code:
-(defmacro b/setq-every (value &rest vars)
- "Set all the variables from VARS to value VALUE."
- (declare (indent defun) (debug t))
- `(progn ,@(mapcar (lambda (x) (list 'setq x value)) vars)))
+(require 'cl-lib)
+
+(defmacro csetq (&rest args)
+ "Set the value of user option VAR to VALUE.
+
+More generally, you can use multiple variables and values, as in
+ (csetq VAR VALUE VAR VALUE...)
+This sets each user option VAR's value to the corresponding VALUE.
+
+\(fn [VAR VALUE]...)"
+ (declare (debug setq))
+ `(progn
+ ,@(cl-loop for (var value) on args by 'cddr
+ collect
+ `(funcall (or (get ',var 'custom-set) #'set-default)
+ ',var ,value))))
(defun b/start-process (program &rest args)
"Same as `start-process', but doesn't bother about name and buffer."
diff --git a/lisp/boxquote b/lisp/boxquote
new file mode 160000
+Subproject 7e47e0e2853bc1215739b2e28f260e9eed93b2c
diff --git a/lisp/hl-todo b/lisp/hl-todo
new file mode 160000
+Subproject 0598b98f63b623c1778cbd2e2f60b774b7a311b
diff --git a/lisp/page-break-lines b/lisp/page-break-lines
new file mode 160000
+Subproject f8c4cd7fc67638ae4113551dcffdf87fcd252d9
diff --git a/lisp/s b/lisp/s
new file mode 160000
+Subproject 43ba8b563bee3426cead0e6d4ddc09398e1a349
diff --git a/lisp/scpaste b/lisp/scpaste
new file mode 160000
+Subproject cd4fa0aafecd839736e0b6cba68b4fc4d704547