org-reload: bugfix when first element of features is nil

* lisp/org.el (org-reload): Let-bind features and make sure to use the
  result of delq and not just the side-effects.  Otherwise a
  spurious (nil ...) remains at the beginning of the list and leads to
  a spurious warning about a possible reload error.

Thanks to Rainer M. Krug for reporting this.
http://permalink.gmane.org/gmane.emacs.orgmode/61429
This commit is contained in:
Achim Gratz 2012-10-09 19:31:37 +02:00
parent 975b7f4608
commit e2e545269a
1 changed files with 10 additions and 8 deletions

View File

@ -20006,15 +20006,17 @@ With prefix arg UNCOMPILED, load the uncompiled versions."
(if (featurep 'xemacs) "org-colview" "org-colview-xemacs") (if (featurep 'xemacs) "org-colview" "org-colview-xemacs")
"^org$" "^org-infojs$" "^org-loaddefs$" "^org-version$") "^org$" "^org-infojs$" "^org-loaddefs$" "^org-version$")
"\\|")) "\\|"))
(feats features)
(lfeat (append (lfeat (append
(sort (sort
(setq feats
(delq nil (mapcar (delq nil (mapcar
(lambda (f) (lambda (f)
(let ((feature (symbol-name f))) (let ((feat (symbol-name f)))
(if (and (string-match feature-re feature) (if (and (string-match feature-re feat)
(not (string-match remove-re feature))) (not (string-match remove-re feat)))
feature nil))) feat nil)))
features)) feats)))
'string-lessp) 'string-lessp)
(list "org-version" "org"))) (list "org-version" "org")))
(load-suffixes (if uncompiled (reverse load-suffixes) load-suffixes)) (load-suffixes (if uncompiled (reverse load-suffixes) load-suffixes))