mirror of
https://github.com/doomemacs/doomemacs
synced 2025-09-02 14:53:38 -05:00
vertico: various refactors...
- unify `map!` statements when possible - rename `+vertico--embark-target-package!` to `+vertico--embark-target-package` and autoload it - set `completion-in-region-function` to a wrapper function instead of changing it with a hook - use `:override` advice instead of `fset` for `multi-occur` - document what `vertico-directory-tidy` does - move `:init` contents to `:config` when possible
This commit is contained in:
@@ -92,6 +92,15 @@ If ARG (universal argument), include all files, even hidden or compressed ones."
|
||||
(expand-file-name new-path))))))
|
||||
(call-interactively 'backward-delete-char))))
|
||||
|
||||
(defun +vertico--embark-target-package ()
|
||||
"Targets Doom's package! statements and returns the package name"
|
||||
(when (or (derived-mode-p 'emacs-lisp-mode) (derived-mode-p 'org-mode))
|
||||
(save-excursion
|
||||
(search-backward "(")
|
||||
(when (looking-at "(\\s-*package!\\s-*\\(\\(\\sw\\|\\s_\\)+\\)\\s-*")
|
||||
(let ((pkg (match-string 1)))
|
||||
(set-text-properties 0 (length pkg) nil pkg)
|
||||
`(package . ,pkg))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +vertico/embark-export-write ()
|
||||
|
Reference in New Issue
Block a user