From: ueno Date: Sun, 14 Aug 2005 03:55:09 +0000 (+0000) Subject: * riece.el (riece-addons-insinuated): Abolished. X-Git-Tag: channel-coding-branchpoint~99 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc79bb0f6c65c736083588274ca762fa93b3616b;p=elisp%2Friece.git * riece.el (riece-addons-insinuated): Abolished. (riece): Don't check riece-addons-insinuated. * riece-addon.el (riece-insinuate-addon): Put 'riece-addon-insinuated property on add-on feature. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6685b6c..00cb3c9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2005-08-14 Daiki Ueno + + * riece.el (riece-addons-insinuated): Abolished. + (riece): Don't check riece-addons-insinuated. + + * riece-addon.el (riece-insinuate-addon): Put + 'riece-addon-insinuated property on add-on feature. + 2005-08-13 Daiki Ueno * COMPILE (riece-install-package): Install *.xpm and *.rb in etc/riece. diff --git a/lisp/riece-addon.el b/lisp/riece-addon.el index 092e6a5..53b6331 100644 --- a/lisp/riece-addon.el +++ b/lisp/riece-addon.el @@ -192,10 +192,13 @@ addons))) (defun riece-insinuate-addon (addon &optional verbose) - (require addon) ;implicit dependency - (funcall (intern (concat (symbol-name addon) "-insinuate"))) - (if verbose - (message "Add-on %S is insinuated" addon))) + (if (get addon 'riece-addon-insinuated) + (if verbose + (message "Add-on %S is alread insinuated" addon)) + (funcall (intern (concat (symbol-name addon) "-insinuate"))) + (put addon 'riece-addon-insinuated t) + (if verbose + (message "Add-on %S is insinuated" addon)))) (defun riece-enable-addon (addon &optional verbose) (let ((enabled (intern-soft (concat (symbol-name addon) "-enabled")))) @@ -204,7 +207,7 @@ (message "Add-on %S doesn't support enable/disable" addon)) (if (symbol-value enabled) (if verbose - (message "Can't enable add-on %S" addon)) + (message "Add-on %S is already enabled" addon)) (funcall (intern (concat (symbol-name addon) "-enable"))) (if verbose (message "Add-on %S enabled" addon)))))) @@ -220,7 +223,7 @@ (if verbose (message "Add-on %S disabled" addon))) (if verbose - (message "Can't disable add-on %S" addon)))))) + (message "Add-on %S is already enabled" addon)))))) (put 'riece-addon-list-mode 'font-lock-defaults '(riece-addon-list-font-lock-keywords t)) diff --git a/lisp/riece.el b/lisp/riece.el index 95c08ba..802ef5d 100644 --- a/lisp/riece.el +++ b/lisp/riece.el @@ -65,9 +65,6 @@ (defvar riece-shrink-buffer-idle-timer nil "Timer object to periodically shrink channel buffers.") -(defvar riece-addons-insinuated nil - "Non nil if add-ons are already insinuated.") - (defvar riece-select-keys `("#" riece-command-switch-to-channel-by-number "1" riece-command-switch-to-channel-by-number-1 @@ -282,13 +279,11 @@ If optional argument CONFIRM is non-nil, ask which IRC server to connect." (modify-frame-parameters (selected-frame) (list (cons 'riece-window-configuration (current-window-configuration)))) - (unless riece-addons-insinuated - (setq riece-addons (riece-resolve-addons riece-addons)) - (let ((pointer riece-addons)) - (while pointer - (riece-insinuate-addon (car pointer) riece-debug) - (setq pointer (cdr pointer)))) - (setq riece-addons-insinuated t)) + (setq riece-addons (riece-resolve-addons riece-addons)) + (let ((pointer riece-addons)) + (while pointer + (riece-insinuate-addon (car pointer) riece-debug) + (setq pointer (cdr pointer)))) (if (or confirm (null riece-server)) (setq riece-server (completing-read "Server: " riece-server-alist))) (if (stringp riece-server)