CEDET prevents me from doing M-x load-file init.el with the error:

progn: CEDET Version 2.0 already loaded.

How do I modify my CEDET load line to load conditionally? The current line looks like:

(load-file "~/.emacs.d/cedet/cedet-devel-load.el")

1 Answer 1

Simplest method

Assuming you're not worried about it not being available because the file is missing/in error

  (load-file "~/.emacs.d/cedet/cedet-devel-load.el"))

This will bypass the error and allow you to continue loading.

Require instead of load

Looking at cedet-devel-load.el on https://github.com/emacsmirror/cedet/blob/master/cedet-devel-load.el the last line is (provide 'cedet-devel-load).

This means you can replace your load line with:

;; If you haven't already added it to load path above
(add-to-list 'load-path "~/.emacs.d/cedet")
(require 'cedet-devel-load)

This will use the library and ensure you do not have to worry about it being loaded more than the initial time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.