[MLton] Re: [MLton-commit] r6304

Vesa Karvonen vesa.a.j.k at gmail.com
Wed Jan 9 11:31:56 PST 2008


Wow, thanks for fixing this!  I probably wouldn't have noticed this
for a long time.  I do occasionally test with Gnu Emacs, but I should
probably do it more frequently.  An incorrect labels invocation like
the above seems to be silently accepted by XEmacs although it doesn't
result in the desired function (GIGO).  For example,

(let ((attr1 '(1))
      (attr2 '(1)))
  (labels ((nequal i) (equal (nth i attr1) (nth i attr2)))
    (nequal 0)))

returns nil in XEmacs and fails with an error in Gnu Emacs.

-Vesa Karvonen

On Jan 9, 2008 7:01 PM, Matthew Fluet <fluet at mlton.org> wrote:
> Add documentation string and fix syntax error with labels declaration; with Aquamacs and Emacs, the syntax error leads to an 'Error: listp, i' an effectively disables def-use mode.
> ----------------------------------------------------------------------
>
> 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       2008-01-09 15:07:26 UTC (rev 6303)
> +++ mlton/trunk/ide/emacs/def-use-util.el       2008-01-09 17:01:39 UTC (rev 6304)
> @@ -144,7 +144,10 @@
>            (def-use-time-to-double (nth 5 attr2)))))
>
>  (defun def-use-attr-changed? (attr1 attr2)
> -  (labels ((nequal i) (not (equal (nth i attr1) (nth i attr2))))
> +  "Returns non-nil iff the file attributes of `attr1' are different than
> +the file attributes of `attr2'.  Note that this also returns nil when either
> +one of the file attributes is nil."
> +  (labels ((nequal (i) (not (equal (nth i attr1) (nth i attr2)))))
>      (and attr1 attr2
>           (or (def-use-attr-newer? attr1 attr2)
>               (nequal 7)  ;; size
>
>
> _______________________________________________
> MLton-commit mailing list
> MLton-commit at mlton.org
> http://mlton.org/mailman/listinfo/mlton-commit
>



More information about the MLton mailing list