* riece-mcat-japanese.el: New file.
* COMPILE (riece-modules): Added riece-mcat and riece-mcat-japanese.
* Makefile.am (EXTRA_DIST): Added riece-mcat.el and
riece-mcat-japanese.el.
riece-version
riece-coding
riece-complete
+ riece-mcat
riece-addon-modules
riece-addon
riece-ruby
riece-commands
riece-irc
- riece))))
+ riece
+ riece-mcat-japanese))))
(defvar riece-icons
'("riece-command-quit.xpm"
+2007-01-18 Daiki Ueno <ueno@unixuser.org>
+
+ * riece-mcat.el: New file.
+ * riece-mcat-japanese.el: New file.
+ * COMPILE (riece-modules): Added riece-mcat and riece-mcat-japanese.
+ * Makefile.am (EXTRA_DIST): Added riece-mcat.el and
+ riece-mcat-japanese.el.
+
2006-12-18 Daiki Ueno <ueno@unixuser.org>
* riece-package-info.el.in: New file.
riece-coding.el riece-commands.el riece-compat.el riece-complete.el \
riece-debug.el riece-display.el riece-emacs.el riece-filter.el \
riece-globals.el riece-handle.el riece-highlight.el riece-identity.el \
- riece-message.el riece-misc.el riece-mode.el riece-naming.el \
- riece-options.el riece-ruby.el riece-server.el riece-signal.el \
- riece-user.el riece-version.el riece-xemacs.el riece-irc.el riece.el \
+ riece-mcat.el riece-message.el riece-misc.el riece-mode.el \
+ riece-naming.el riece-options.el riece-ruby.el riece-server.el \
+ riece-signal.el riece-user.el riece-version.el riece-xemacs.el \
+ riece-irc.el riece.el \
+ riece-mcat-japanese.el \
riece-ctcp.el riece-url.el riece-unread.el riece-ndcc.el \
riece-rdcc.el riece-log.el riece-mini.el riece-doctor.el \
riece-alias.el riece-layout.el riece-skk-kakutei.el riece-guess.el \
(require 'riece-misc)
(require 'riece-identity)
(require 'riece-message)
+(require 'riece-mcat)
(autoload 'derived-mode-class "derived")
(progn
(message "No server process")
(ding))
- (if (y-or-n-p "Really quit IRC? ")
+ (if (y-or-n-p (riece-mcat "Really quit IRC? "))
(let ((message
(if arg
(read-string "Message: ")
--- /dev/null
+;;; -*- coding: iso-2022-jp -*-
+
+(defconst riece-mcat-japanese-alist
+ '(("Really quit IRC? " . "\e$BK\Ev$K\e(BIRC\e$B$r$d$a$^$9$+\e(B? ")))
+
+(provide 'riece-mcat-japanese)
--- /dev/null
+(defvar riece-mcat-alist
+ '(("Japanese" . riece-mcat-japanese)))
+
+(defun riece-mcat (string)
+ (let ((entry (assoc current-language-environment riece-mcat-alist)))
+ (when entry
+ (require (cdr entry))
+ (or (cdr (assoc string (symbol-value (intern
+ (concat (symbol-name (cdr entry))
+ "-alist")))))
+ string))))
+
+(defun riece-mcat-extract-from-form (form)
+ (if (and form (listp form))
+ (if (eq (car form) 'riece-mcat)
+ (cdr form)
+ (delq nil (apply #'nconc
+ (mapcar #'riece-mcat-extract-from-form form))))))
+
+(defun riece-mcat-extract (files alist)
+ (let (message-list pointer)
+ (while files
+ (save-excursion
+ (set-buffer (find-file-noselect (car files)))
+ (goto-char (point-min))
+ (while (progn
+ (while (progn (skip-chars-forward " \t\n\f")
+ (looking-at ";"))
+ (forward-line 1))
+ (not (eobp)))
+ (setq message-list
+ (nconc message-list
+ (riece-mcat-extract-from-form
+ (read (current-buffer)))))))
+ (setq files (cdr files)))
+ (setq message-list (sort message-list #'string-lessp)
+ pointer message-list)
+ (while pointer
+ (if (equal (car pointer)
+ (nth 1 pointer))
+ (setcdr pointer (nth 2 pointer))
+ (unless (assoc (car pointer) alist)
+ (setq alist (cons (list (car pointer)) alist))))
+ (setq pointer (cdr pointer)))
+ alist))
+
+(provide 'riece-mcat)