* rfc2047-encode-message-header only with mule?
@ 2000-01-26 17:06 Christoph Rohland
0 siblings, 0 replies; only message in thread
From: Christoph Rohland @ 2000-01-26 17:06 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 202 bytes --]
Hi,
After some bug hunting I found that rfc2047-encode-message-header only
works with mule enabled.
After applying the following patch it works for me also on non-mule
xemacs.
Greetings
Christoph
[-- Attachment #2: Type: text/plain, Size: 2042 bytes --]
--- rfc2047.el.orig Wed Jan 26 17:48:32 2000
+++ rfc2047.el Wed Jan 26 18:04:56 2000
@@ -105,33 +105,32 @@
"Encode the message header according to `rfc2047-header-encoding-alist'.
Should be called narrowed to the head of the message."
(interactive "*")
- (when (featurep 'mule)
- (save-excursion
- (goto-char (point-min))
- (let ((alist rfc2047-header-encoding-alist)
- elem method)
- (while (not (eobp))
- (save-restriction
- (rfc2047-narrow-to-field)
- (when (rfc2047-encodable-p)
- ;; We found something that may perhaps be encoded.
- (while (setq elem (pop alist))
- (when (or (and (stringp (car elem))
- (looking-at (car elem)))
- (eq (car elem) t))
- (setq alist nil
- method (cdr elem))))
- (when method
- (cond
- ((eq method 'mime)
- (rfc2047-encode-region (point-min) (point-max))
- (rfc2047-fold-region (point-min) (point-max)))
- ;; Hm.
- (t))))
- (goto-char (point-max)))))
- (when mail-parse-charset
- (encode-coding-region (point-min) (point-max)
- mail-parse-charset)))))
+ (save-excursion
+ (goto-char (point-min))
+ (let ((alist rfc2047-header-encoding-alist)
+ elem method)
+ (while (not (eobp))
+ (save-restriction
+ (rfc2047-narrow-to-field)
+ (when (rfc2047-encodable-p)
+ ;; We found something that may perhaps be encoded.
+ (while (setq elem (pop alist))
+ (when (or (and (stringp (car elem))
+ (looking-at (car elem)))
+ (eq (car elem) t))
+ (setq alist nil
+ method (cdr elem))))
+ (when method
+ (cond
+ ((eq method 'mime)
+ (rfc2047-encode-region (point-min) (point-max))
+ (rfc2047-fold-region (point-min) (point-max)))
+ ;; Hm.
+ (t))))
+ (goto-char (point-max)))))
+ (when mail-parse-charset
+ (encode-coding-region (point-min) (point-max)
+ mail-parse-charset))))
(defun rfc2047-encodable-p (&optional header)
"Say whether the current (narrowed) buffer contains characters that need encoding in headers."
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-01-26 17:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-26 17:06 rfc2047-encode-message-header only with mule? Christoph Rohland
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).