[MLton-commit] r5153

Vesa Karvonen vesak at mlton.org
Thu Feb 8 05:00:23 PST 2007


Report error message when trying to goto a file that can not be read.

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

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

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

Modified: mlton/trunk/ide/emacs/def-use-mode.el
===================================================================
--- mlton/trunk/ide/emacs/def-use-mode.el	2007-02-08 12:58:42 UTC (rev 5152)
+++ mlton/trunk/ide/emacs/def-use-mode.el	2007-02-08 13:00:22 UTC (rev 5153)
@@ -195,6 +195,8 @@
   "Finds the referenced source and moves point to the referenced
 position."
   (cond
+   ((not (file-readable-p (def-use-ref-src ref)))
+    (def-use-error "Referenced file %s can not be read" (def-use-ref-src ref)))
    (other-window
     (def-use-find-file (def-use-ref-src ref) t))
    ((not (equal (def-use-buffer-true-file-name) (def-use-ref-src ref)))

Modified: mlton/trunk/ide/emacs/def-use-util.el
===================================================================
--- mlton/trunk/ide/emacs/def-use-util.el	2007-02-08 12:58:42 UTC (rev 5152)
+++ mlton/trunk/ide/emacs/def-use-util.el	2007-02-08 13:00:22 UTC (rev 5153)
@@ -8,6 +8,12 @@
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Utilities
 
+;; workaround for incompatibility between GNU Emacs and XEmacs
+(if (string-match "XEmacs" emacs-version)
+    (defun def-use-error (str &rest objs)
+      (error 'error (concat "Error: " (apply (function format) str objs) ".")))
+  (defalias 'def-use-error (function error)))
+
 (defvar def-use-file-truename-table
   (make-hash-table :test 'equal :weakness 'key)
   "Weak hash table private to `def-use-file-truename'.")




More information about the MLton-commit mailing list