2004-05-21 Daiki Ueno <ueno@unixuser.org>
+ * riece-addon.el (riece-insinuate-addon): Add optional 2nd
+ argument `verbose'
+ (riece-enable-addon): Ditto.
+ (riece-disable-addon): Ditto.
+ (riece-command-enable-addon): Call riece-enable-addon with the 2nd
+ arg.
+ (riece-command-disable-addon): Call riece-disable-addon with the
+ 2nd arg.
+
+2004-05-21 Daiki Ueno <ueno@unixuser.org>
+
* riece-addon.el (riece-command-list-addons): Change "no
description" -> "(no description)"; show key bindings.
(error "Circular add-on dependency found"))
(nreverse addons)))
-(defun riece-insinuate-addon (addon)
+(defun riece-insinuate-addon (addon &optional verbose)
(require addon) ;implicit dependency
(funcall (intern (concat (symbol-name addon) "-insinuate")))
- (if riece-debug
+ (if verbose
(message "Add-on %S is insinuated" addon)))
-(defun riece-enable-addon (addon)
+(defun riece-enable-addon (addon &optional verbose)
(let ((enabled (intern-soft (concat (symbol-name addon) "-enabled"))))
(if (null enabled)
- (if riece-debug
+ (if verbose
(message "Add-on %S doesn't support enable/disable" addon))
(if (symbol-value enabled)
- (if riece-debug
+ (if verbose
(message "Can't enable add-on %S" addon))
(funcall (intern (concat (symbol-name addon) "-enable")))
- (if riece-debug
+ (if verbose
(message "Add-on %S enabled" addon))))))
-(defun riece-disable-addon (addon)
+(defun riece-disable-addon (addon &optional verbose)
(let ((enabled (intern-soft (concat (symbol-name addon) "-enabled"))))
(if (null enabled)
- (if riece-debug
+ (if verbose
(message "Add-on %S doesn't support enable/disable" addon))
(if (symbol-value enabled)
(progn
(funcall (intern (concat (symbol-name addon) "-disable")))
- (if riece-debug
+ (if verbose
(message "Add-on %S disabled" addon)))
- (if riece-debug
+ (if verbose
(message "Can't disable add-on %S" addon))))))
(defun riece-addon-list-mode ()
(and enabled
(null (symbol-value enabled))))
t))))
- (riece-enable-addon addon)
+ (riece-enable-addon addon t)
(riece-command-list-addons))
(defun riece-command-disable-addon (addon)
(and enabled
(symbol-value enabled)))
t))))
- (riece-disable-addon addon)
+ (riece-disable-addon addon t)
(riece-command-list-addons))
(provide 'riece-addon)
(setq riece-addons (riece-resolve-addons riece-addons))
(let ((pointer riece-addons))
(while pointer
- (riece-insinuate-addon (car pointer))
+ (riece-insinuate-addon (car pointer) riece-debug)
(setq pointer (cdr pointer))))
(setq riece-addons-insinuated t))
(if (or confirm (null riece-server))
(run-hooks 'riece-startup-hook)
(let ((pointer riece-addons))
(while pointer
- (riece-enable-addon (car pointer))
+ (riece-enable-addon (car pointer) riece-debug)
(setq pointer (cdr pointer))))
(message "%s" (substitute-command-keys
"Type \\[describe-mode] for help"))))