]> git.eshelyaron.com Git - emacs.git/commitdiff
* mh-xface.el (mh-face-to-png, mh-uncompface)
authorBill Wohler <wohler@newt.com>
Sat, 9 Jul 2011 20:19:10 +0000 (13:19 -0700)
committerBill Wohler <wohler@newt.com>
Sat, 9 Jul 2011 20:19:10 +0000 (13:19 -0700)
(mh-picon-file-contents): Only call set-buffer-multibyte if it exists,
which it doesn't in XEmacs.

lisp/mh-e/mh-xface.el

index 027d79a948aa39bc3251d79ded1a9738c8b02108..1c7531b59d19c50f403496f2273850ef0eeb5a6e 100644 (file)
@@ -125,7 +125,8 @@ in this order is used."
 (defun mh-face-to-png (data)
   "Convert base64 encoded DATA to png image."
   (with-temp-buffer
-    (set-buffer-multibyte nil)
+    (if (fboundp 'set-buffer-multibyte)
+        (set-buffer-multibyte nil))
     (insert data)
     (ignore-errors (base64-decode-region (point-min) (point-max)))
     (buffer-string)))
@@ -133,7 +134,8 @@ in this order is used."
 (defun mh-uncompface (data)
   "Run DATA through `uncompface' to generate bitmap."
   (with-temp-buffer
-    (set-buffer-multibyte nil)
+    (if (fboundp 'set-buffer-multibyte)
+        (set-buffer-multibyte nil))
     (insert data)
     (when (and mh-uncompface-executable
                (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
 elements of the list are nil."
   (if (stringp file)
       (with-temp-buffer
-        (set-buffer-multibyte nil)
+        (if (fboundp 'set-buffer-multibyte)
+            (set-buffer-multibyte nil))
         (let ((type (and (string-match ".*\\.\\(...\\)$" file)
                          (intern (match-string 1 file)))))
           (insert-file-contents-literally file)