PRAISE BE TO THE BYTE COMPILER FOR THY SHARP QUOTES
This commit is contained in:
parent
ef88d30b73
commit
5ae94b765c
79 changed files with 798 additions and 795 deletions
|
@ -23,7 +23,7 @@
|
|||
(fboundp 'dired-insert-set-properties)
|
||||
(dired-insert-set-properties (point-min) (point-max)))
|
||||
(set-buffer-modified-p nil))
|
||||
(add-hook 'dired-after-readin-hook '+dired|sort-directories-first)
|
||||
(add-hook 'dired-after-readin-hook #'+dired|sort-directories-first)
|
||||
|
||||
;; Automatically create missing directories when creating new files
|
||||
(defun +dired|create-non-existent-directory ()
|
||||
|
@ -31,14 +31,14 @@
|
|||
(when (and (not (file-exists-p parent-directory))
|
||||
(y-or-n-p (format "Directory `%s' does not exist! Create it?" parent-directory)))
|
||||
(make-directory parent-directory t))))
|
||||
(push '+dired|create-non-existent-directory find-file-not-found-functions)
|
||||
(push #'+dired|create-non-existent-directory find-file-not-found-functions)
|
||||
|
||||
(after! evil
|
||||
(add-transient-hook! 'dired-mode-hook
|
||||
(map! :map dired-mode-map
|
||||
:n "c" 'find-file
|
||||
:n "d" 'dired-do-delete
|
||||
:n "r" 'dired-do-rename)))
|
||||
:n "c" #'find-file
|
||||
:n "d" #'dired-do-delete
|
||||
:n "r" #'dired-do-rename)))
|
||||
|
||||
|
||||
;;
|
||||
|
@ -54,13 +54,13 @@
|
|||
"Butt out if the requested directory is remote (i.e. through tramp)."
|
||||
(unless (file-remote-p default-directory)
|
||||
(apply orig-fn args)))
|
||||
(advice-add 'dired-k--highlight :around '+dired*dired-k-highlight)
|
||||
(advice-add #'dired-k--highlight :around #'+dired*dired-k-highlight)
|
||||
|
||||
(add-hook 'dired-initial-position-hook 'dired-k)
|
||||
(add-hook 'dired-initial-position-hook #'dired-k)
|
||||
(add-hook 'dired-after-readin-hook #'dired-k-no-revert))
|
||||
|
||||
;; Striped dired buffers
|
||||
(def-package! stripe-buffer
|
||||
:commands stripe-buffer-mode
|
||||
:init (add-hook 'dired-mode-hook 'stripe-buffer-mode))
|
||||
:init (add-hook 'dired-mode-hook #'stripe-buffer-mode))
|
||||
|
||||
|
|
|
@ -26,11 +26,11 @@ trigger electric indentation."
|
|||
(chars (plist-get plist :chars))
|
||||
(words (plist-get plist :words)))
|
||||
(when (or chars words)
|
||||
(let ((fn-name (intern (format "doom--electric-%s" (s-join "-" (mapcar 'symbol-name modes))))))
|
||||
(let ((fn-name (intern (format "doom--electric-%s" (s-join "-" (mapcar #'symbol-name modes))))))
|
||||
`(progn
|
||||
(defun ,fn-name ()
|
||||
(electric-indent-local-mode +1)
|
||||
,(if chars `(setq electric-indent-chars ',chars))
|
||||
,(if words `(setq doom-electric-indent-words ',words)))
|
||||
(add-hook! ,modes ',fn-name))))))
|
||||
(add-hook! ,modes #',fn-name))))))
|
||||
|
||||
|
|
|
@ -68,52 +68,52 @@ module to be loaded."
|
|||
(defun +eshell/evil-append ()
|
||||
(interactive)
|
||||
(goto-char eshell-last-output-end)
|
||||
(call-interactively 'evil-append-line))
|
||||
(call-interactively #'evil-append-line))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/evil-append-maybe ()
|
||||
(interactive)
|
||||
(if (+eshell--outside-prompt-p)
|
||||
(+eshell/evil-append)
|
||||
(call-interactively 'evil-append)))
|
||||
(call-interactively #'evil-append)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/evil-prepend ()
|
||||
(interactive)
|
||||
(goto-char eshell-last-output-end)
|
||||
(call-interactively 'evil-insert))
|
||||
(call-interactively #'evil-insert))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/evil-prepend-maybe ()
|
||||
(interactive)
|
||||
(if (+eshell--outside-prompt-p)
|
||||
(+eshell/evil-prepend)
|
||||
(call-interactively 'evil-insert)))
|
||||
(call-interactively #'evil-insert)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/evil-replace-maybe ()
|
||||
(interactive)
|
||||
(if (+eshell--outside-prompt-p)
|
||||
(user-error "Cannot edit read-only region")
|
||||
(call-interactively 'evil-replace)))
|
||||
(call-interactively #'evil-replace)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/evil-replace-state-maybe ()
|
||||
(interactive)
|
||||
(if (+eshell--outside-prompt-p)
|
||||
(user-error "Cannot edit read-only region")
|
||||
(call-interactively 'evil-replace-state)))
|
||||
(call-interactively #'evil-replace-state)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/evil-change ()
|
||||
(interactive)
|
||||
(when (+eshell--outside-prompt-p)
|
||||
(goto-char eshell-last-output-end))
|
||||
(call-interactively 'evil-change))
|
||||
(call-interactively #'evil-change))
|
||||
|
||||
;;;###autoload
|
||||
(defun +eshell/evil-change-line ()
|
||||
(interactive)
|
||||
(when (+eshell--outside-prompt-p)
|
||||
(goto-char eshell-last-output-end))
|
||||
(call-interactively 'evil-change-line))
|
||||
(call-interactively #'evil-change-line))
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
eshell-scroll-to-bottom-on-output 'all
|
||||
eshell-buffer-shorthand t
|
||||
;; em-prompt
|
||||
eshell-prompt-function '+eshell/prompt
|
||||
eshell-prompt-function #'+eshell/prompt
|
||||
;; em-glob
|
||||
eshell-glob-case-insensitive t
|
||||
eshell-error-if-no-glob t
|
||||
|
@ -32,23 +32,23 @@
|
|||
"Setup eshell keybindings. This must be done in a hook because eshell
|
||||
redefines its keys every time `eshell-mode' is enabled."
|
||||
(map! :map eshell-mode-map
|
||||
:n "i" '+eshell/evil-prepend-maybe
|
||||
:n "I" '+eshell/evil-prepend
|
||||
:n "a" '+eshell/evil-append-maybe
|
||||
:n "A" '+eshell/evil-append
|
||||
:n "r" '+eshell/evil-replace-maybe
|
||||
:n "R" '+eshell/evil-replace-state-maybe
|
||||
:n "c" '+eshell/evil-change
|
||||
:n "C" '+eshell/evil-change-line
|
||||
:i "<tab>" 'eshell-pcomplete
|
||||
:i "C-u" 'eshell-kill-input
|
||||
:i "SPC" 'self-insert-command
|
||||
:m "<return>" '+eshell/evil-append
|
||||
:n [remap evil-window-split] '+eshell/split
|
||||
:n [remap evil-window-vsplit] '+eshell/vsplit
|
||||
:n [remap evil-record-macro] 'eshell-life-is-too-much
|
||||
[remap doom/close-window-or-tab] 'eshell-life-is-too-much))
|
||||
(add-hook 'eshell-mode-hook '+eshell|keymap-setup)
|
||||
:n "i" #'+eshell/evil-prepend-maybe
|
||||
:n "I" #'+eshell/evil-prepend
|
||||
:n "a" #'+eshell/evil-append-maybe
|
||||
:n "A" #'+eshell/evil-append
|
||||
:n "r" #'+eshell/evil-replace-maybe
|
||||
:n "R" #'+eshell/evil-replace-state-maybe
|
||||
:n "c" #'+eshell/evil-change
|
||||
:n "C" #'+eshell/evil-change-line
|
||||
:i "<tab>" #'eshell-pcomplete
|
||||
:i "C-u" #'eshell-kill-input
|
||||
:i "SPC" #'self-insert-command
|
||||
:m "<return>" #'+eshell/evil-append
|
||||
:n [remap evil-window-split] #'+eshell/split
|
||||
:n [remap evil-window-vsplit] #'+eshell/vsplit
|
||||
:n [remap evil-record-macro] #'eshell-life-is-too-much
|
||||
[remap doom/close-window-or-tab] #'eshell-life-is-too-much))
|
||||
(add-hook 'eshell-mode-hook #'+eshell|keymap-setup)
|
||||
|
||||
(defun +eshell|cleanup ()
|
||||
"Close window (or workspace) on quit."
|
||||
|
@ -58,17 +58,17 @@ redefines its keys every time `eshell-mode' is enabled."
|
|||
((and (featurep! :feature workspaces)
|
||||
(string= "eshell" (+workspace-current-name)))
|
||||
(+workspace/close-window-or-workspace))))
|
||||
(add-hook 'eshell-exit-hook '+eshell|cleanup)
|
||||
(add-hook 'eshell-exit-hook #'+eshell|cleanup)
|
||||
|
||||
(defun +eshell|init ()
|
||||
"Keep track of eshell buffers."
|
||||
(add-to-list '+eshell-buffers (current-buffer)))
|
||||
(add-hook 'eshell-mode-hook '+eshell|init)
|
||||
(add-hook 'eshell-mode-hook #'+eshell|init)
|
||||
|
||||
(add-hook 'eshell-mode-hook 'doom-hide-modeline-mode)
|
||||
(add-hook 'eshell-mode-hook #'doom-hide-modeline-mode)
|
||||
|
||||
(add-hook! eshell-mode
|
||||
(add-hook 'evil-insert-state-exit-hook 'hl-line-mode nil t)
|
||||
(add-hook 'evil-insert-state-exit-hook #'hl-line-mode nil t)
|
||||
(add-hook 'evil-insert-state-entry-hook (lambda () (hl-line-mode -1)) nil t))
|
||||
|
||||
;; Aliases
|
||||
|
|
|
@ -14,12 +14,12 @@
|
|||
(words (plist-get plist :words))
|
||||
(patterns (plist-get plist :patterns)))
|
||||
(when (or symbols words patterns)
|
||||
(let ((fn-name (intern (format "doom--rotate-%s" (s-join "-" (mapcar 'symbol-name modes))))))
|
||||
(let ((fn-name (intern (format "doom--rotate-%s" (s-join "-" (mapcar #'symbol-name modes))))))
|
||||
`(progn
|
||||
(defun ,fn-name ()
|
||||
(require 'rotate-text)
|
||||
,(if symbols `(setq rotate-text-local-symbols ',symbols))
|
||||
,(if words `(setq rotate-text-local-words ',words))
|
||||
,(if patterns `(setq rotate-text-local-patterns ',patterns)))
|
||||
(add-hook! ,modes ',fn-name))))))
|
||||
(add-hook! ,modes #',fn-name))))))
|
||||
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
(setq multi-term-program (getenv "SHELL")
|
||||
multi-term-switch-after-close nil)
|
||||
|
||||
(add-hook 'term-mode-hook 'doom-hide-modeline-mode))
|
||||
(add-hook 'term-mode-hook #'doom-hide-modeline-mode))
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
(let ((bin (executable-find "tmux")))
|
||||
(unless bin
|
||||
(error "Could not find tmux executable"))
|
||||
(let* ((args (mapcar 'shell-quote-argument (delq nil args)))
|
||||
(cmdstr (format "%s %s" bin (if args (apply 'format command args) command)))
|
||||
(let* ((args (mapcar #'shell-quote-argument (delq nil args)))
|
||||
(cmdstr (format "%s %s" bin (if args (apply #'format command args) command)))
|
||||
(output (get-buffer-create " *tmux stdout*"))
|
||||
(errors (get-buffer-create " *tmux stderr*"))
|
||||
code)
|
||||
|
@ -63,7 +63,7 @@ but do not execute them."
|
|||
(interactive "P")
|
||||
(unless +tmux-last-command
|
||||
(user-error "No last command to run"))
|
||||
(apply '+tmux (car +tmux-last-command) (cdr +tmux-last-command)))
|
||||
(apply #'+tmux (car +tmux-last-command) (cdr +tmux-last-command)))
|
||||
|
||||
;;;###autoload
|
||||
(defun +tmux/cd (&optional directory)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue