 
 (eval-and-compile
 
-  (cond ((fboundp 'multibyte-string-p)
-         (defalias 'pymacs-multibyte-string-p 'multibyte-string-p))
-        ((fboundp 'find-charset-string)
-         (defun pymacs-multibyte-string-p (string)
-           "Tell XEmacs if STRING should be handled as multibyte."
-           (not (member (find-charset-string string) '(nil (ascii))))))
-        (t
-         (defun pymacs-multibyte-string-p (string)
-           "Tell XEmacs that STRING is unibyte, because Mule is not around!"
-           nil)))
-
-  (cond ((fboundp 'set-process-query-on-exit-flag)
-         (defun pymacs-kill-without-query (process)
-           "Tell recent Emacs how to quickly destroy PROCESS while exiting."
-           (set-process-query-on-exit-flag process nil)))
-        ((fboundp 'process-kill-without-query-process)
-         (defalias 'pymacs-kill-without-query 'process-kill-without-query))
-        (t
-         (defun pymacs-kill-without-query (process)
-           "Tell nothing when there is no way to speak."
-           nil)))
-
-  (if (fboundp 'set-buffer-multibyte)
-      (defalias 'pymacs-set-buffer-multibyte 'set-buffer-multibyte)
-    (defun pymacs-set-buffer-multibyte (flag)
-      "For use in Emacs 20.2 or earlier.  No-operation under XEmacs."
-      (setq enable-multibyte-characters flag))))
+  (if (fboundp 'multibyte-string-p)
+      (defalias 'pymacs-multibyte-string-p 'multibyte-string-p)
+    (defun pymacs-multibyte-string-p (string)
+      "Tell XEmacs if STRING should be handled as multibyte."
+      (not (equal (find-charset-string string) '(ascii))))))
 
 (defalias 'pymacs-report-error (symbol-function 'error))
 
  (let ((buffer (get-buffer-create "*Pymacs*")))
    (with-current-buffer buffer
      (buffer-disable-undo)
      (pymacs-set-buffer-multibyte nil)
      (set-buffer-file-coding-system 'raw-text)
      (save-match-data
        ;; Launch the Pymacs helper.

                                   " from Pymacs.pymacs import main;"
                                   " main(*sys.argv[1:])")
                      (mapcar 'expand-file-name pymacs-load-path))))
          (cond ((fboundp 'set-process-query-on-exit-flag)
                 (set-process-query-on-exit-flag process nil))
                ((fboundp 'process-kill-without-query-process)
                 (process-kill-without-query process)))
          ;; Receive the synchronising reply.
          (while (progn
                   (goto-char (point-min))
