Skip to content

Commit

Permalink
Use define-advice instead of advice-add
Browse files Browse the repository at this point in the history
  • Loading branch information
ubolonton committed Apr 29, 2019
1 parent 7ac9ce3 commit 6cccf4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,11 @@
(load bootstrap-file nil 'nomessage))

;; TODO: Remove this once https://github.com/raxod502/straight.el/issues/377 is fixed.
(defun ublt/straight-use-package-ignore-loaded (orig package &rest args)
(define-advice straight-use-package
(:around (orig package &rest args) ignore-loaded)
(if (featurep package)
t
(apply orig package args)))
(advice-add 'straight-use-package :around #'ublt/straight-use-package-ignore-loaded)

(straight-use-package 'use-package)
;; We don't want to declare a package twice.
Expand Down

0 comments on commit 6cccf4c

Please sign in to comment.