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
255359cb
Commit
255359cb
authored
Dec 21, 1997
by
Richard M. Stallman
Browse files
(define-mail-alias): Handle backslash-quoting
within "-strings in DEFINITION if it comes from .mailrc.
parent
7317d9e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
lisp/mail/mailalias.el
lisp/mail/mailalias.el
+18
-6
No files found.
lisp/mail/mailalias.el
View file @
255359cb
...
...
@@ -317,21 +317,33 @@ if it is quoted with double-quotes."
;; If DEFINITION is null string, avoid looping even once.
(
start
(
and
(
not
(
equal
definition
""
))
0
))
(
L
(
length
definition
))
convert-backslash
end
tem
)
(
while
start
(
setq
convert-backslash
nil
)
;; If we're reading from the mailrc file, then addresses are delimited
;; by spaces, and addresses with embedded spaces must be surrounded by
;; double-quotes. Otherwise, addresses are separated by commas.
(
if
from-mailrc-file
(
if
(
eq
?\"
(
aref
definition
start
))
(
setq
start
(
1+
start
)
end
(
string-match
"\"[ \t,]*"
definition
start
))
(
progn
(
string-match
"[^\\]\\(\\([\\][\\]\\)*\\)\"[ \t,]*"
definition
start
)
(
setq
start
(
1+
start
)
end
(
match-end
1
)
convert-backslash
t
))
(
setq
end
(
string-match
"[ \t,]+"
definition
start
)))
(
setq
end
(
string-match
"[ \t\n,]*,[ \t\n,]*"
definition
start
)))
(
setq
result
(
cons
(
substring
definition
start
end
)
result
))
(
setq
start
(
and
end
(
/=
(
match-end
0
)
L
)
(
match-end
0
))))
(
let
((
temp
(
substring
definition
start
end
))
(
pos
0
))
(
setq
start
(
and
end
(
/=
(
match-end
0
)
L
)
(
match-end
0
)))
(
if
convert-backslash
(
while
(
string-match
"[\\]"
temp
pos
)
(
setq
temp
(
replace-match
""
t
t
temp
))
(
if
start
(
setq
start
(
1-
start
)))
(
setq
pos
(
match-end
0
))))
(
setq
result
(
cons
temp
result
))))
(
setq
definition
(
mapconcat
(
function
identity
)
(
nreverse
result
)
", "
))
...
...
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