* riece-addon.el: Require 'riece-addon-modules.
authorueno <ueno>
Fri, 26 Aug 2005 06:04:44 +0000 (06:04 +0000)
committerueno <ueno>
Fri, 26 Aug 2005 06:04:44 +0000 (06:04 +0000)
(riece-command-list-addons): List all available add-ons from
riece-addon-modules.

* COMPILE (riece-examine-modules): New function.
(riece-examine): Use it.
(riece-compile): Use it.
(riece-install): Use it.
(riece-compile-package): Use it.
(riece-install-package): Use it.

lisp/COMPILE
lisp/ChangeLog
lisp/riece-addon.el

index aecda24..1576401 100644 (file)
@@ -1,56 +1,52 @@
 ;;; -*- Emacs-Lisp -*-
 
-(require 'riece-addon-modules)
-
 (defvar riece-modules
-  (nconc
-   (cons 'riece-compat
-        (cons (if (featurep 'xemacs)
-                  'riece-xemacs
-                'riece-emacs)
-              '(riece-globals
-                riece-options
-                riece-debug
-                riece-version
-                riece-coding
-                riece-complete
-                riece-addon-modules
-                riece-addon
-                riece-ruby
-
-                riece-mode
-                ;; riece-identity -+-> riece-channel
-                ;;                 +-> riece-user
-                riece-identity
-                riece-channel
-                riece-user
-
-                riece-misc
-                riece-signal
-
-                ;; riece-layout ---> riece-display
-                riece-layout
-                riece-display
-                riece-server
-
-                ;; riece-channel -+-> riece-naming
-                ;; riece-user    -+
-                riece-naming
-                riece-message
-
-                ;; riece-filter calls riece-{handle,000,200,300,400,500}
-                riece-filter
-                riece-handle
-                riece-000
-                riece-200
-                riece-300
-                riece-400
-                riece-500
-
-                riece-commands
-                riece-irc
-                riece)))
-   (mapcar #'car riece-addon-modules)))
+  (cons 'riece-compat
+       (cons (if (featurep 'xemacs)
+                 'riece-xemacs
+               'riece-emacs)
+             '(riece-globals
+               riece-options
+               riece-debug
+               riece-version
+               riece-coding
+               riece-complete
+               riece-addon-modules
+               riece-addon
+               riece-ruby
+
+               riece-mode
+               ;; riece-identity -+-> riece-channel
+               ;;                 +-> riece-user
+               riece-identity
+               riece-channel
+               riece-user
+
+               riece-misc
+               riece-signal
+
+               ;; riece-layout ---> riece-display
+               riece-layout
+               riece-display
+               riece-server
+
+               ;; riece-channel -+-> riece-naming
+               ;; riece-user    -+
+               riece-naming
+               riece-message
+
+               ;; riece-filter calls riece-{handle,000,200,300,400,500}
+               riece-filter
+               riece-handle
+               riece-000
+               riece-200
+               riece-300
+               riece-400
+               riece-500
+
+               riece-commands
+               riece-irc
+               riece))))
 
 (defvar riece-icons
   '("riece-command-quit.xpm"
@@ -66,8 +62,7 @@
     "aproxy.rb"))
 
 (defun riece-compile-modules (modules)
-  (let ((load-path (cons nil load-path))
-       error-modules)
+  (let (error-modules)
     (while modules
       (let ((source (expand-file-name
                     (concat (symbol-name (car modules)) ".el"))))
     (if flag
        (string-match "^\\(\\(--[^ ]+ \\)+-\\|[^ =-]\\)*n" flag))))
 
+(defun riece-examine-modules ()
+  (let ((load-path (cons nil load-path)))
+    (require 'riece-addon-modules)
+    (append riece-modules
+           (mapcar #'car riece-addon-modules))))
+
 (defun riece-examine ()
-  (princ (mapconcat #'symbol-name riece-modules " ")))
+  (princ (mapconcat #'symbol-name (riece-examine-modules) " ")))
 
 (defun riece-compile ()
-  (riece-compile-modules riece-modules))
+  (riece-compile-modules (riece-examine-modules)))
 
 (defun riece-install ()
   (riece-install-modules
-   riece-modules
+   (riece-examine-modules)
    (expand-file-name "riece" (car command-line-args-left))
    (riece-install-just-print-p))
   (riece-install-icons
   (add-to-list 'command-line-args-left ".")
   (Custom-make-dependencies)
   (riece-compile-modules
-   (append riece-modules
+   (append (riece-examine-modules)
           '(auto-autoloads custom-load))))
 
 (defun riece-install-package ()
   (riece-install-modules
-   (append riece-modules
+   (append (riece-examine-modules)
           '(auto-autoloads custom-load))
    (expand-file-name "lisp/riece" (car command-line-args-left))
    (riece-install-just-print-p))
index 217fcb5..b64b161 100644 (file)
@@ -1,7 +1,15 @@
 2005-08-26  Daiki Ueno  <ueno@unixuser.org>
 
-       * COMPILE: Require 'riece-addon-modules.
-       (riece-modules): Added riece-addon-modules.
+       * riece-addon.el: Require 'riece-addon-modules.
+       (riece-command-list-addons): List all available add-ons from
+       riece-addon-modules.
+
+       * COMPILE (riece-examine-modules): New function.
+       (riece-examine): Use it.
+       (riece-compile): Use it.
+       (riece-install): Use it.
+       (riece-compile-package): Use it.
+       (riece-install-package): Use it.
 
        * Makefile.am (EXTRA_DIST): Added riece-addon-modules.el.
 
index 68a99b9..c5fb4e1 100644 (file)
@@ -28,6 +28,7 @@
 (require 'riece-options)
 (require 'riece-compat)
 (require 'riece-misc)
+(require 'riece-addon-modules)
 
 (defgroup riece-addon-list nil
   "Add-on listing."
@@ -279,18 +280,33 @@ All normal editing commands are turned off."
   (riece-addon-list-mode)
   (let ((inhibit-read-only t)
        buffer-read-only
-       (pointer (sort (copy-sequence riece-addon-dependencies)
-                      (lambda (dependency1 dependency2)
-                        (string-lessp (symbol-name (car dependency1))
-                                      (symbol-name (car dependency2))))))
-       enabled description point)
+       (pointer riece-addon-dependencies)
+       module-description-alist
+       description enabled point)
+    (while pointer
+      
+      (setq description (intern-soft (concat (symbol-name (car (car pointer)))
+                                            "-description"))
+           module-description-alist
+           (cons (cons (car (car pointer))
+                       (if description
+                           (symbol-value description)
+                         "(no description)"))
+                 module-description-alist)
+           pointer (cdr pointer)))
+    (setq pointer riece-addon-modules)
+    (while pointer
+      (unless (assq (car (car pointer))
+                   module-description-alist)
+       (setq module-description-alist
+             (cons (car pointer) module-description-alist)))
+      (setq pointer (cdr pointer)))
     (erase-buffer)
     (riece-kill-all-overlays)
+    (setq pointer module-description-alist)
     (while pointer
       (setq enabled (intern-soft (concat (symbol-name (car (car pointer)))
-                                        "-enabled"))
-           description (intern-soft (concat (symbol-name (car (car pointer)))
-                                            "-description")))
+                                        "-enabled")))
       (setq point (point))
       (insert (format "%c %S: %s\n"
                      (if (not (featurep (car (car pointer))))
@@ -301,9 +317,7 @@ All normal editing commands are turned off."
                              ?+
                            ?-)))
                      (car (car pointer))
-                     (if description
-                         (symbol-value description)
-                       "(no description)")))
+                     description))
       (put-text-property point (point) 'riece-addon (car (car pointer)))
       (setq pointer (cdr pointer)))
     (insert "