* mm-util.el (mm-subst-char-in-string): New function.
(mm-replace-chars-in-string): Use it.
* message.el (message-replace-chars-in-string): Use it.
* nnheader.el (nnheader-replace-chars-in-string): Use it.
* gnus-mh.el (mh-lib-progs): Shut up.
+2000-11-04 13:08:02 ShengHuo ZHU <zsh@cs.rochester.edu>
+
+ * mm-util.el (mm-subst-char-in-string): New function.
+ (mm-replace-chars-in-string): Use it.
+ * message.el (message-replace-chars-in-string): Use it.
+ * nnheader.el (nnheader-replace-chars-in-string): Use it.
+ * gnus-mh.el (mh-lib-progs): Shut up.
+
2000-11-04 ShengHuo Zhu <zsh@cs.rochester.edu>
* base64.el, md5.el: Moved to contrib directory.
(require 'gnus-msg)
(require 'gnus-sum)
+(eval-when-compile
+ (defvar mh-lib-progs))
+
(defun gnus-summary-save-article-folder (&optional arg)
"Append the current article to an mh folder.
If N is a positive number, save the N next articles.
(eval-when-compile
(require 'cl)
(defvar gnus-list-identifiers)) ; gnus-sum is required where necessary
+
(require 'mailheader)
(require 'nnheader)
;; This is apparently necessary even though things are autoloaded:
;;; Miscellaneous functions
-;; stolen (and renamed) from nnheader.el
-(if (fboundp 'subst-char-in-string)
- (defsubst message-replace-chars-in-string (string from to)
- (subst-char-in-string from to string))
- (defun message-replace-chars-in-string (string from to)
- "Replace characters in STRING from FROM to TO."
- (let ((string (substring string 0)) ;Copy string.
- (len (length string))
- (idx 0))
- ;; Replace all occurrences of FROM with TO.
- (while (< idx len)
- (when (= (aref string idx) from)
- (aset string idx to))
- (setq idx (1+ idx)))
- string)))
+(defsubst message-replace-chars-in-string (string from to)
+ (mm-subst-char-in-string from to string))
;;;
;;; MIME functions
prompt
(mapcar (lambda (e) (list (symbol-name (car e))))
mm-mime-mule-charset-alist)
- nil t)))))))
+ nil t))))
+ (subst-char-in-string
+ . (lambda (from to string) ;; stolen (and renamed) from nnheader.el
+ "Replace characters in STRING from FROM to TO."
+ (let ((string (substring string 0)) ;Copy string.
+ (len (length string))
+ (idx 0))
+ ;; Replace all occurrences of FROM with TO.
+ (while (< idx len)
+ (when (= (aref string idx) from)
+ (aset string idx to))
+ (setq idx (1+ idx)))
+ string)))
+ )))
(eval-and-compile
(defalias 'mm-char-or-char-int-p
(t
nil)))
-(if (fboundp 'subst-char-in-string)
- (defsubst mm-replace-chars-in-string (string from to)
- (subst-char-in-string from to string))
- (defun mm-replace-chars-in-string (string from to)
- "Replace characters in STRING from FROM to TO."
- (let ((string (substring string 0)) ;Copy string.
- (len (length string))
- (idx 0))
- ;; Replace all occurrences of FROM with TO.
- (while (< idx len)
- (when (= (aref string idx) from)
- (aset string idx to))
- (setq idx (1+ idx)))
- string)))
+(defsubst mm-replace-chars-in-string (string from to)
+ (mm-subst-char-in-string from to string))
(defsubst mm-enable-multibyte ()
"Enable multibyte in the current buffer."
(apply 'insert format args))
t))
-(if (fboundp 'subst-char-in-string)
- (defsubst nnheader-replace-chars-in-string (string from to)
- (subst-char-in-string from to string))
- (defun nnheader-replace-chars-in-string (string from to)
- "Replace characters in STRING from FROM to TO."
- (let ((string (substring string 0)) ;Copy string.
- (len (length string))
- (idx 0))
- ;; Replace all occurrences of FROM with TO.
- (while (< idx len)
- (when (= (aref string idx) from)
- (aset string idx to))
- (setq idx (1+ idx)))
- string)))
+(defsubst nnheader-replace-chars-in-string (string from to)
+ (mm-subst-char-in-string from to string))
(defun nnheader-replace-duplicate-chars-in-string (string from to)
"Replace characters in STRING from FROM to TO."