;;; url-cid.el --- Content-ID URL loader
-;; Copyright (C) 1998, 1999, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+;; Copyright (C) 1998-1999, 2004-2011
+;; Free Software Foundation, Inc.
;; Keywords: comm, data, processes
(setq part (mm-get-content-id cid))
(if (not part)
(message "Unknown CID encountered: %s" cid)
- (setq data (save-excursion
- (set-buffer (mm-handle-buffer part))
+ (setq data (with-current-buffer (mm-handle-buffer part)
(buffer-string))
content-type (mm-handle-type part)
encoding (symbol-name (mm-handle-encoding part)))
(if (= 0 (length encoding)) (setq encoding "8bit"))
(if (listp content-type)
(setq content-type (car content-type)))
- (insert (format "Content-type: %d\r\n" (length data))
+ (insert (format "Content-length: %d\r\n" (length data))
"Content-type: " content-type "\r\n"
"Content-transfer-encoding: " encoding "\r\n"
"\r\n"
(cond
((fboundp 'mm-get-content-id)
;; Using Pterodactyl Gnus or later
- (save-excursion
- (set-buffer (generate-new-buffer " *url-cid*"))
+ (with-current-buffer (generate-new-buffer " *url-cid*")
(url-cid-gnus (url-filename url))))
(t
(message "Unable to handle CID URL: %s" url))))
-;; arch-tag: 23d9ab74-fad4-4dba-b1e7-292871e8bda5
;;; url-cid.el ends here