                                    " from Pymacs.pymacs import main;"
                                    " main(*sys.argv[1:])")
                       (mapcar 'expand-file-name pymacs-load-path))))
-          (pymacs-kill-without-query process)
+          (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))

  (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.


(eval-and-compile

  (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))
