[MLton-commit] r5114

Vesa Karvonen vesak at mlton.org
Sat Feb 3 04:52:07 PST 2007


Moved conditionals to the top level to eliminate warnings.

----------------------------------------------------------------------

U   mlton/trunk/ide/emacs/def-use-util.el
U   mlton/trunk/ide/emacs/esml-util.el

----------------------------------------------------------------------

Modified: mlton/trunk/ide/emacs/def-use-util.el
===================================================================
--- mlton/trunk/ide/emacs/def-use-util.el	2007-02-02 19:35:19 UTC (rev 5113)
+++ mlton/trunk/ide/emacs/def-use-util.el	2007-02-03 12:52:05 UTC (rev 5114)
@@ -38,11 +38,9 @@
     (beginning-of-line)
     (point)))
 
-(defun def-use-delete-idle-timer (timer)
-  "Deletes the specified idle timer."
-  (if (string-match "XEmacs" emacs-version)
-      (delete-itimer timer)
-    (cancel-timer timer)))
+(if (string-match "XEmacs" emacs-version)
+    (defalias 'def-use-delete-idle-timer (function delete-itimer))
+  (defalias 'def-use-delete-idle-timer (function cancel-timer)))
 
 (defun def-use-gethash-or-put (key_ mk-value_ table_)
   (or (gethash key_ table_)

Modified: mlton/trunk/ide/emacs/esml-util.el
===================================================================
--- mlton/trunk/ide/emacs/esml-util.el	2007-02-02 19:35:19 UTC (rev 5113)
+++ mlton/trunk/ide/emacs/esml-util.el	2007-02-03 12:52:05 UTC (rev 5114)
@@ -36,16 +36,18 @@
   (remove* "" (split-string string separator) :test 'equal))
 
 ;; workaround for incompatibility between GNU Emacs and XEmacs
-(defun esml-replace-regexp-in-string (str regexp rep)
-  (if (string-match "XEmacs" emacs-version)
-      (replace-in-string str regexp rep t)
+(if (string-match "XEmacs" emacs-version)
+    (defun esml-replace-regexp-in-string (str regexp rep)
+      (replace-in-string str regexp rep t))
+  (defun esml-replace-regexp-in-string (str regexp rep)
     (replace-regexp-in-string regexp rep str t t)))
 
 ;; workaround for incompatibility between GNU Emacs and XEmacs
-(defun esml-error (str &rest objs)
-  (if (string-match "XEmacs" emacs-version)
-      (error 'error (apply 'format str objs))
-    (apply 'error str objs)))
+(if (string-match "XEmacs" emacs-version)
+    (defun esml-error (str &rest objs)
+      (error 'error (apply (function format) str objs)))
+  (defun esml-error (str &rest objs)
+    (apply (function error) str objs)))
 
 (defun esml-string-matches-p (regexp str)
   "Non-nil iff the entire string matches the regexp."




More information about the MLton-commit mailing list