From: ueno Date: Fri, 21 May 2004 06:57:43 +0000 (+0000) Subject: * riece-addon.el (riece-insinuate-addon): Add optional 2nd X-Git-Tag: riece-1_0_0~29 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=0a88779b9f63f356db9ae255249ab0773fb037d3;p=elisp%2Friece.git * 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 23c45a0..d1c50b8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,16 @@ 2004-05-21 Daiki Ueno + * 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 + * riece-addon.el (riece-command-list-addons): Change "no description" -> "(no description)"; show key bindings. diff --git a/lisp/riece-addon.el b/lisp/riece-addon.el index 275ab95..a455516 100644 --- a/lisp/riece-addon.el +++ b/lisp/riece-addon.el @@ -92,35 +92,35 @@ (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 () @@ -197,7 +197,7 @@ Useful keys: (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) @@ -213,7 +213,7 @@ Useful keys: (and enabled (symbol-value enabled))) t)))) - (riece-disable-addon addon) + (riece-disable-addon addon t) (riece-command-list-addons)) (provide 'riece-addon) diff --git a/lisp/riece.el b/lisp/riece.el index 5aa8b47..0fec6c9 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -273,7 +273,7 @@ If optional argument CONFIRM is non-nil, ask which IRC server to connect." (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)) @@ -305,7 +305,7 @@ If optional argument CONFIRM is non-nil, ask which IRC server to connect." (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"))))