(insert-file-contents-as-binary): Return value.
[elisp/apel.git] / emu.el
diff --git a/emu.el b/emu.el
index e13a8f1..0713415 100644 (file)
--- a/emu.el
+++ b/emu.el
 (cond (running-xemacs
        ;; for XEmacs
        (require 'emu-xemacs)
-       (cond ((featurep 'mule)
-             ;; for XEmacs with MULE
-             (require 'emu-20)
-             (require 'emu-x20)
-             )
-            (t
-             ;; for XEmacs without MULE
-             (require 'emu-latin1)
-             ))
-       )
+       (if (featurep 'mule)
+          ;; for XEmacs with MULE
+          (require 'emu-x20)
+        ;; for XEmacs without MULE
+        (require 'emu-latin1)
+        ))
       (running-mule-merged-emacs
        ;; for Emacs 20.1 and 20.2
        (require 'emu-e20)
@@ -277,6 +273,11 @@ Value is nil if OBJECT is not a buffer or if it has been killed.
 ;;; @ Emacs 20.1 emulation
 ;;;
 
+;; This macro was imported Emacs 20.2.
+(defmacro-maybe when (cond &rest body)
+  "(when COND BODY...): if COND yields non-nil, do BODY, else return nil."
+  (list 'if cond (cons 'progn body)))
+
 (defmacro-maybe save-current-buffer (&rest body)
   "Save the current buffer; execute BODY; restore the current buffer.
 Executes BODY just like `progn'."
@@ -285,7 +286,16 @@ Executes BODY just like `progn'."
           (progn (,@ body))
         (set-buffer orig-buffer)))))
 
-;; This macro was imported XEmacs 21.
+;; This macro was imported Emacs 20.2.
+(defmacro-maybe with-current-buffer (buffer &rest body)
+  "Execute the forms in BODY with BUFFER as the current buffer.
+The value returned is the value of the last form in BODY.
+See also `with-temp-buffer'."
+  (` (save-current-buffer
+       (set-buffer (, buffer))
+       (,@ body))))
+
+;; This macro was imported Emacs 20.2.
 (defmacro-maybe with-temp-buffer (&rest forms)
   "Create a temporary buffer, and evaluate FORMS there like `progn'.
 See also `with-temp-file' and `with-output-to-string'."
@@ -298,15 +308,6 @@ See also `with-temp-file' and `with-output-to-string'."
           (and (buffer-name (, temp-buffer))
                (kill-buffer (, temp-buffer))))))))
 
-;; This macro was imported XEmacs 21.
-(defmacro-maybe with-current-buffer (buffer &rest body)
-  "Execute the forms in BODY with BUFFER as the current buffer.
-The value returned is the value of the last form in BODY.
-See also `with-temp-buffer'."
-  (` (save-current-buffer
-       (set-buffer (, buffer))
-       (,@ body))))
-
 ;; This function was imported from XEmacs 21.
 (defun-maybe split-string (string &optional pattern)
   "Return a list of substrings of STRING which are separated by PATTERN.