sml-mode / sml-move.el

Diff from to

sml-move.el

 
 (defconst sml-syntax-prec
   (sml-preproc-alist
-   `(((";" "," "in" "with") . 10)
+   `((("in" "with") . 10)
+     ((";" ",") . 20)
      (("=>" "d=" "=of") . (65 . 40))
      ("|" . (47 . 30))
      (("case" "of" "fn") . 45)
       (save-excursion
 	(sml-backward-sym-1)
 	(if (sml-nested-of-p) "of" "=of")))
+     ;; ((equal sym "datatype")
+     ;;  (save-excursion
+     ;; 	(sml-backward-sym-1)
+     ;; 	(sml-backward-spaces)
+     ;; 	(if (eq (preceding-char) ?=) "=datatype" sym)))
      (t sym))))
 
 (defun sml-backward-sym-1 ()
 	  (cond
 	   ((string= sym "=") (if (sml-poly-equal-p) "=" "d="))
 	   ((string= sym "of") (if (sml-nested-of-p) "of" "=of"))
+	   ;; ((string= sym "datatype")
+	   ;;  (save-excursion (sml-backward-spaces)
+	   ;; 		    (if (eq (preceding-char) ?=) "=datatype" sym)))
 	   (t sym)))))))
     
 
 (defun sml-backward-sexp (prec)
-  "Moves one sexp backward if possible, or one char else.
-Returns T if the move indeed moved through one sexp and NIL if not."
+  "Move one sexp backward if possible, or one char else.
+Returns t if the move indeed moved through one sexp and nil if not.
+PREC is the precedence currently looked for."
   (let ((parse-sexp-lookup-properties t)
 	(parse-sexp-ignore-comments t))
     (sml-backward-spaces)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.