[MLton-commit] r5155

Vesa Karvonen vesak at mlton.org
Thu Feb 8 05:56:35 PST 2007


Refactoring.
----------------------------------------------------------------------

U   mlton/trunk/ide/emacs/esml-du-mlton.el
U   mlton/trunk/ide/emacs/esml-gen.el
U   mlton/trunk/ide/emacs/esml-util.el

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

Modified: mlton/trunk/ide/emacs/esml-du-mlton.el
===================================================================
--- mlton/trunk/ide/emacs/esml-du-mlton.el	2007-02-08 13:43:01 UTC (rev 5154)
+++ mlton/trunk/ide/emacs/esml-du-mlton.el	2007-02-08 13:56:33 UTC (rev 5155)
@@ -5,6 +5,7 @@
 
 (require 'def-use-mode)
 (require 'bg-job)
+(require 'esml-util)
 
 ;; XXX Detect when the same ref is both a use and a def and act appropriately.
 
@@ -29,8 +30,8 @@
 (defun esml-du-move-to-symbol-start ()
   "Moves to the start of the SML symbol at point."
   (let ((limit (def-use-point-at-current-line)))
-    (when (zerop (skip-chars-backward "a-zA-Z0-9_'" limit))
-      (skip-chars-backward "-!%&$#+/:<=>?@~`^|*\\" limit))))
+    (when (zerop (skip-chars-backward esml-sml-alphanumeric-chars limit))
+      (skip-chars-backward esml-sml-symbolic-chars limit))))
 
 (add-to-list 'def-use-mode-to-move-to-symbol-start-alist
              (cons 'sml-mode (function esml-du-move-to-symbol-start)))
@@ -38,8 +39,8 @@
 (defun esml-du-move-to-symbol-end ()
   "Moves to the end of the SML symbol at point."
   (let ((limit (def-use-point-at-next-line)))
-    (when (zerop (skip-chars-forward "a-zA-Z0-9_'" limit))
-      (skip-chars-forward "-!%&$#+/:<=>?@~`^|*\\" limit))))
+    (when (zerop (skip-chars-forward esml-sml-alphanumeric-chars limit))
+      (skip-chars-forward esml-sml-symbolic-chars limit))))
 
 (add-to-list 'def-use-mode-to-move-to-symbol-end-alist
              (cons 'sml-mode (function esml-du-move-to-symbol-end)))

Modified: mlton/trunk/ide/emacs/esml-gen.el
===================================================================
--- mlton/trunk/ide/emacs/esml-gen.el	2007-02-08 13:43:01 UTC (rev 5154)
+++ mlton/trunk/ide/emacs/esml-gen.el	2007-02-08 13:56:33 UTC (rev 5155)
@@ -3,7 +3,6 @@
 ;; MLton is released under a BSD-style license.
 ;; See the file MLton-LICENSE for details.
 
-(require 'cl)
 (require 'esml-util)
 
 ;; Installation
@@ -27,16 +26,7 @@
 ;; Prelude
 
 ;; TBD: Consider moving these to another place if/when it makes sense.
-(defconst esml-sml-symbolic-chars
-  "-!%&$#+/:<=>?@~`^|*\\"
-  "A string of all Standard ML symbolic characters as defined in section
-2.4 of the Definition.")
 
-(defconst esml-sml-alphanumeric-chars
-  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'_"
-  "A string of all Standard ML alphanumeric characters as defined in
-section 2.4 of the Definition.")
-
 (defun esml-extract-field-names (pattern-or-type)
   (let ((fields nil))
     (with-temp-buffer

Modified: mlton/trunk/ide/emacs/esml-util.el
===================================================================
--- mlton/trunk/ide/emacs/esml-util.el	2007-02-08 13:43:01 UTC (rev 5154)
+++ mlton/trunk/ide/emacs/esml-util.el	2007-02-08 13:56:33 UTC (rev 5155)
@@ -5,9 +5,20 @@
 
 (require 'cl)
 
-;; Some general purpose Emacs Lisp utility functions
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; SML metadata
 
+(defconst esml-sml-symbolic-chars "-!%&$#+/:<=>?@~`^|*\\"
+  "A string of all Standard ML symbolic characters as defined in section
+2.4 of the Definition.")
+
+(defconst esml-sml-alphanumeric-chars
+  "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'_"
+  "A string of all Standard ML alphanumeric characters as defined in
+section 2.4 of the Definition.")
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; Some general purpose Emacs Lisp utility functions
 
 (defun esml-point-preceded-by (regexp)
   "Determines whether point is immediately preceded by the given regexp.




More information about the MLton-commit mailing list