From: ueno Date: Tue, 19 Mar 2002 03:31:34 +0000 (+0000) Subject: After ben-mule-21-5 merged in, `string-to-char-list' was eliminated. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b67d4e88ab77de32b11eccb1cb2d3bdada7480a;p=elisp%2Fliece.git After ben-mule-21-5 merged in, `string-to-char-list' was eliminated. * liece-compat.el (liece-string-to-list): New definition. * liece-000.el (liece-handle-004-message): Use it. * liece-nick.el (liece-nick-remove-mode): Use it. * liece-channel.el (liece-channel-read-mode): Use it. * liece-handle.el (liece-handle-mode-message): Use it. * gettext.el: Require `poem' and `static'. (gettext-string-to-list): New definition. --- diff --git a/lisp/gettext.el b/lisp/gettext.el index cee7312..49fe10d 100644 --- a/lisp/gettext.el +++ b/lisp/gettext.el @@ -31,11 +31,18 @@ (eval-when-compile (require 'cl)) (require 'mcharset) +(require 'static) +(require 'poem) (eval-and-compile (autoload 'mime-content-type-parameter "mime-parse") (autoload 'mime-read-Content-Type "mime-parse")) +(static-if (fboundp 'string-to-list) + (defalias 'gettext-string-to-list 'string-to-list) + ;; Rely on `string-to-char-list' emulation is provided in poem. + (defalias 'gettext-string-to-list 'string-to-char-list)) + (defvar gettext-gmo-endian 1234) (defvar gettext-message-domain-to-catalog-alist nil) (defvar gettext-default-message-domain "emacs") diff --git a/lisp/liece-000.el b/lisp/liece-000.el index f7cc798..528e545 100644 --- a/lisp/liece-000.el +++ b/lisp/liece-000.el @@ -105,10 +105,10 @@ ((string-match "[^ ]* [^ ]* \\([^ ]+\\) \\(.*\\)" rest) (setq liece-supported-user-mode-alist (char-list-to-string-alist - (string-to-char-list (match-string 1 rest))) + (liece-string-to-list (match-string 1 rest))) liece-supported-channel-mode-alist (char-list-to-string-alist - (string-to-char-list (match-string 2 rest))))) + (liece-string-to-list (match-string 2 rest))))) (t (liece-insert-info liece-000-buffer (concat rest "\n")))))) diff --git a/lisp/liece-channel.el b/lisp/liece-channel.el index 89e8244..e2fd430 100644 --- a/lisp/liece-channel.el +++ b/lisp/liece-channel.el @@ -137,7 +137,7 @@ (defmacro liece-channel-add-mode (mode &optional chnl) "Add MODE as char to CHNL." - `(let ((modes (string-to-char-list (or (liece-channel-get-modes ,chnl) + `(let ((modes (liece-string-to-list (or (liece-channel-get-modes ,chnl) "")))) (or (memq ,mode modes) (push ,mode modes)) @@ -146,7 +146,7 @@ (defmacro liece-channel-remove-mode (mode &optional chnl) "Remove MODE as char to CHNL." - `(let ((modes (string-to-char-list (or (liece-channel-get-modes ,chnl) + `(let ((modes (liece-string-to-list (or (liece-channel-get-modes ,chnl) "")))) (delq ,mode modes) (put (intern (or ,chnl liece-current-channel) liece-obarray) diff --git a/lisp/liece-compat.el b/lisp/liece-compat.el index 58568b2..7ed1a87 100644 --- a/lisp/liece-compat.el +++ b/lisp/liece-compat.el @@ -65,6 +65,11 @@ Otherwise, this function always returns false. (defalias 'liece-window-height 'window-displayed-height) (defalias 'liece-window-height 'window-height)) +(static-if (fboundp 'string-to-list) + (defalias 'liece-string-to-list 'string-to-list) + ;; Rely on `string-to-char-list' emulation is provided in poem. + (defalias 'liece-string-to-list 'string-to-char-list)) + (defalias 'liece-mode-line-buffer-identification 'identity) (defun liece-suppress-mode-line-format () diff --git a/lisp/liece-handle.el b/lisp/liece-handle.el index a2866ec..b0238eb 100644 --- a/lisp/liece-handle.el +++ b/lisp/liece-handle.el @@ -281,7 +281,7 @@ (when (string-match "\\([^ ]*\\) +" str) (setq mflag (match-string 1 str) marg (substring str (match-end 0)) - mflags (string-to-char-list mflag)) + mflags (liece-string-to-list mflag)) (while (string-match "^\\([^ ]*\\) +" marg) (setq margs (cons (match-string 1 marg) margs) marg (substring marg (match-end 0)))) diff --git a/lisp/liece-nick.el b/lisp/liece-nick.el index 570c47d..93dfe51 100644 --- a/lisp/liece-nick.el +++ b/lisp/liece-nick.el @@ -88,7 +88,7 @@ (defmacro liece-nick-add-mode (mode &optional nick) "Add MODE as char to NICK." `(let* ((n (intern ,nick liece-obarray)) - (modes (string-to-char-list (or (get n 'mode) "")))) + (modes (liece-string-to-list (or (get n 'mode) "")))) (put n 'mode (mapconcat #'char-to-string (or (memq ,mode modes) (cons ,mode modes)) "")))) @@ -96,7 +96,7 @@ (defmacro liece-nick-remove-mode (mode &optional nick) "Remove MODE as char to NICK." `(let* ((n (intern ,nick liece-obarray)) - (modes (string-to-char-list (or (get n 'mode) "")))) + (modes (liece-string-to-list (or (get n 'mode) "")))) (delq ,mode modes) (put n 'mode (mapconcat #'char-to-string modes ""))))