Always use #' for lambda

Current exception: not in backtick expansions.  Is it necessary there?
This commit is contained in:
Daniel - 2022-05-22 17:37:33 +02:00
parent fa7c7ca3ed
commit 152c17643a
No known key found for this signature in database
GPG Key ID: 1C7071A75BB72D64
1 changed files with 135 additions and 135 deletions

48
init.el
View File

@ -955,7 +955,7 @@
org-clock-auto-clock-resolution 'when-no-clock-is-running
org-clock-mode-line-total 'auto
org-clock-report-include-clocking-task t
org-clock-in-switch-to-state (lambda (_)
org-clock-in-switch-to-state #'(lambda (_)
(when (not
(and (boundp 'org-capture-mode)
org-capture-mode))
@ -1385,7 +1385,7 @@
ediff-show-clashes-only t)
:config (progn
(add-hook 'ediff-keymap-setup-hook
'(lambda ()
#'(lambda ()
(bind-key "j" #'ediff-next-difference ediff-mode-map)
(bind-key "k" #'ediff-previous-difference ediff-mode-map)))
@ -1580,7 +1580,7 @@
"User-Agent:"))
message-citation-line-function
(lambda ()
#'(lambda ()
(when message-reply-headers
(insert "ghItlhpu' "
(mail-header-from message-reply-headers)
@ -1874,7 +1874,7 @@
;; Visit group under point and immediately close it; this updates
;; gnus registry as a side-effect
(bind-key "v u"
'(lambda ()
#'(lambda ()
(interactive)
(save-mark-and-excursion
(when (gnus-topic-select-group)
@ -1883,7 +1883,7 @@
;; Toggle visibility of News group
(bind-key "v c"
(lambda ()
#'(lambda ()
(interactive)
(save-mark-and-excursion
(gnus-topic-jump-to-topic "News")
@ -2089,7 +2089,7 @@
(ediff-files file2 file1)
(ediff-files file1 file2))
(add-hook 'ediff-after-quit-hook-internal
(lambda ()
#'(lambda ()
(setq ediff-after-quit-hook-internal nil)
(set-window-configuration wnd))))
(error "No more than 2 files should be marked"))))
@ -2451,7 +2451,7 @@ With given ARG, display files in `db/important-document-path."
(add-hook 'emms-player-started-hook 'emms-show)
(advice-add 'emms-tag-editor-submit
:after (lambda (&rest r)
:after #'(lambda (&rest r)
(ignore r)
(delete-window)))
@ -2463,7 +2463,7 @@ With given ARG, display files in `db/important-document-path."
;; no matter what previous values or customization may say otherwise
;; … so we need to employ a hook to change its value
(add-hook 'emms-playlist-mode-hook
(lambda ()
#'(lambda ()
(setq emms-playlist-insert-track-function
#'db/emms-playlist-mode-insert-track)))
@ -2521,7 +2521,7 @@ With given ARG, display files in `db/important-document-path."
:init (setq explicit-shell-file-name "/bin/bash")
:config (progn
(add-hook 'term-exec-hook ; oremacs.com
(lambda ()
#'(lambda ()
(let* ((buff (current-buffer))
(proc (get-buffer-process buff)))
(set-process-sentinel
@ -2546,7 +2546,7 @@ With given ARG, display files in `db/important-document-path."
(unbind-key "C-x C-j" term-raw-map)
(unbind-key "C-x g" term-raw-map))
(add-hook 'term-mode-hook (lambda () (yas-minor-mode -1)))))
(add-hook 'term-mode-hook #'(lambda () (yas-minor-mode -1)))))
(use-package ansi-color
:commands (ansi-color-for-comint-mode-on
@ -2577,7 +2577,7 @@ With given ARG, display files in `db/important-document-path."
;; stick to that.
(add-hook 'shell-mode-hook
(lambda ()
#'(lambda ()
(setq-local completion-in-region-function
#'completion--in-region)))))
@ -2622,7 +2622,7 @@ With given ARG, display files in `db/important-document-path."
(if (<= emacs-major-version 27)
(add-hook 'eshell-mode-hook
(lambda ()
#'(lambda ()
(bind-key "C-a" #'eshell-bol eshell-mode-map)
(bind-key "M-r" #'eshell-insert-history eshell-mode-map)
(bind-key "M-P" #'eshell-previous-prompt eshell-mode-map)
@ -2645,7 +2645,7 @@ With given ARG, display files in `db/important-document-path."
;; `pcomplete-ignore-case is non-nil by default.
(when on-windows
(add-to-list 'eshell-mode-hook
(lambda ()
#'(lambda ()
(setq pcomplete-ignore-case nil))))
;; Sometimes, when completing path names and immediately
@ -2767,7 +2767,7 @@ With given ARG, display files in `db/important-document-path."
(ccl ("ccl") :coding-system utf-8-unix))
slime-repl-history-remove-duplicates t
slime-repl-history-trim-whitespaces t)
(add-hook 'lisp-mode-hook '(lambda () (slime-mode +1)) t))
(add-hook 'lisp-mode-hook #'(lambda () (slime-mode +1)) t))
:config (progn
(make-directory "/tmp/slime-fasls/" t)
(slime-setup '(slime-repl slime-fancy slime-autodoc))
@ -2833,7 +2833,7 @@ With given ARG, display files in `db/important-document-path."
(add-hook 'LaTeX-mode-hook #'turn-on-reftex)
(add-hook 'latex-mode-hook #'turn-on-reftex)
(add-hook 'LaTeX-mode-hook '(lambda ()
(add-hook 'LaTeX-mode-hook #'(lambda ()
(TeX-PDF-mode 1)
(TeX-source-correlate-mode 1)
(TeX-fold-mode 1)))
@ -2852,7 +2852,7 @@ With given ARG, display files in `db/important-document-path."
;; works as intended
(TeX-add-style-hook
"mydefs"
(lambda ()
#'(lambda ()
(TeX-run-style-hooks "etex"
"etoolbox"
"ifthen"
@ -2907,7 +2907,7 @@ With given ARG, display files in `db/important-document-path."
;; whether this works as intended
(TeX-add-style-hook
"cleveref"
(lambda ()
#'(lambda ()
(add-to-list 'reftex-ref-style-alist
'("Cleveref" "cleveref"
(("\\cref" ?c) ("\\Cref" ?C)
@ -2921,11 +2921,11 @@ With given ARG, display files in `db/important-document-path."
;; Language definitions
(add-hook 'TeX-language-de-hook
(lambda () (ispell-change-dictionary "de_DE")))
#'(lambda () (ispell-change-dictionary "de_DE")))
(add-hook 'TeX-language-en-hook
(lambda () (ispell-change-dictionary "en_US")))
#'(lambda () (ispell-change-dictionary "en_US")))
(add-hook 'TeX-mode-hook
(lambda () (setq ispell-parser 'tex)))))
#'(lambda () (setq ispell-parser 'tex)))))
;; * Various Mode Configurations
@ -2939,7 +2939,7 @@ With given ARG, display files in `db/important-document-path."
:init (progn
;; replace perl-mode with cperl-mode
(mapc
(lambda (pair)
#'(lambda (pair)
(if (eq (cdr pair) 'perl-mode)
(setcdr pair 'cperl-mode)))
(append auto-mode-alist interpreter-mode-alist))
@ -2982,7 +2982,7 @@ With given ARG, display files in `db/important-document-path."
(message "Loaded eproject … done")
(with-eval-after-load 'message
(add-hook 'message-setup-hook
(lambda ()
#'(lambda ()
(eproject-mode -1))))))
(use-package eww
@ -2994,8 +2994,8 @@ With given ARG, display files in `db/important-document-path."
(add-hook 'haskell-mode-hook 'haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
(add-hook 'haskell-mode-hook
(lambda ()
(company-mode +1)
#'(lambda ()
(company-mode 1)
(set (make-local-variable 'company-backends)
(append '((company-capf company-dabbrev-code))
company-backends))))