Change function notation to #'

This commit is contained in:
Case Duckworth 2021-12-28 18:20:07 -06:00
parent 9dc88b4803
commit ea2af3aa97
1 changed files with 96 additions and 94 deletions

190
init.el
View File

@ -40,7 +40,7 @@
(interactive)
(+init-sort)
(save-buffer)))
(:hook '+init-add-setup-to-imenu))
(:hook #'+init-add-setup-to-imenu))
(setup (:require +key)
(+key-setup))
@ -67,8 +67,8 @@
(setup (:require reading))
(setup Info
(:hook 'variable-pitch-mode
'reading-mode))
(:hook #'variable-pitch-mode
#'reading-mode))
(setup abbrev
(:option abbrev-file-name (sync/ "abbrev.el")
@ -157,7 +157,7 @@
+custom-variable-allowlist '(safe-local-variable-values))
(when (file-exists-p custom-file)
(+custom-load-ignoring-most-customizations t))
(advice-add 'custom-buffer-create-internal :after '+cus-edit-expand-widgets)
(advice-add #'custom-buffer-create-internal :after #'+cus-edit-expand-widgets)
(:with-mode Custom-mode
(:local-set imenu-generic-expression +cus-edit-imenu-generic-expression)))
@ -179,14 +179,14 @@
hardlink load move
shell touch symlink)
dired-dwim-target t)
(:bind "<backspace>" 'dired-up-directory
"TAB" 'dired-subtree-cycle
"i" 'dired-subtree-toggle
")" 'dired-git-info-mode)
(:hook 'dired-collapse-mode
'dired-hide-details-mode
'hl-line-mode)
(:+key "C-x C-j" 'dired-jump)
(:bind "<backspace>" #'dired-up-directory
"TAB" #'dired-subtree-cycle
"i" #'dired-subtree-toggle
")" #'dired-git-info-mode)
(:hook #'dired-collapse-mode
#'dired-hide-details-mode
#'hl-line-mode)
(:+key "C-x C-j" #'dired-jump)
(with-eval-after-load 'dired
(pcase system-type
((or 'ms-dos 'windows-nt)
@ -207,10 +207,10 @@
(:option eval-expression-print-length nil
eval-expression-print-level nil)
(:with-map (emacs-lisp-mode-map lisp-interaction-mode-map)
(:bind "C-c C-c" 'eval-defun
"C-c C-k" '+elisp-eval-region-or-buffer
"C-c C-z" 'ielm))
(advice-add 'eval-region :around '+eval-region@pulse))
(:bind "C-c C-c" #'eval-defun
"C-c C-k" #'+elisp-eval-region-or-buffer
"C-c C-z" #'ielm))
(advice-add #'eval-region :around #'+eval-region@pulse))
(setup eshell
(:also-load +eshell
@ -231,7 +231,7 @@
eshell-where-to-jump 'begin)
(:local-set outline-regexp eshell-prompt-regexp
page-delimiter eshell-prompt-regexp)
(:bind "C-d" '+eshell-quit-or-delete-char)
(:bind "C-d" #'+eshell-quit-or-delete-char)
(:when-loaded
(setenv "PAGER" "cat")))
@ -239,11 +239,11 @@
(:also-load +eww)
(:option eww-search-prefix "https://duckduckgo.com/html?q="
url-privacy-level '(email agent cookies lastloc))
(add-hook 'eww-after-render-hook 'reading-mode)
(:hook '+eww-bookmark-setup
'+eww-track-readable-mode)
(:bind "b" 'bookmark-set
"B" 'bookmark-jump
(add-hook 'eww-after-render-hook #'reading-mode)
(:hook #'+eww-bookmark-setup
#'+eww-track-readable-mode)
(:bind "b" #'bookmark-set
"B" #'bookmark-jump
"M-n" nil
"M-p" nil))
@ -295,23 +295,27 @@
(setup minibuffer
(:require +minibuffer)
(:with-map minibuffer-local-map
(:bind "M-/" '+minibuffer-complete-history)))
(:bind "M-/" #'+minibuffer-complete-history)))
(setup org-agenda
(:option org-agenda-skip-deadline-if-done t)
(:+leader "a" #'org-agenda "C-a" #'org-agenda))
(setup prog
(:local-set comment-auto-fill-only-comments t)
(:hook 'prettify-symbols-mode
'display-fill-column-indicator-mode
'turn-on-auto-fill))
(:hook #'prettify-symbols-mode
#'display-fill-column-indicator-mode
#'turn-on-auto-fill))
(setup scratch
(:require +scratch)
(:option initial-major-mode 'lisp-interaction-mode
initial-scratch-message
";; ABANDON ALL HOPE YE WHO ENTER HERE\n\n")
(add-hook 'kill-buffer-query-functions '+scratch-immortal))
(add-hook 'kill-buffer-query-functions #'+scratch-immortal))
(setup text
(:hook 'turn-on-auto-fill))
(:hook #'turn-on-auto-fill))
(setup (:straight 0x0)
(:option 0x0-default-server 'ttm)
@ -322,26 +326,26 @@
(:require +ace-window)
(:option aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)
aw-display-mode-overlay nil)
(:+key "M-o" '+ace-window-or-switch-buffer)
(:+key "M-o" #'+ace-window-or-switch-buffer)
(:face aw-mode-line-face ((t (:foreground "red"))))
(+ace-window-display-mode +1))
(setup (:straight anzu)
(:option anzu-cons-mode-line-p nil)
(:+key [remap query-replace] 'anzu-query-replace-regexp
[remap query-replace-regexp] 'anzu-query-replace-regexp)
(:+key [remap query-replace] #'anzu-query-replace-regexp
[remap query-replace-regexp] #'anzu-query-replace-regexp)
(global-anzu-mode +1)
(:bind-into isearch
[remap isearch-query-replace] 'anzu-isearch-query-replace
[remap isearch-query-replace-regexp] 'anzu-isearch-query-replace-regexp))
[remap isearch-query-replace] #'anzu-isearch-query-replace
[remap isearch-query-replace-regexp] #'anzu-isearch-query-replace-regexp))
(setup (:straight avy)
(:also-load +avy)
(:+key "M-j" 'avy-goto-char-timer)
(:+key "M-j" #'avy-goto-char-timer)
(:bind-into isearch
"M-j" 'avy-isearch)
"M-j" #'avy-isearch)
(:when-loaded
(setf (alist-get ?. avy-dispatch-alist) 'avy-action-embark)))
(setf (alist-get ?. avy-dispatch-alist) #'avy-action-embark)))
(setup (:straight (cape :host github :repo "minad/cape"))
(dolist (fn '(;; All available cape capfs listed here.
@ -398,20 +402,20 @@
circe-default-user user-real-login-name
circe-reduce-lurker-spam t
circe-server-auto-join-default-type :after-auth)
(:bind "C-c C-p" 'circe-command-PART
"C-c C-t" '+circe-current-topic
"C-l" 'lui-track-jump-to-indicator
"C-<return>" '+circe-chat@set-prompt)
(:bind "C-c C-p" #'circe-command-PART
"C-c C-t" #'+circe-current-topic
"C-l" #'lui-track-jump-to-indicator
"C-<return>" #'+circe-chat@set-prompt)
(advice-add 'circe-command-PART :after '+circe-kill-buffer)
(advice-add 'circe-command-QUIT :after '+circe-quit@kill-buffer)
(advice-add 'circe-command-GQUIT :after '+circe-gquit@kill-buffer)
(advice-add #'circe-command-PART :after #'+circe-kill-buffer)
(advice-add #'circe-command-QUIT :after #'+circe-quit@kill-buffer)
(advice-add #'circe-command-GQUIT :after #'+circe-gquit@kill-buffer)
(:with-mode circe-chat-mode
(:hook 'enable-circe-color-nicks
'enable-circe-new-day-notifier
'+circe-chat@set-prompt)
(:bind "C-c C-s" 'circe-command-SLAP))
(:hook #'enable-circe-color-nicks
#'enable-circe-new-day-notifier
#'+circe-chat@set-prompt)
(:bind "C-c C-s" #'circe-command-SLAP))
(:with-mode lui-mode
(:option lui-fill-column (+ fill-column +circe-left-margin)
@ -427,9 +431,9 @@
1 lui-emphasis-face)
(,(+lui-make-formatting-list-rx "/")
1 lui-emphasis-face)))
(:hook 'visual-line-mode
'enable-lui-track
'visual-fill-column-mode)
(:hook #'visual-line-mode
#'enable-lui-track
#'visual-fill-column-mode)
(:local-set fringes-outside-margins t
right-margin-width (length lui-time-stamp-format)
scroll-margin 0
@ -446,8 +450,8 @@
'(circe-channel-mode . +circe-current-topic)))
(with-eval-after-load 'circe-color-nicks
(add-hook 'modus-themes-after-load-theme-hook 'circe-nick-color-reset))
(add-hook 'kill-emacs-hook '+circe-quit-all@kill-emacs))
(add-hook 'modus-themes-after-load-theme-hook #'circe-nick-color-reset))
(add-hook 'kill-emacs-hook #'+circe-quit-all@kill-emacs))
(setup (:straight consult)
(:also-load +consult)
@ -458,9 +462,9 @@
xref-show-definitions-function 'consult-xref
tab-always-indent 'complete
completion-in-region-function 'consult-completion-in-region)
(advice-add 'register-preview :override 'consult-register-window)
(advice-add 'completing-read-multiple :override
'consult-completing-read-multiple)
(advice-add #'register-preview :override #'consult-register-window)
(advice-add #'completing-read-multiple :override
#'consult-completing-read-multiple)
(dolist (binding '(;; C-c bindings (mode-specific-map)
("C-c h" . consult-history)
("C-c m" . consult-mode-command)
@ -531,8 +535,8 @@
(:option consult--regexp-compiler 'consult--orderless-regexp-compiler))))
(setup (:straight crux)
(:+key "C-o" 'crux-smart-open-line
"C-x 4 t" 'crux-transpose-windows)
(:+key "C-o" #'crux-smart-open-line
"C-x 4 t" #'crux-transpose-windows)
(el-patch-feature crux)
(with-eval-after-load 'crux
@ -570,7 +574,7 @@ See also `crux-reopen-as-root-mode'."
"Display tooltips for the current word" t)
(autoload 'global-dictionary-tooltip-mode "dictionary"
"Enable/disable dictionary-tooltip-mode for all buffers" t)
(:hook 'reading-mode))
(:hook #'reading-mode))
(setup (:straight (discord
:host github
@ -587,9 +591,9 @@ See also `crux-reopen-as-root-mode'."
elfeed-show-unique-buffers t
elfeed-db-directory (sync/ "elfeed/db/" t))
(:with-mode elfeed-show-mode
(:bind "SPC" '+elfeed-scroll-up-command
"S-SPC" '+elfeed-scroll-down-command)
(:hook 'reading-mode)))
(:bind "SPC" #'+elfeed-scroll-up-command
"S-SPC" #'+elfeed-scroll-down-command)
(:hook #'reading-mode)))
(setup (:straight elfeed-org)
(:option rmh-elfeed-org-files (list (sync/ "elfeed/elfeed.org" t)))
@ -597,13 +601,13 @@ See also `crux-reopen-as-root-mode'."
(setup (:straight embark)
(:option prefix-help-command 'embark-prefix-help-command)
(:+key "C-." 'embark-act
"M-." 'embark-dwim
"<f1> B" 'embark-bindings))
(:+key "C-." #'embark-act
"M-." #'embark-dwim
"<f1> B" #'embark-bindings))
(setup (:straight embark-consult)
(:load-after consult embark)
(add-hook 'embark-collect-mode-hook 'consult-preview-at-point-mode))
(add-hook 'embark-collect-mode-hook #'consult-preview-at-point-mode))
(setup (:straight eros)
(:hook-into emacs-lisp-mode
@ -623,7 +627,7 @@ See also `crux-reopen-as-root-mode'."
"XDG_CACHE_HOME")))
(setup (:straight expand-region)
(:+key "C-=" 'er/expand-region))
(:+key "C-=" #'er/expand-region))
(setup (:straight (frowny
:host github
@ -660,15 +664,15 @@ See also `crux-reopen-as-root-mode'."
(setup (:straight helpful)
(run-with-idle-timer 0.5 nil
'require 'helpful)
(:+key "<f1> f" 'helpful-callable
"<f1> v" 'helpful-variable
"<f1> k" 'helpful-key
"C-c C-d" 'helpful-at-point))
(:+key "<f1> f" #'helpful-callable
"<f1> v" #'helpful-variable
"<f1> k" #'helpful-key
"C-c C-d" #'helpful-at-point))
(setup (:straight (hippie-completing-read
:host github
:repo "duckwork/hippie-completing-read"))
(:+key "M-/" 'hippie-completing-read))
(:+key "M-/" #'hippie-completing-read))
(setup (:straight hungry-delete)
(:option hungry-delete-chars-to-skip " \t"
@ -713,7 +717,7 @@ See also `crux-reopen-as-root-mode'."
(isearch-mb-mode +1))
(setup (:straight lacarte)
(:+key "<f10>" 'lacarte-execute-menu-command))
(:+key "<f10>" #'lacarte-execute-menu-command))
(setup (:straight (lin :host gitlab :repo "protesilaos/lin"))
(require 'lin)
@ -777,7 +781,6 @@ See also `crux-reopen-as-root-mode'."
(:also-load +org
ox-md)
(:option org-adapt-indentation nil
org-agenda-skip-deadline-if-done t
org-archive-mark-done t
org-catch-invisible-edits 'show-and-error
org-clock-clocked-in-display 'mode-line
@ -822,18 +825,17 @@ See also `crux-reopen-as-root-mode'."
org-startup-truncated nil
org-startup-with-inline-images t
org-tags-column (- (- fill-column (length org-ellipsis))))
(:bind "RET" '+org-return-dwim
"<S-return>" '+org-table-copy-down
"C-c C-l" '+org-insert-link-dwim
"C-c C-n" '+org-next-heading-widen
"C-c C-p" '+org-previous-heading-widen)
(:+leader "c" 'org-capture "C-c" 'org-capture
"a" 'org-agenda "C-a" 'org-agenda)
(:local-hook before-save-hook '+org-before-save@prettify-buffer)
(advice-add 'org-delete-backward-char :override '+org-delete-backward-char)
(:bind "RET" #'+org-return-dwim
"<S-return>" #'+org-table-copy-down
"C-c C-l" #'+org-insert-link-dwim
"C-c C-n" #'+org-next-heading-widen
"C-c C-p" #'+org-previous-heading-widen)
(:+leader "c" #'org-capture "C-c" #'org-capture)
(:local-hook before-save-hook #'+org-before-save@prettify-buffer)
(advice-add #'org-delete-backward-char :override #'+org-delete-backward-char)
(with-eval-after-load 'org
(org-clock-persistence-insinuate)
(org-link-set-parameters "tel" :follow '+org-tel-open)))
(org-link-set-parameters "tel" :follow #'+org-tel-open)))
(setup (:straight org-appear)
(:option org-appear-autoemphasis t
@ -848,12 +850,12 @@ See also `crux-reopen-as-root-mode'."
(:hook-into org-mode))
(setup (:straight paredit)
(:bind "DEL" 'paredit-backward-delete
"C-<backspace>" 'paredit-backward-kill-word)
(:bind "DEL" #'paredit-backward-delete
"C-<backspace>" #'paredit-backward-kill-word)
(:hook-into emacs-lisp-mode lisp-interaction-mode
lisp-mode scheme-mode)
(:also-load eldoc)
(eldoc-add-command 'paredit-backward-delete 'paredit-close-round))
(eldoc-add-command #'paredit-backward-delete #'paredit-close-round))
(setup (:straight paren-face)
(:hook-into emacs-lisp-mode
@ -872,7 +874,7 @@ See also `crux-reopen-as-root-mode'."
(:option shell-command-prompt "$ ")
(:bind-into dired
"M-!" 'shell-command+)
(:+key "M-!" 'shell-command+))
(:+key "M-!" #'shell-command+))
(setup (:straight sicp))
@ -964,24 +966,24 @@ See also `crux-reopen-as-root-mode'."
(:option resize-mini-windows 'grow-only
vertico-count-format nil
vertico-cycle t)
(advice-add 'vertico-next :around '+vertico-ding-wrap)
(advice-add #'vertico-next :around #'+vertico-ding-wrap)
(when (boundp 'native-comp-deferred-compilation-deny-list)
(add-to-list 'native-comp-deferred-compilation-deny-list "vertico"))
(vertico-mode +1)
;; Extensions
(:also-load vertico-directory)
(:with-map vertico-map
(:bind "RET" 'vertico-directory-enter
"DEL" 'vertico-directory-delete-char
"M-DEL" 'vertico-directory-delete-word))
(add-hook 'rfn-eshadow-update-overlay-hook 'vertico-directory-tidy))
(:bind "RET" #'vertico-directory-enter
"DEL" #'vertico-directory-delete-char
"M-DEL" #'vertico-directory-delete-word))
(add-hook 'rfn-eshadow-update-overlay-hook #'vertico-directory-tidy))
(setup (:straight visual-fill-column)
(:option visual-fill-column-center-text t
(append reading-modes) '(visual-fill-column-mode . +1))
(:hook 'visual-line-mode)
(:hook #'visual-line-mode)
(:hook-into org-mode)
(advice-add 'text-scale-adjust :after 'visual-fill-column-adjust))
(advice-add #'text-scale-adjust :after #'visual-fill-column-adjust))
(setup (:straight vlf)
(:require vlf-setup))