From: ueno Date: Sat, 20 Aug 2005 00:00:21 +0000 (+0000) Subject: * riece-addon.el (riece-command-enable-addon): Redraw entire X-Git-Tag: channel-coding-branchpoint~80 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d221a49dcc28d46a7191b1748c0910615c2c6753;p=elisp%2Friece.git * riece-addon.el (riece-command-enable-addon): Redraw entire add-on list. (riece-command-disable-addon): Ditto. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5fc2b20..f54cf56 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2005-08-20 Daiki Ueno + + * riece-addon.el (riece-command-enable-addon): Redraw entire + add-on list. + (riece-command-disable-addon): Ditto. + 2005-08-17 Daiki Ueno * riece-filter.el (riece-handle-message): Use diff --git a/lisp/riece-addon.el b/lisp/riece-addon.el index ef25aa0..532a328 100644 --- a/lisp/riece-addon.el +++ b/lisp/riece-addon.el @@ -315,18 +315,14 @@ Useful keys: (null (symbol-value enabled))))) t))))) (riece-enable-addon addon t) - (let ((enabled (intern-soft (concat (symbol-name addon) "-enabled")))) - (if (and (eq major-mode 'riece-addon-list-mode) - (get-text-property (point) 'riece-addon) - enabled (symbol-value enabled)) - (save-excursion - (beginning-of-line) - (let ((point (point)) - (inhibit-read-only t) - buffer-read-only) - (delete-char 1) - (insert "+") - (put-text-property point (point) 'riece-addon addon)))))) + (when (eq major-mode 'riece-addon-list-mode) + (riece-command-list-addons) + (let ((point (point-min))) + (while (not (eq (get-text-property point 'riece-addon) addon) + (setq point (next-single-property-change point + 'riece-addon)))) + (if point + (goto-char point))))) (defun riece-command-disable-addon (addon) (interactive @@ -346,18 +342,14 @@ Useful keys: (symbol-value enabled)))) t))))) (riece-disable-addon addon t) - (let ((enabled (intern-soft (concat (symbol-name addon) "-enabled")))) - (if (and (eq major-mode 'riece-addon-list-mode) - (get-text-property (point) 'riece-addon) - enabled (null (symbol-value enabled))) - (save-excursion - (beginning-of-line) - (let ((point (point)) - (inhibit-read-only t) - buffer-read-only) - (delete-char 1) - (insert "-") - (put-text-property point (point) 'riece-addon addon)))))) + (when (eq major-mode 'riece-addon-list-mode) + (riece-command-list-addons) + (let ((point (point-min))) + (while (not (eq (get-text-property point 'riece-addon) addon) + (setq point (next-single-property-change point + 'riece-addon)))) + (if point + (goto-char point))))) (provide 'riece-addon)