I am working on a custom .emacs file that I will be able to use on several different computers. I would like to be able to load a mode if it exists on the system. If it does not exist I would like Emacs to stop showing the error: File error: Cannot open load file, X
.
For example:
(require 'darkroom-mode)
Results in:
File error: Cannot open load file, darkroom-mode
I am using file-exists-p
to test if certain other files exist but for this test I would assume I need to search my load-path. I am new to Lisp so this is stumping me.