(require 'riece-compat)
(require 'riece-misc)
(require 'riece-addon-modules)
+(require 'riece-mcat)
(defgroup riece-addon-list nil
"Add-on listing."
(defun riece-insinuate-addon-1 (addon verbose)
(if (get addon 'riece-addon-insinuated)
(if verbose
- (message "Add-on %S is already insinuated" addon))
+ (message (riece-mcat "Add-on %S is already insinuated") addon))
(require addon)
(funcall (intern (concat (symbol-name addon) "-insinuate")))
(put addon 'riece-addon-insinuated t)
(if verbose
- (message "Add-on %S is insinuated" addon))
+ (message (riece-mcat "Add-on %S is insinuated") addon))
(unless (get addon 'riece-addon-default-disabled)
(riece-enable-addon addon t))))
(setq addons (nreverse addons))
(if (and (> (length addons) 1)
(eq verbose 'ask)
- (not (y-or-n-p (format "%s will be insinuated. Continue? "
+ (not (y-or-n-p (format (riece-mcat
+ "%s will be insinuated. Continue? ")
(mapconcat #'symbol-name addons ", ")))))
(error "Insinuate operation was cancelled"))
(while addons
(defun riece-uninstall-addon (addon &optional verbose)
(if (not (get addon 'riece-addon-insinuated))
(if verbose
- (message "Add-on %S is not insinuated" addon))
+ (message (riece-mcat "Add-on %S is not insinuated") addon))
(let ((entry (assq addon riece-addon-dependencies))
(uninstall (intern-soft (concat (symbol-name addon) "-uninstall"))))
(if entry
(riece-resolve-addons
(delq addon (mapcar #'car riece-addon-dependencies))))))
(if verbose
- (message "Add-on %S is uninstalled" addon)))))
+ (message (riece-mcat "Add-on %S is uninstalled") addon)))))
(defun riece-enable-addon (addon &optional verbose)
(unless (get addon 'riece-addon-insinuated)
(error "Add-on %S is not insinuated" addon))
(if (get addon 'riece-addon-enabled)
(if verbose
- (message "Add-on %S is already enabled" addon))
+ (message (riece-mcat "Add-on %S is already enabled") addon))
(let ((enable (intern-soft (concat (symbol-name addon) "-enable"))))
(if (and enable
(fboundp enable))
(funcall enable))
(put addon 'riece-addon-enabled t)
(if verbose
- (message "Add-on %S enabled" addon)))))
+ (message (riece-mcat "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))
(if (not (get addon 'riece-addon-enabled))
(if verbose
- (message "Add-on %S is already disabled" addon))
+ (message (riece-mcat "Add-on %S is already disabled") addon))
(let ((disable (intern-soft (concat (symbol-name addon) "-disable"))))
(if (and disable
(fboundp disable))
(funcall disable))
(put addon 'riece-addon-enabled nil)
(if verbose
- (message "Add-on %S disabled" addon)))))
+ (message (riece-mcat "Add-on %S disabled") addon)))))
(put 'riece-addon-list-mode 'font-lock-defaults
'(riece-addon-list-font-lock-keywords t))
(if (and description
(boundp description))
(symbol-value description)
- "(no description)"))
+ (riece-mcat "(no description)")))
module-description-alist)
pointer (cdr pointer)))
(setq pointer riece-addon-modules)
(cdr (car pointer))))
(put-text-property point (point) 'riece-addon (car (car pointer)))
(setq pointer (cdr pointer)))
- (insert "
+ (insert (riece-mcat "
Symbols in the leftmost column:
+ The add-on is enabled.
- The add-on is disabled.
? The add-on is not insinuated.
The add-on is not loaded.
-")
- (insert (substitute-command-keys "
+"))
+ (insert (substitute-command-keys (riece-mcat "
Useful keys:
`\\[riece-command-enable-addon]' to enable the current add-on.
`\\[riece-command-uninstall-addon]' to uninstall the current add-on.
`\\[riece-command-unload-addon]' to unload the current add-on.
`\\[riece-command-save-variables]' to save the current setting.
-"))
+")))
(goto-char (point-min))
(pop-to-buffer (current-buffer))
(delete-other-windows)))
(or (if (eq major-mode 'riece-addon-list-mode)
(get-text-property (point) 'riece-addon))
(intern-soft
- (completing-read "Add-on: "
+ (completing-read (riece-mcat "Add-on: ")
(mapcar (lambda (dependency)
(list (symbol-name (car dependency))))
riece-addon-dependencies)
(or (if (eq major-mode 'riece-addon-list-mode)
(get-text-property (point) 'riece-addon))
(intern-soft
- (completing-read "Add-on: "
+ (completing-read (riece-mcat "Add-on: ")
(mapcar (lambda (dependency)
(list (symbol-name (car dependency))))
riece-addon-dependencies)
(or (if (eq major-mode 'riece-addon-list-mode)
(get-text-property (point) 'riece-addon))
(intern-soft
- (completing-read "Add-on: "
+ (completing-read (riece-mcat "Add-on: ")
(mapcar (lambda (dependency)
(list (symbol-name (car dependency))))
riece-addon-modules)
(or (if (eq major-mode 'riece-addon-list-mode)
(get-text-property (point) 'riece-addon))
(intern-soft
- (completing-read "Add-on: "
+ (completing-read (riece-mcat "Add-on: ")
(mapcar (lambda (dependency)
(list (symbol-name (car dependency))))
riece-addon-dependencies)
(or (if (eq major-mode 'riece-addon-list-mode)
(get-text-property (point) 'riece-addon))
(intern-soft
- (completing-read "Add-on: "
+ (completing-read (riece-mcat "Add-on: ")
(mapcar (lambda (dependency)
(list (symbol-name (car dependency))))
riece-addon-dependencies)
t)))))
(riece-uninstall-addon addon t)
(if (get addon 'riece-addon-not-unloadable)
- (message "Add-on %S is not allowed to unload" addon)
+ (message (riece-mcat "Add-on %S is not allowed to unload") addon)
(unload-feature addon)
- (message "Add-on %S is unloaded" addon))
+ (message (riece-mcat "Add-on %S is unloaded") addon))
(when (eq major-mode 'riece-addon-list-mode)
(riece-command-list-addons)
(riece-addon-list-set-point addon)))
;;; Code:
(defconst riece-mcat-japanese-alist
- '(("%2d: %s %s (%d bytes)\n" . "%2d: %s %s (%d \e$B%P%$%H\e(B)\n")
+ '(("\nSymbols in the leftmost column:\n\n + The add-on is enabled.\n - The add-on is disabled.\n ? The add-on is not insinuated.\n The add-on is not loaded.\n" . "\n\e$B:8C<$N%7%s%\%k\e(B:\n\n + \e$BM-8z$J%"%I%*%s\e(B\n - \e$BL58z$J%"%I%*%s\e(B\n ? \e$B@_Dj$KAH$_9~$^$l$F$$$J$$%"%I%*%s\e(B\n \e$B%m!<%I$5$l$F$$$J$$%"%I%*%s\e(B\n")
+ ("\nUseful keys:\n\n `\\[riece-command-enable-addon]' to enable the current add-on.\n `\\[riece-command-disable-addon]' to disable the current add-on.\n `\\[riece-command-insinuate-addon]' to insinuate the current add-on.\n `\\[riece-command-uninstall-addon]' to uninstall the current add-on.\n `\\[riece-command-unload-addon]' to unload the current add-on.\n `\\[riece-command-save-variables]' to save the current setting.\n" . "\n\e$BJXMx$J%-!<\e(B:\n\n `\\[riece-command-enable-addon]' \e$B%"%I%*%s$rM-8z2=\e(B\n `\\[riece-command-disable-addon]' \e$B%"%I%*%s$rL58z2=\e(B\n `\\[riece-command-insinuate-addon]' \e$B%"%I%*%s$rAH$_9~$_\e(B\n `\\[riece-command-uninstall-addon]' \e$B%"%I%*%s$N=|30\e(B\n `\\[riece-command-unload-addon]' \e$B%"%I%*%s$r%"%s%m!<%I\e(B\n `\\[riece-command-save-variables]' \e$B@_Dj$rJ]B8\e(B\n")
+ ("%2d: %s %s (%d bytes)\n" . "%2d: %s %s (%d \e$B%P%$%H\e(B)\n")
("%S: switch to %s; down-mouse-3: more options" . "%S: %s \e$B$K0\F0\e(B; down-mouse-3: \e$B$=$NB>$N%*%W%7%g%s\e(B")
("%d users on %s: " . "%d \e$B?M$,\e(B %s \e$B$K$$$^$9\e(B: ")
("%d users: " . "%d \e$B?M\e(B: ")
("%s kicked %s out from %s\n" . "%s \e$B$,\e(B %s \e$B$r\e(B %s \e$B$+$i=3$j=P$7$^$7$?\e(B\n")
("%s killed %s" . "%s \e$B$,\e(B %s \e$B$r\e(B KILL \e$B$7$^$7$?\e(B")
("%s users, topic: %s\n" . "%s \e$B?M!"%H%T%C%/\e(B: %s\n")
+ ("%s will be insinuated. Continue? " . "%s \e$B$OAH$_9~$^$l$F$$$^$;$s!#B39T$7$^$9$+\e(B? ")
("%s: %s users, topic: %s" . "%s: %s \e$B?M!"%H%T%C%/\e(B: %s\n")
+ ("(no description)" . "(\e$B@bL@$J$7\e(B)")
+ ("Add-on %S disabled" . "\e$B%"%I%*%s\e(B %S \e$B$,L58z$K$J$j$^$7$?\e(B")
+ ("Add-on %S enabled" . "\e$B%"%I%*%s\e(B %S \e$B$,M-8z$K$J$j$^$7$?\e(B")
+ ("Add-on %S is already disabled" . "\e$B%"%I%*%s\e(B %S \e$B$O4{$KL58z$G$9\e(B")
+ ("Add-on %S is already enabled" . "\e$B%"%I%*%s\e(B %S \e$B$O4{$KM-8z$G$9\e(B")
+ ("Add-on %S is already insinuated" . "\e$B%"%I%*%s\e(B %S \e$B$O4{$KAH$_9~$^$l$F$$$^$9\e(B")
+ ("Add-on %S is insinuated" . "\e$B%"%I%*%s\e(B %S \e$B$,AH$_9~$^$l$^$7$?\e(B")
+ ("Add-on %S is not allowed to unload" . "\e$B%"%I%*%s\e(B %S \e$B$O%"%s%m!<%I$G$-$^$;$s\e(B")
+ ("Add-on %S is not insinuated" . "\e$B%"%I%*%s\e(B %S \e$B$OAH$_9~$^$l$F$$$^$;$s\e(B")
+ ("Add-on %S is uninstalled" . "\e$B%"%I%*%s\e(B %S \e$B$,=|30$5$l$^$7$?\e(B")
+ ("Add-on %S is unloaded" . "\e$B%"%I%*%s\e(B %S \e$B$,%"%s%m!<%I$5$l$^$7$?\e(B")
+ ("Add-on: " . "\e$B%"%I%*%s\e(B: ")
("Already registered" . "\e$BEPO?:Q$_$G$9\e(B")
("Away message: " . "\e$BN%@J$N%a%C%;!<%8\e(B: ")
("Beginning of buffer" . "\e$B%P%C%U%!$N@hF,$G$9\e(B")