aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/mh-e/mh-xface.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/mh-e/mh-xface.el b/lisp/mh-e/mh-xface.el
index 027d79a948a..1c7531b59d1 100644
--- a/lisp/mh-e/mh-xface.el
+++ b/lisp/mh-e/mh-xface.el
@@ -125,7 +125,8 @@ in this order is used."
125(defun mh-face-to-png (data) 125(defun mh-face-to-png (data)
126 "Convert base64 encoded DATA to png image." 126 "Convert base64 encoded DATA to png image."
127 (with-temp-buffer 127 (with-temp-buffer
128 (set-buffer-multibyte nil) 128 (if (fboundp 'set-buffer-multibyte)
129 (set-buffer-multibyte nil))
129 (insert data) 130 (insert data)
130 (ignore-errors (base64-decode-region (point-min) (point-max))) 131 (ignore-errors (base64-decode-region (point-min) (point-max)))
131 (buffer-string))) 132 (buffer-string)))
@@ -133,7 +134,8 @@ in this order is used."
133(defun mh-uncompface (data) 134(defun mh-uncompface (data)
134 "Run DATA through `uncompface' to generate bitmap." 135 "Run DATA through `uncompface' to generate bitmap."
135 (with-temp-buffer 136 (with-temp-buffer
136 (set-buffer-multibyte nil) 137 (if (fboundp 'set-buffer-multibyte)
138 (set-buffer-multibyte nil))
137 (insert data) 139 (insert data)
138 (when (and mh-uncompface-executable 140 (when (and mh-uncompface-executable
139 (equal (call-process-region (point-min) (point-max) 141 (equal (call-process-region (point-min) (point-max)
@@ -271,7 +273,8 @@ file contents as a string is returned. If FILE is nil, then both
271elements of the list are nil." 273elements of the list are nil."
272 (if (stringp file) 274 (if (stringp file)
273 (with-temp-buffer 275 (with-temp-buffer
274 (set-buffer-multibyte nil) 276 (if (fboundp 'set-buffer-multibyte)
277 (set-buffer-multibyte nil))
275 (let ((type (and (string-match ".*\\.\\(...\\)$" file) 278 (let ((type (and (string-match ".*\\.\\(...\\)$" file)
276 (intern (match-string 1 file))))) 279 (intern (match-string 1 file)))))
277 (insert-file-contents-literally file) 280 (insert-file-contents-literally file)