Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml-mode/trunk/sml-defs.el
ViewVC logotype

Diff of /sml-mode/trunk/sml-defs.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2816, Tue Oct 30 18:39:53 2007 UTC revision 2817, Wed Oct 31 04:07:04 2007 UTC
# Line 1  Line 1 
1  ;;; sml-defs.el --- Various definitions for sml-mode  ;;; sml-defs.el --- Various definitions for sml-mode
2    
3  ;; Copyright (C) 1999,2000,2003,2005  Stefan Monnier <monnier@cs.yale.edu>  ;; Copyright (C) 1999,2000,2003,2005,2007  Stefan Monnier <monnier@gnu.org>
4  ;;  ;;
5  ;; This program is free software; you can redistribute it and/or modify  ;; This program is free software; you can redistribute it and/or modify
6  ;; it under the terms of the GNU General Public License as published by  ;; it under the terms of the GNU General Public License as published by
7  ;; the Free Software Foundation; either version 2 of the License, or  ;; the Free Software Foundation; either version 3 of the License, or
8  ;; (at your option) any later version.  ;; (at your option) any later version.
9  ;;  ;;
10  ;; This program is distributed in the hope that it will be useful,  ;; This program is distributed in the hope that it will be useful,
# Line 125  Line 125 
125  ;; regexps  ;; regexps
126  ;;  ;;
127    
128  (defun sml-syms-re (&rest syms)  (defun sml-syms-re (syms)
129    (concat "\\<" (regexp-opt (flatten syms) t) "\\>"))    (concat "\\<" (regexp-opt syms t) "\\>"))
130    
131  ;;  ;;
132    
# Line 143  Line 143 
143    "Symbols matching the `end' symbol.")    "Symbols matching the `end' symbol.")
144    
145  ;; (defconst sml-user-begin-symbols-re  ;; (defconst sml-user-begin-symbols-re
146  ;;   (sml-syms-re "let" "abstype" "local" "struct" "sig" "in" "with")  ;;   (sml-syms-re '("let" "abstype" "local" "struct" "sig" "in" "with"))
147  ;;   "Symbols matching (loosely) the `end' symbol.")  ;;   "Symbols matching (loosely) the `end' symbol.")
148    
149  (defconst sml-sexp-head-symbols-re  (defconst sml-sexp-head-symbols-re
150    (sml-syms-re "let" "abstype" "local" "struct" "sig" "in" "with"    (sml-syms-re `("let" "abstype" "local" "struct" "sig" "in" "with"
151                 "if" "then" "else" "case" "of" "fn" "fun" "val" "and"                 "if" "then" "else" "case" "of" "fn" "fun" "val" "and"
152                 "datatype" "type" "exception" "open" "infix" "infixr" "nonfix"                 "datatype" "type" "exception" "open" "infix" "infixr" "nonfix"
153                 sml-module-head-syms                   ,@sml-module-head-syms
154                 "handle" "raise")                   "handle" "raise"))
155    "Symbols starting an sexp.")    "Symbols starting an sexp.")
156    
157  ;; (defconst sml-not-arg-start-re  ;; (defconst sml-not-arg-start-re
158  ;;   (sml-syms-re "in" "of" "end" "andalso")  ;;   (sml-syms-re '("in" "of" "end" "andalso"))
159  ;;   "Symbols that can't be found at the head of an arg.")  ;;   "Symbols that can't be found at the head of an arg.")
160    
161  ;; (defconst sml-not-arg-re  ;; (defconst sml-not-arg-re
162  ;;   (sml-syms-re "in" "of" "end" "andalso")  ;;   (sml-syms-re '("in" "of" "end" "andalso"))
163  ;;   "Symbols that should not be confused with an arg.")  ;;   "Symbols that should not be confused with an arg.")
164    
165  (defconst sml-=-starter-syms  (defconst sml-=-starter-syms
# Line 185  Line 185 
185         "do" "with" "withtype")))))         "do" "with" "withtype")))))
186    
187  (defconst sml-starters-indent-after  (defconst sml-starters-indent-after
188    (sml-syms-re "let" "local" "struct" "in" "sig" "with")    (sml-syms-re '("let" "local" "struct" "in" "sig" "with"))
189    "Indent after these.")    "Indent after these.")
190    
191  (defconst sml-delegate  (defconst sml-delegate
# Line 230  Line 230 
230    "Regexp of compound symbols (pairs of symbols to be considered as one).")    "Regexp of compound symbols (pairs of symbols to be considered as one).")
231    
232  (defconst sml-non-nested-of-starter-re  (defconst sml-non-nested-of-starter-re
233    (sml-syms-re "datatype" "abstype" "exception")    (sml-syms-re '("datatype" "abstype" "exception"))
234    "Symbols that can introduce an `of' that shouldn't behave like a paren.")    "Symbols that can introduce an `of' that shouldn't behave like a paren.")
235    
236  (defconst sml-starters-syms  (defconst sml-starters-syms

Legend:
Removed from v.2816  
changed lines
  Added in v.2817

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0