Browse Source

Fix `org-load-default-extensions': don't throw an error.

Bastien Guerry 17 years ago
parent
commit
2222e5a249
2 changed files with 8 additions and 2 deletions
  1. 3 0
      ChangeLog
  2. 5 2
      org.el

+ 3 - 0
ChangeLog

@@ -1,5 +1,8 @@
 2008-03-03  Bastien Guerry  <bzg@altern.org>
 
+	* org.el (org-load-default-extensions): Don't throw an error when
+	a feature cannot be loaded, send a message instead.
+
 	* org-publish.el (org-publish-org-to, org-publish-org-to-latex)
 	(org-publish-org-to-html): New argument `pub-dir' for temporary
 	publication directory.

+ 5 - 2
org.el

@@ -172,8 +172,11 @@ will be autoloaded when needed, preloading is not necessary."
 	(const :tag "    Apple Mail message links under OS X (org-mac-message.el)" org-mac-message)))
 
 (defun org-load-default-extensions ()
-  "Load all extensions that are listed in `org-default-extensions'."
-  (mapc 'require org-default-extensions))
+  "Load all extensions listed in `org-default-extensions'."
+  (mapc (lambda (ext) 
+	  (condition-case nil (require ext)
+	    (error (message "Feature `%s' is not known" ext))))
+	org-default-extensions))
 
 ;; FIXME: Needs a separate group...
 (defcustom org-completion-fallback-command 'hippie-expand