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:
parent
770084fdda
commit
3f1016753d
2 changed files with 40 additions and 38 deletions
|
@ -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 ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue