Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
9e153fef
Commit
9e153fef
authored
Nov 08, 2000
by
Dave Love
Browse files
Wrap subst-char-in-string def in eval-and-compile.
(gnus-intersection, gnus-sorted-complement): Autoload.
parent
2d5fdf63
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
14 deletions
+18
-14
lisp/gnus/nnheader.el
lisp/gnus/nnheader.el
+18
-14
No files found.
lisp/gnus/nnheader.el
View file @
9e153fef
...
...
@@ -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 @@ without formatting."
(
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."
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment