* 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.
(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")
((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"))))))
(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))
(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)
(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 ()
(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))))
(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)) ""))))
(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 ""))))