config

Personal configuration.
git clone git://code.dwrz.net/config
Log | Files | Refs

commit eba5176827c2a8543dd8f3bc4df6a95f05ccaf02
parent 30d71a09562f820118a0e3c75d05a14bc758d696
Author: dwrz <dwrz@dwrz.net>
Date:   Sat,  2 Sep 2023 13:25:40 +0000

Update emacs init

Diffstat:
Memacs/init.el | 94++++++++++++++++++++++++++++++++++++++-----------------------------------------
1 file changed, 45 insertions(+), 49 deletions(-)

diff --git a/emacs/init.el b/emacs/init.el @@ -49,7 +49,7 @@ (when buffer-file-name (let ((filename (file-name-nondirectory buffer-file-name))) (when filename (kill-new filename) - (message "Copied buffer name '%s' to the clipboard." filename))))) + (message "Copied buffer name '%s' to the clipboard." filename))))) (defun dwrz-org-capture-at-point () "Insert an org capture template at point." @@ -60,8 +60,8 @@ "Create or switch to a shell buffer for the current directory." (interactive) (let* ((default-directory (if (buffer-file-name) - (file-name-directory (buffer-file-name)) - default-directory)) + (file-name-directory (buffer-file-name)) + default-directory)) (dir-path (expand-file-name default-directory)) (shell-buffer-name (concat "*shell:" dir-path "*")) (existing-shell-buffer (get-buffer shell-buffer-name))) @@ -154,7 +154,7 @@ (with-eval-after-load 'emacs-lisp-mode (add-hook 'emacs-lisp-mode-hook 'eldoc-mode) (add-hook 'emacs-lisp-mode-hook - '(lambda () (setq indent-tabs-mode nil))) + #'(lambda () (setq indent-tabs-mode nil))) (font-lock-add-keywords 'emacs-lisp-mode '(("\\<\\(FIX\\|TODO\\|NB\\)" 1 font-lock-warning-face t)))) @@ -183,10 +183,10 @@ (setq go-tag-args (list "-transform" "camelcase")) (add-hook 'go-mode-hook 'lsp) (add-hook 'go-mode-hook - '(lambda () - (set (make-local-variable 'before-save-hook) - '(lsp-organize-imports - lsp-format-buffer)))) + #'(lambda () + (set (make-local-variable 'before-save-hook) + '(lsp-organize-imports + lsp-format-buffer)))) (define-key go-mode-map (kbd "C-c C-b") 'pop-tag-mark) (define-key go-mode-map (kbd "C-c t") 'go-tag-add) (define-key go-mode-map (kbd "C-c T") 'go-tag-remove) @@ -243,43 +243,43 @@ (:name "todo" :query "tag:todo" :key "t"))) ;; Keybindings (define-key notmuch-search-mode-map "D" - (lambda () - "mark message as deleted" - (interactive) - (notmuch-search-tag (list "-new" "-unread" "-inbox" "+deleted")) - (forward-line))) + (lambda () + "mark message as deleted" + (interactive) + (notmuch-search-tag (list "-new" "-unread" "-inbox" "+deleted")) + (forward-line))) (define-key notmuch-show-mode-map "D" - (lambda () - "mark message as deleted" - (interactive) - (notmuch-show-tag (list "-new" "-unread" "-inbox" "+deleted")))) + (lambda () + "mark message as deleted" + (interactive) + (notmuch-show-tag (list "-new" "-unread" "-inbox" "+deleted")))) (define-key notmuch-search-mode-map "S" - (lambda () - "mark message as spam" - (interactive) - (notmuch-search-tag (list "-new" "-unread" "-inbox" "+spam")) - (forward-line))) + (lambda () + "mark message as spam" + (interactive) + (notmuch-search-tag (list "-new" "-unread" "-inbox" "+spam")) + (forward-line))) (define-key notmuch-show-mode-map "S" - (lambda () - "mark message as spam" - (interactive) - (notmuch-show-tag (list "-new" "-unread" "-inbox" "+spam")))) + (lambda () + "mark message as spam" + (interactive) + (notmuch-show-tag (list "-new" "-unread" "-inbox" "+spam")))) (define-key notmuch-search-mode-map "N" - (lambda () - "unmark message as new and unread" - (interactive) - (notmuch-search-tag (list "-new" "-unread")) - (forward-line))) + (lambda () + "unmark message as new and unread" + (interactive) + (notmuch-search-tag (list "-new" "-unread")) + (forward-line))) (define-key notmuch-show-mode-map "N" - (lambda () - "unmark message as new and unread" - (interactive) - (notmuch-show-tag (list "-new" "-unread")))) + (lambda () + "unmark message as new and unread" + (interactive) + (notmuch-show-tag (list "-new" "-unread")))) (define-key notmuch-show-mode-map "r" 'notmuch-show-reply) (define-key notmuch-show-mode-map "R" 'notmuch-show-reply-sender) (define-key notmuch-search-mode-map "r" 'notmuch-search-reply-to-thread) (define-key notmuch-search-mode-map "R" - 'notmuch-search-reply-to-thread-sender)) + 'notmuch-search-reply-to-thread-sender)) (with-eval-after-load 'novice ()) @@ -345,7 +345,6 @@ (cond ((string-equal (system-name) "main.dwrz.net") (setq org-agenda-files '("~/org/dwrz.org" "~/org/someday-maybe.org" - "~/projects/brz/brz.org" "~/projects/career/career.org" "~/projects/chimerical/chimerical.org" "~/projects/chinese/chinese.org" @@ -432,9 +431,6 @@ mail-specify-envelope-from t send-mail-function 'sendmail-send-it)) -(with-eval-after-load 'shell - (setq-default explicit-shell-file-name (getenv "SHELL"))) - (with-eval-after-load 'sh-script (setq sh-basic-offset 2)) (with-eval-after-load 'simple @@ -483,15 +479,15 @@ ;; HOOKS (add-hook 'after-init-hook 'doom-modeline-mode) (add-hook 'after-init-hook - '(lambda () - (setq base16-theme-256-color-source 'colors) - (load-theme 'base16-tomorrow t) - (set-face-attribute 'fringe t :background "#ffffff") - (setq base16-distinct-fringe-background nil) - (when (fboundp 'menu-bar-mode)(menu-bar-mode -1)) - (when (fboundp 'scroll-bar-mode)(scroll-bar-mode -1)) - (when (fboundp 'tool-bar-mode)(tool-bar-mode -1)) - (when (fboundp 'window-divider-mode)(window-divider-mode -1)))) + #'(lambda () + (setq base16-theme-256-color-source 'colors) + (load-theme 'base16-tomorrow t) + (set-face-attribute 'fringe t :background "#ffffff") + (setq base16-distinct-fringe-background nil) + (when (fboundp 'menu-bar-mode)(menu-bar-mode -1)) + (when (fboundp 'scroll-bar-mode)(scroll-bar-mode -1)) + (when (fboundp 'tool-bar-mode)(tool-bar-mode -1)) + (when (fboundp 'window-divider-mode)(window-divider-mode -1)))) (add-hook 'before-save-hook 'delete-trailing-whitespace) ;; PACKAGE ENABLE