diff --git a/modules/lang/coq/config.el b/modules/lang/coq/config.el index ab8e1fb94..7fad2fd42 100644 --- a/modules/lang/coq/config.el +++ b/modules/lang/coq/config.el @@ -87,6 +87,15 @@ ;; https://github.com/cpitclaudel/company-coq/issues/42 (add-to-list 'company-coq-disabled-features 'company)) + ;; HACK: Doom treats the use of package.el and its API as user error unless + ;; they've called `package-initialize' themselves (in which case, it is + ;; assumed you know what you're doing). + (defadvice! +coq--noop-upgrade-elpa-packages-a (fn &rest args) + :override #'proof-upgrade-elpa-packages + (if (and (featurep 'package) package--initialized) + (apply fn args) + (user-error "Doom doesn't support this command (update packages through `package!' statements!)"))) + (map! :map coq-mode-map :localleader "ao" #'company-coq-occur