[MLton-commit] r5184

Vesa Karvonen vesak at mlton.org
Tue Feb 13 06:38:45 PST 2007


Abbreviate file names for viewing pleasure.
----------------------------------------------------------------------

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

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

Modified: mlton/trunk/ide/emacs/def-use-util.el
===================================================================
--- mlton/trunk/ide/emacs/def-use-util.el	2007-02-13 14:37:38 UTC (rev 5183)
+++ mlton/trunk/ide/emacs/def-use-util.el	2007-02-13 14:38:45 UTC (rev 5184)
@@ -26,14 +26,19 @@
   (make-hash-table :test 'equal :weakness 'key)
   "Weak hash table private to `def-use-file-truename'.")
 
+(if (string-match "XEmacs" emacs-version)
+    (defun def-use-abbreviate-file-name (file)
+      (abbreviate-file-name file t))
+  (defalias 'def-use-abbreviate-file-name (function abbreviate-file-name)))
+
 (defun def-use-file-truename (file)
-  "Cached version of `file-truename'."
+  "Cached version of `file-truename' combined with `abbreviate-file-name'."
   (def-use-gethash-or-put file
     (function
      (lambda ()
        (def-use-intern
          (def-use-add-face 'font-lock-keyword-face
-           (file-truename file)))))
+           (def-use-abbreviate-file-name (file-truename file))))))
     def-use-file-truename-table))
 
 (defun def-use-find-buffer-visiting-file (file)




More information about the MLton-commit mailing list