On Tue, 2002-10-22 at 01:00, Stefan Monnier wrote:
> fun fact 0 = 1
> | fact
>
> (which I usually do in the old xemacs ver 21.1 patch 14 on sparc sun
> solaris 2.7)
>
> However, I just get
>
> fun fact 0 = 1
> |
I seem to remember that there might still be a boundary error
in the case where there's nothing before `fun'.
So can you try to add a space, or a `let', or an empty line, or basically
anything before the `fun' and see if the problem persists.
Confirmed. I looked into it, and this patch seems to work for me (note
that I don't really know about SML). Could you guys comment/test this
patch? The first hunk avoids a "Wrong type argument:
number-char-or-marker-p, nil" error when the electric pipe stuff happens
at end of buffer and the second one seems to cure the
actual problem.
Index: sml-mode.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/sml-mode/sml-mode.el,v
retrieving revision 1.2
diff -a -u -r1.2 sml-mode.el
--- sml-mode.el 2002/07/31 23:21:30 1.2
+++ sml-mode.el 2002/10/21 20:38:13
@@ -379,7 +379,7 @@
(skip-chars-forward "\t |")
(skip-syntax-forward "w")
(skip-chars-forward "\t ")
- (when (= ?= (char-after)) (backward-char)))))
+ (when (and (not (eobp)) (= ?= (char-after))) (backward-char)))))
(defun sml-electric-semi ()
"Insert a \;.
@@ -688,7 +688,7 @@
(progn (sml-backward-sexp prec)
(setq sym (save-excursion (sml-forward-sym)))
(not (or (member sym syms) (bobp)))))
- (unless (bobp) sym))))
+ (if (member sym syms) sym))))
(defun sml-skip-siblings ()
(while (and (not (bobp)) (sml-backward-arg))
--
\/ille Skyttä
scop at
xemacs.org