diff options
author | Achim Gratz <Stromeko@Stromeko.DE> | 2012-10-17 20:27:49 +0200 |
---|---|---|
committer | Achim Gratz <Stromeko@Stromeko.DE> | 2012-10-17 20:27:49 +0200 |
commit | 4d6165b106c47eba02cc1c91fa6fe68b38967aed (patch) | |
tree | 2f583b34fdebe25154ee72f027f724ba5cc71360 | |
parent | 10f1c32f6d40696e91922f3a7f28946fe28e8548 (diff) | |
download | org-mode-4d6165b106c47eba02cc1c91fa6fe68b38967aed.tar.gz |
org-reload: don't report an error for features found in load-path
* lisp/org.el (org-reload): Remove babel-dir, since it would always
coincide with org-dir. Features found in load-path are not reported
as a (possible) error, but keep a list of these to issue a message
that the actual location may need checking.
-rw-r--r-- | lisp/org.el | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/lisp/org.el b/lisp/org.el index 9f48719..ea2f547 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -20022,7 +20022,6 @@ With prefix arg UNCOMPILED, load the uncompiled versions." (interactive "P") (require 'loadhist) (let* ((org-dir (org-find-library-dir "org")) - (babel-dir (or (org-find-library-dir "ob") org-dir)) (contrib-dir (or (org-find-library-dir "org-contribdir") org-dir)) (feature-re "^\\(org\\|ob\\)\\(-.*\\)?") (remove-re (mapconcat 'identity @@ -20050,25 +20049,25 @@ With prefix arg UNCOMPILED, load the uncompiled versions." 'string-lessp) (list "org-version" "org"))) (load-suffixes (if uncompiled (reverse load-suffixes) load-suffixes)) - (load-misses ())) + load-uncore load-misses) (setq load-misses (delq 't (mapcar (lambda (f) - (or - (load (concat org-dir f) 'noerror nil nil 'mustsuffix) - (unless (string= org-dir babel-dir) - (load (concat babel-dir f) 'noerror nil nil 'mustsuffix)) - (unless (string= org-dir contrib-dir) - (load (concat contrib-dir f) 'noerror nil nil 'mustsuffix)) - (and (load (concat (org-find-library-dir f) f) 'noerror nil nil 'mustsuffix) - ;; fallback to load-path, report as a possible error - (message "Had to fall back onto load-path, something is not quite right...") - f))) + (or (load (concat org-dir f) 'noerror nil nil 'mustsuffix) + (and (string= org-dir contrib-dir) + (load (concat contrib-dir f) 'noerror nil nil 'mustsuffix)) + (and (load (concat (org-find-library-dir f) f) 'noerror nil nil 'mustsuffix) + (add-to-list 'load-uncore f 'append) + 't) + f)) lfeat))) - (if (not load-misses) - (message "Successfully reloaded Org\n%s" (org-version nil 'full)) - (message "Some error occured while reloading Org features\n%s\nPlease check *Messages*!\n%s" - load-misses (org-version nil 'full))))) + (if load-uncore + (message "The following feature%s found in load-path, please check if that's correct:\n%s" + (if (> (length load-uncore) 1) "s were" " was") load-uncore)) + (if load-misses + (message "Some error occured while reloading Org feature%s\n%s\nPlease check *Messages*!\n%s" + (if (> (length load-misses) 1) "s" "") load-misses (org-version nil 'full)) + (message "Successfully reloaded Org\n%s" (org-version nil 'full))))) ;;;###autoload (defun org-customize () |