Mercurial > emacs
changeset 33300:cae923af5a5d
Wrap subst-char-in-string def in eval-and-compile.
(gnus-intersection, gnus-sorted-complement): Autoload.
author | Dave Love <fx@gnu.org> |
---|---|
date | Wed, 08 Nov 2000 15:35:07 +0000 |
parents | be95f43e08db |
children | c1c373a70748 |
files | lisp/gnus/nnheader.el |
diffstat | 1 files changed, 18 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/gnus/nnheader.el Wed Nov 08 15:32:11 2000 +0000 +++ b/lisp/gnus/nnheader.el Wed Nov 08 15:35:07 2000 +0000 @@ -34,6 +34,9 @@ (require 'mail-utils) (require 'mm-util) +(eval-and-compile + (autoload 'gnus-intersection "gnus-range") + (autoload 'gnus-sorted-complement "gnus-range")) (defvar nnheader-max-head-length 4096 "*Max length of the head of articles.") @@ -693,20 +696,21 @@ (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))) +(eval-and-compile + (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)))) (defun nnheader-replace-duplicate-chars-in-string (string from to) "Replace characters in STRING from FROM to TO."