💥 Rename def-package! -> use-package!

Calling this pivotal macro "def-package!" has frequently been a source
of confusion. It is a thin wrapper around use-package, and it should be
obvious that it is so. For this reason, and to match the naming
convention used with other convenience macros/wrappers, it is now
use-package!.

Also changes def-package-hook! -> use-package-hook!

The old macros are now marked obsolete and will be removed when straight
integration is merged.
This commit is contained in:
Henrik Lissner 2019-07-23 12:44:03 +02:00
parent c795a988e6
commit 76cacb5bfe
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
110 changed files with 310 additions and 308 deletions

View file

@ -1,6 +1,6 @@
;;; completion/company/config.el -*- lexical-binding: t; -*-
(def-package! company
(use-package! company
:commands company-complete-common company-manual-begin company-grab-line
:after-call evil-insert-state-entry-hook evil-emacs-state-entry-hook
:init
@ -35,7 +35,7 @@
(global-company-mode +1))
(def-package! company-tng
(use-package! company-tng
:when (featurep! +tng)
:after-call post-self-insert-hook
:config
@ -51,7 +51,7 @@
;;
;; Packages
(def-package! company-prescient
(use-package! company-prescient
:hook (company-mode . company-prescient-mode)
:config
;; NOTE prescient config duplicated with `ivy'
@ -59,7 +59,7 @@
(prescient-persist-mode +1))
(def-package! company-box
(use-package! company-box
:when (and EMACS26+ (featurep! +childframe))
:hook (company-mode . company-box-mode)
:config
@ -119,7 +119,7 @@
((facep sym) 'ElispFace))))))
(def-package! company-dict
(use-package! company-dict
:defer t
:config
(setq company-dict-dir (expand-file-name "dicts" doom-private-dir))

View file

@ -32,7 +32,7 @@ be negative.")
;;
;;; Packages
(def-package! helm-mode
(use-package! helm-mode
:defer t
:after-call pre-command-hook
:init
@ -57,7 +57,7 @@ be negative.")
(add-to-list 'helm-completing-read-handlers-alist (cons #'find-file-at-point nil)))
(def-package! helm
(use-package! helm
:after helm-mode
:preface
(setq helm-candidate-number-limit 50
@ -125,7 +125,7 @@ be negative.")
(advice-add fn :around #'doom-use-helpful-a)))
(def-package! helm-flx
(use-package! helm-flx
:when (featurep! +fuzzy)
:hook (helm-mode . helm-flx-mode)
:config (helm-flx-mode +1))
@ -159,7 +159,7 @@ be negative.")
;;;###package helm-projectile
(def-package! helm-projectile
(use-package! helm-projectile
:commands (helm-projectile-find-file
helm-projectile-recentf
helm-projectile-switch-project

View file

@ -43,7 +43,7 @@ immediately runs it on the current candidate (ending the ivy session)."
;;
;;; Packages
(def-package! ivy
(use-package! ivy
:defer 1
:after-call pre-command-hook
:init
@ -109,7 +109,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
(ivy-mode +1)
(def-package! ivy-hydra
(use-package! ivy-hydra
:commands (ivy-dispatching-done-hydra ivy--matcher-desc ivy-hydra/body)
:init
(define-key! ivy-minibuffer-map
@ -120,7 +120,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
(define-key ivy-minibuffer-map (kbd "M-o") #'hydra-ivy/body)))
(def-package! ivy-rich
(use-package! ivy-rich
:after ivy
:config
(when (featurep! +icons)
@ -158,7 +158,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
(ivy-rich-mode +1))
(def-package! all-the-icons-ivy
(use-package! all-the-icons-ivy
:when (featurep! +icons)
:after ivy
:config
@ -174,7 +174,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
(all-the-icons-ivy-setup))))
(def-package! counsel
(use-package! counsel
:commands counsel-describe-face
:init
(map! [remap apropos] #'counsel-apropos
@ -246,7 +246,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
'(("O" +ivy-git-grep-other-window-action "open in other window"))))
(def-package! counsel-projectile
(use-package! counsel-projectile
:defer t
:init
(map! [remap projectile-find-file] #'+ivy/projectile-find-file
@ -260,12 +260,12 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
(ivy-set-display-transformer #'counsel-projectile-find-file nil))
(def-package! wgrep
(use-package! wgrep
:commands wgrep-change-to-wgrep-mode
:config (setq wgrep-auto-save-buffer t))
(def-package! ivy-posframe
(use-package! ivy-posframe
:when (and EMACS26+ (featurep! +childframe))
:hook (ivy-mode . ivy-posframe-mode)
:config
@ -285,7 +285,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
#'ivy-display-function-fallback)))
(def-package! flx
(use-package! flx
:when (and (featurep! +fuzzy)
(not (featurep! +prescient)))
:defer t ; is loaded by ivy
@ -295,7 +295,7 @@ evil-ex-specific constructs, so we disable it solely in evil-ex."
ivy-flx-limit 10000))
(def-package! ivy-prescient
(use-package! ivy-prescient
:hook (ivy-mode . ivy-prescient-mode)
:when (featurep! +prescient)
:init