From 118c7ef282a861da0c37abea5fcbe2a74282da4f Mon Sep 17 00:00:00 2001 From: ueno Date: Sun, 28 Aug 2005 22:15:11 +0000 Subject: [PATCH] * riece-addon.el (riece-addon-list-unsupported-face): Abolished. (riece-addon-list-mark-face-alist): Removed unsupported mark. (riece-enable-addon): Add-on modules are not needed to provide riece-*-enable any more. (riece-disable-addon): Add-on modules are not needed to provide riece-*-disable any more. (riece-command-list-addons): Don't display unsupported mark. --- lisp/riece-addon.el | 73 +++++++++++++++---------------------------- lisp/riece-ctlseq.el | 6 ---- lisp/riece-doctor.el | 6 ---- lisp/riece-eval-ruby.el | 6 ---- lisp/riece-eval.el | 6 ---- lisp/riece-foolproof.el | 6 ---- lisp/riece-google.el | 6 ---- lisp/riece-hangman.el | 3 -- lisp/riece-keyword.el | 6 ---- lisp/riece-mini.el | 6 ---- lisp/riece-shrink-buffer.el | 6 ---- 11 files changed, 26 insertions(+), 104 deletions(-) diff --git a/lisp/riece-addon.el b/lisp/riece-addon.el index 8887394..bbced80 100644 --- a/lisp/riece-addon.el +++ b/lisp/riece-addon.el @@ -60,15 +60,6 @@ :group 'riece-addon-list-faces) (defvar riece-addon-list-disabled-face 'riece-addon-list-disabled-face) -(defface riece-addon-list-unsupported-face - '((((class color) (background dark)) - (:foreground "PaleTurquoise")) - (t - ())) - "Face used for displaying the unsupported addon." - :group 'riece-addon-list-faces) -(defvar riece-addon-list-unsupported-face 'riece-addon-list-unsupported-face) - (defface riece-addon-list-uninstalled-face '((t (:italic t))) @@ -99,7 +90,6 @@ (defcustom riece-addon-list-mark-face-alist '((?+ . riece-addon-list-enabled-face) (?- . riece-addon-list-disabled-face) - (?! . riece-addon-list-unsupported-face) (?? . riece-addon-list-uninstalled-face) (? . riece-addon-list-unloaded-face)) "An alist mapping marks on riece-addon-list-buffer to faces." @@ -107,7 +97,7 @@ :group 'riece-addon-list) (defcustom riece-addon-list-font-lock-keywords - '(("^\\([-+!? ] \\S-+\\)\\s-+\\(.*\\)" + '(("^\\([-+? ] \\S-+\\)\\s-+\\(.*\\)" (1 (cdr (assq (aref (match-string 1) 0) riece-addon-list-mark-face-alist))) (2 riece-addon-list-description-face))) @@ -276,35 +266,30 @@ (defun riece-enable-addon (addon &optional verbose) (unless (get addon 'riece-addon-insinuated) (error "Add-on %S is not insinuated" addon)) - (let ((enable (intern-soft (concat (symbol-name addon) "-enable")))) - (if (or (null enable) - (not (fboundp enable))) - (if verbose - (message "Add-on %S doesn't support enable/disable" addon)) - (if (get addon 'riece-addon-enabled) - (if verbose - (message "Add-on %S is already enabled" addon)) - (funcall enable) - (put addon 'riece-addon-enabled t) - (if verbose - (message "Add-on %S enabled" addon)))))) + (if (get addon 'riece-addon-enabled) + (if verbose + (message "Add-on %S is already enabled" addon)) + (let ((enable (intern-soft (concat (symbol-name addon) "-enable")))) + (if (or (null enable) + (not (fboundp enable))) + (funcall enable)) + (put addon 'riece-addon-enabled t) + (if verbose + (message "Add-on %S enabled" addon))))) (defun riece-disable-addon (addon &optional verbose) (unless (get addon 'riece-addon-insinuated) (error "Add-on %S is not insinuated" addon)) - (let ((disable (intern-soft (concat (symbol-name addon) "-disable")))) - (if (or (null disable) - (not (fboundp disable))) - (if verbose - (message "Add-on %S doesn't support enable/disable" addon)) - (if (get addon 'riece-addon-enabled) - (progn - (funcall disable) - (put addon 'riece-addon-enabled nil) - (if verbose - (message "Add-on %S disabled" addon))) - (if verbose - (message "Add-on %S is already enabled" addon)))))) + (if (not (get addon 'riece-addon-enabled)) + (if verbose + (message "Add-on %S is already disabled" addon)) + (let ((disable (intern-soft (concat (symbol-name addon) "-disable")))) + (if (or (null disable) + (not (fboundp disable))) + (funcall disable)) + (put addon 'riece-addon-enabled nil) + (if verbose + (message "Add-on %S disabled" addon))))) (put 'riece-addon-list-mode 'font-lock-defaults '(riece-addon-list-font-lock-keywords t)) @@ -336,7 +321,7 @@ All normal editing commands are turned off." buffer-read-only (pointer riece-addon-dependencies) module-description-alist - description enable point) + description point) (while pointer (setq description (intern-soft (concat (symbol-name (car (car pointer))) "-description")) @@ -362,8 +347,6 @@ All normal editing commands are turned off." (string-lessp (symbol-name (car entry1)) (symbol-name (car entry2)))))) (while pointer - (setq enable (intern-soft (concat (symbol-name (car (car pointer))) - "-enable"))) (setq point (point)) (insert (format "%c %-15S %s\n" (if (not (featurep (car (car pointer)))) @@ -371,12 +354,9 @@ All normal editing commands are turned off." (if (not (get (car (car pointer)) 'riece-addon-insinuated)) ?? - (if (or (null enable) - (not (fboundp enable))) - ?! - (if (get (car (car pointer)) 'riece-addon-enabled) - ?+ - ?-)))) + (if (get (car (car pointer)) 'riece-addon-enabled) + ?+ + ?-))) (car (car pointer)) (cdr (car pointer)))) (put-text-property point (point) 'riece-addon (car (car pointer))) @@ -386,7 +366,6 @@ Symbols in the leftmost column: + The add-on is enabled. - The add-on is disabled. - ! The add-on doesn't support enable/disable operation. ? The add-on is not insinuated. The add-on is not loaded. ") @@ -395,7 +374,7 @@ Useful keys: `\\[riece-command-enable-addon]' to enable the current add-on. `\\[riece-command-disable-addon]' to disable the current add-on. - `\\[riece-command-insinuate-addon]' to insinuate the add-on. + `\\[riece-command-insinuate-addon]' to insinuate the current add-on. `\\[riece-command-uninstall-addon]' to uninstall the current add-on. `\\[riece-command-unload-addon]' to unload the current add-on. ")) diff --git a/lisp/riece-ctlseq.el b/lisp/riece-ctlseq.el index 842c6a1..892a524 100644 --- a/lisp/riece-ctlseq.el +++ b/lisp/riece-ctlseq.el @@ -188,12 +188,6 @@ (defun riece-ctlseq-uninstall () (remove-hook 'riece-message-filter-functions 'riece-ctlseq-message-filter)) -(defun riece-ctlseq-enable () - ) - -(defun riece-ctlseq-disable () - ) - (provide 'riece-ctlseq) ;;; riece-ctlseq.el ends here diff --git a/lisp/riece-doctor.el b/lisp/riece-doctor.el index 941841d..4d9439b 100644 --- a/lisp/riece-doctor.el +++ b/lisp/riece-doctor.el @@ -127,12 +127,6 @@ Please, describe your problems." (defun riece-doctor-uninstall () (remove-hook 'riece-after-privmsg-hook 'riece-doctor-after-privmsg-hook)) -(defun riece-doctor-enable () - ) - -(defun riece-doctor-disable () - ) - (provide 'riece-doctor) ;;; riece-doctor.el ends here diff --git a/lisp/riece-eval-ruby.el b/lisp/riece-eval-ruby.el index a6c2315..925bc40 100644 --- a/lisp/riece-eval-ruby.el +++ b/lisp/riece-eval-ruby.el @@ -86,12 +86,6 @@ (remove-hook 'riece-after-display-message-functions 'riece-eval-ruby-display-message-function)) -(defun riece-eval-ruby-enable () - ) - -(defun riece-eval-ruby-disable () - ) - (provide 'riece-eval-ruby) ;;; riece-eval-ruby.el ends here diff --git a/lisp/riece-eval.el b/lisp/riece-eval.el index 71b308e..d90e8ee 100644 --- a/lisp/riece-eval.el +++ b/lisp/riece-eval.el @@ -89,12 +89,6 @@ (remove-hook 'riece-after-display-message-functions 'riece-eval-display-message-function)) -(defun riece-eval-enable () - ) - -(defun riece-eval-disable () - ) - (provide 'riece-eval) ;;; riece-eval.el ends here diff --git a/lisp/riece-foolproof.el b/lisp/riece-foolproof.el index 6c1a352..1889987 100644 --- a/lisp/riece-foolproof.el +++ b/lisp/riece-foolproof.el @@ -64,12 +64,6 @@ (remove-hook 'riece-command-send-message-hook 'riece-foolproof-command-send-message-function)) -(defun riece-foolproof-enable () - ) - -(defun riece-foolproof-disable () - ) - (provide 'riece-foolproof) ;;; riece-foolproof.el ends here diff --git a/lisp/riece-google.el b/lisp/riece-google.el index 368d431..a029d4e 100644 --- a/lisp/riece-google.el +++ b/lisp/riece-google.el @@ -236,12 +236,6 @@ end (remove-hook 'riece-after-display-message-functions 'riece-google-display-message-function)) -(defun riece-google-enable () - ) - -(defun riece-google-disable () - ) - (provide 'riece-google) ;;; riece-google.el ends here diff --git a/lisp/riece-hangman.el b/lisp/riece-hangman.el index a559c36..5aa821f 100644 --- a/lisp/riece-hangman.el +++ b/lisp/riece-hangman.el @@ -231,9 +231,6 @@ The wordlist is read from `riece-hangman-words-file'." (defun riece-hangman-enable () (random t)) -(defun riece-hangman-disable () - ) - (provide 'riece-hangman) ;;; riece-hangman.el ends here diff --git a/lisp/riece-keyword.el b/lisp/riece-keyword.el index 53415f6..1d70f4b 100644 --- a/lisp/riece-keyword.el +++ b/lisp/riece-keyword.el @@ -116,12 +116,6 @@ and the matched message object." (defun riece-keyword-uninstall () (remove-hook 'riece-message-filter-functions 'riece-keyword-message-filter)) -(defun riece-keyword-enable () - ) - -(defun riece-keyword-disable () - ) - (provide 'riece-keyword) ;;; riece-keyword.el ends here \ No newline at end of file diff --git a/lisp/riece-mini.el b/lisp/riece-mini.el index 99d4f33..44e9ff3 100644 --- a/lisp/riece-mini.el +++ b/lisp/riece-mini.el @@ -153,12 +153,6 @@ If twice (C-u C-u), then ask the channel." 'riece-mini-display-message-function) (remove-hook 'pre-command-hook 'riece-mini-pre-command)) -(defun riece-mini-enable () - ) - -(defun riece-mini-disable () - ) - (provide 'riece-mini) ;;; riece-mini.el ends here diff --git a/lisp/riece-shrink-buffer.el b/lisp/riece-shrink-buffer.el index 8fc0bfc..7b78b36 100644 --- a/lisp/riece-shrink-buffer.el +++ b/lisp/riece-shrink-buffer.el @@ -112,12 +112,6 @@ (remove-hook 'riece-exit-hook 'riece-shrink-buffer-exit-hook)) -(defun riece-shrink-buffer-enable () - ) - -(defun riece-shrink-buffer-disable () - ) - (provide 'riece-shrink-buffer) ;;; riece-shrink-buffer.el ends here -- 1.7.10.4