dependencies)
(while addons
(require (car addons)) ;error will be reported here
- (let* ((requires
- (funcall (or (intern-soft
- (concat (symbol-name (car addons)) "-requires"))
- #'ignore)))
+ (let* ((requires-function
+ (intern-soft
+ (concat (symbol-name (car addons)) "-requires")))
+ (requires
+ (if (and requires-function
+ (fboundp requires-function))
+ (funcall requires-function)))
(pointer requires)
entry)
;; Increment succs' pred count.
(defun riece-insinuate-addon (addon &optional verbose)
(unless (assq addon riece-addon-dependencies)
(setq riece-addons (cons addon riece-addons)
- riece-addon-dependencies (riece-resolve-addons
- (copy-sequence riece-addons))))
+ riece-addon-dependencies
+ (riece-resolve-addons
+ (cons addon (mapcar #'car riece-addon-dependencies)))))
(let ((pointer riece-addon-dependencies))
(while pointer
(unless (get (car (car pointer)) 'riece-addon-insinuated)
(if verbose
(message "Add-on %S is not insinuated" addon))
(let ((entry (assq addon riece-addon-dependencies))
- (enabled (intern-soft (concat (symbol-name addon) "-enabled"))))
+ (enabled (intern-soft (concat (symbol-name addon) "-enabled")))
+ (uninstall (intern-soft (concat (symbol-name addon) "-uninstall"))))
(if entry
(if (cdr entry)
(if (= (length (cdr entry)) 1)
(mapconcat #'symbol-name (cdr entry) ", ")
addon))
(if (and enabled
+ (boundp enabled)
(symbol-value enabled))
(riece-disable-addon addon verbose))
- (funcall (or (intern-soft (concat (symbol-name addon)
- "-uninstall"))
- #'ignore))
+ (if (and uninstall
+ (fboundp uninstall))
+ (funcall uninstall))
(setq riece-addon-dependencies
(delq entry riece-addon-dependencies))
(remprop addon 'riece-addon-insinuated)
(setq riece-addons (delq addon riece-addons)
- riece-addon-dependencies (riece-resolve-addons
- (copy-sequence riece-addons)))))
+ riece-addon-dependencies
+ (riece-resolve-addons
+ (delq addon (mapcar #'car riece-addon-dependencies))))))
(if verbose
(message "Add-on %S is uninstalled" addon)))))
(unless (get addon 'riece-addon-insinuated)
(error "Add-on %S is not insinuated" addon))
(let ((enabled (intern-soft (concat (symbol-name addon) "-enabled"))))
- (if (null enabled)
+ (if (or (null enabled)
+ (not (boundp enabled)))
(if verbose
(message "Add-on %S doesn't support enable/disable" addon))
(if (symbol-value enabled)
(unless (get addon 'riece-addon-insinuated)
(error "Add-on %S is not insinuated" addon))
(let ((enabled (intern-soft (concat (symbol-name addon) "-enabled"))))
- (if (null enabled)
+ (if (or (null enabled)
+ (not (boundp enabled)))
(if verbose
(message "Add-on %S doesn't support enable/disable" addon))
(if (symbol-value enabled)
"-description"))
module-description-alist
(cons (cons (car (car pointer))
- (if description
+ (if (and description
+ (boundp description))
(symbol-value description)
"(no description)"))
module-description-alist)