Skip to content

Instantly share code, notes, and snippets.

@Superbil
Last active March 3, 2016 16:47
Show Gist options
  • Save Superbil/9c99bf78f8b76374fe6e to your computer and use it in GitHub Desktop.
Save Superbil/9c99bf78f8b76374fe6e to your computer and use it in GitHub Desktop.
Try to advice list-packages
;; (advice-add 'list-packages :around
;; #'(lambda (orig-fun &rest args)
;; (paradox-list-packages args))
;; '((name . "paradox-list-packages-on-advice")))
;; paradox-list-packages will use list-packages, this will get error.
(defun superbil/list-package ()
"When `paradox-list-packages' existed, use it."
(if (functionp 'paradox-list-packages)
(paradox-list-packages nil)
(list-packages)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment