aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/gnus/ietf-drums.el
diff options
context:
space:
mode:
authorMiles Bader <[email protected]>2007-10-28 09:18:39 +0000
committerMiles Bader <[email protected]>2007-10-28 09:18:39 +0000
commit01c52d3165ffec363014bd9033ea2c317d32d6d6 (patch)
tree5d90be562d45a88f172483b9a33ab4ada197d772 /lisp/gnus/ietf-drums.el
parentccae01a639d69bc215e4af2835131cda3141e498 (diff)
Update Gnus to No Gnus 0.7 from the Gnus CVS trunk
Revision: [email protected]/emacs--devo--0--patch-911
Diffstat (limited to 'lisp/gnus/ietf-drums.el')
-rw-r--r--lisp/gnus/ietf-drums.el41
1 files changed, 27 insertions, 14 deletions
diff --git a/lisp/gnus/ietf-drums.el b/lisp/gnus/ietf-drums.el
index a02762804f..81d66aa309 100644
--- a/lisp/gnus/ietf-drums.el
+++ b/lisp/gnus/ietf-drums.el
@@ -99,14 +99,14 @@ backslash and doublequote.")
(push c out)))
(range
(while (<= b c)
- (push (mm-make-char 'ascii b) out)
+ (push (make-char 'ascii b) out)
(incf b))
(setq range nil))
((= i (length token))
- (push (mm-make-char 'ascii c) out))
+ (push (make-char 'ascii c) out))
(t
(when b
- (push (mm-make-char 'ascii b) out))
+ (push (make-char 'ascii b) out))
(setq b c))))
(nreverse out)))
@@ -200,7 +200,9 @@ backslash and doublequote.")
(buffer-substring
(1+ (point))
(progn (forward-sexp 1) (1- (point))))))))
- (t (error "Unknown symbol: %c" c))))
+ (t
+ (message "Unknown symbol: %c" c)
+ (forward-char 1))))
;; If we found no display-name, then we look for comments.
(if display-name
(setq display-string
@@ -213,8 +215,10 @@ backslash and doublequote.")
(ietf-drums-get-comment string)))
(cons mailbox display-string)))))
-(defun ietf-drums-parse-addresses (string)
- "Parse STRING and return a list of MAILBOX / DISPLAY-NAME pairs."
+(defun ietf-drums-parse-addresses (string &optional rawp)
+ "Parse STRING and return a list of MAILBOX / DISPLAY-NAME pairs.
+If RAWP, don't actually parse the addresses, but instead return
+a list of address strings."
(if (null string)
nil
(with-temp-buffer
@@ -231,20 +235,24 @@ backslash and doublequote.")
(skip-chars-forward "^,"))))
((eq c ?,)
(setq address
- (condition-case nil
- (ietf-drums-parse-address
- (buffer-substring beg (point)))
- (error nil)))
+ (if rawp
+ (buffer-substring beg (point))
+ (condition-case nil
+ (ietf-drums-parse-address
+ (buffer-substring beg (point)))
+ (error nil))))
(if address (push address pairs))
(forward-char 1)
(setq beg (point)))
(t
(forward-char 1))))
(setq address
- (condition-case nil
- (ietf-drums-parse-address
- (buffer-substring beg (point)))
- (error nil)))
+ (if rawp
+ (buffer-substring beg (point))
+ (condition-case nil
+ (ietf-drums-parse-address
+ (buffer-substring beg (point)))
+ (error nil))))
(if address (push address pairs))
(nreverse pairs)))))
@@ -274,6 +282,11 @@ backslash and doublequote.")
(concat "\"" string "\"")
string))
+(defun ietf-drums-make-address (name address)
+ (if name
+ (concat (ietf-drums-quote-string name) " <" address ">")
+ address))
+
(provide 'ietf-drums)
;;; arch-tag: 379a0191-dbae-4ca6-a0f5-d4202c209ef9