Commit 5a47220a authored by Bill Wohler's avatar Bill Wohler
Browse files

* mh-xface.el (mh-face-to-png, mh-uncompface)

(mh-picon-file-contents): Only call set-buffer-multibyte if it exists,
which it doesn't in XEmacs.
parent c0a7f300
...@@ -125,7 +125,8 @@ in this order is used." ...@@ -125,7 +125,8 @@ in this order is used."
(defun mh-face-to-png (data) (defun mh-face-to-png (data)
"Convert base64 encoded DATA to png image." "Convert base64 encoded DATA to png image."
(with-temp-buffer (with-temp-buffer
(set-buffer-multibyte nil) (if (fboundp 'set-buffer-multibyte)
(set-buffer-multibyte nil))
(insert data) (insert data)
(ignore-errors (base64-decode-region (point-min) (point-max))) (ignore-errors (base64-decode-region (point-min) (point-max)))
(buffer-string))) (buffer-string)))
...@@ -133,7 +134,8 @@ in this order is used." ...@@ -133,7 +134,8 @@ in this order is used."
(defun mh-uncompface (data) (defun mh-uncompface (data)
"Run DATA through `uncompface' to generate bitmap." "Run DATA through `uncompface' to generate bitmap."
(with-temp-buffer (with-temp-buffer
(set-buffer-multibyte nil) (if (fboundp 'set-buffer-multibyte)
(set-buffer-multibyte nil))
(insert data) (insert data)
(when (and mh-uncompface-executable (when (and mh-uncompface-executable
(equal (call-process-region (point-min) (point-max) (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 ...@@ -271,7 +273,8 @@ file contents as a string is returned. If FILE is nil, then both
elements of the list are nil." elements of the list are nil."
(if (stringp file) (if (stringp file)
(with-temp-buffer (with-temp-buffer
(set-buffer-multibyte nil) (if (fboundp 'set-buffer-multibyte)
(set-buffer-multibyte nil))
(let ((type (and (string-match ".*\\.\\(...\\)$" file) (let ((type (and (string-match ".*\\.\\(...\\)$" file)
(intern (match-string 1 file))))) (intern (match-string 1 file)))))
(insert-file-contents-literally file) (insert-file-contents-literally file)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment