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/trunk/sml-mode/sml-mode.el
ViewVC logotype

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

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

revision 393, Fri Aug 6 08:41:25 1999 UTC revision 394, Mon Aug 9 21:45:51 1999 UTC
# Line 113  Line 113 
113    
114  ;;; VARIABLES CONTROLLING INDENTATION  ;;; VARIABLES CONTROLLING INDENTATION
115    
116  (defvar sml-indent-level 4  (defcustom sml-indent-level 4
117    "*Indentation of blocks in ML (see also `sml-structure-indent').")    "*Indentation of blocks in ML (see also `sml-structure-indent')."
118      :group 'sml
119  (defvar sml-indent-args sml-indent-level    :type '(integer))
120    "*Indentation of args placed on a separate line.")  
121    (defcustom sml-indent-args sml-indent-level
122      "*Indentation of args placed on a separate line."
123      :group 'sml
124      :type '(integer))
125    
126  ;; (defvar sml-indent-align-args t  ;; (defvar sml-indent-align-args t
127  ;;   "*Whether the arguments should be aligned.")  ;;   "*Whether the arguments should be aligned.")
# Line 131  Line 135 
135  ;; The first seems to be the standard in SML/NJ, but the second  ;; The first seems to be the standard in SML/NJ, but the second
136  ;; seems nicer...")  ;; seems nicer...")
137    
138  (defvar sml-electric-semi-mode nil  (defcustom sml-electric-semi-mode nil
139    "*If t, `\;' will self insert, reindent the line, and do a newline.    "*If non-nil, `\;' will self insert, reindent the line, and do a newline.
140  If nil, just insert a `\;'. (To insert while t, do: C-q \;).")  If nil, just insert a `\;'. (To insert while t, do: C-q \;)."
141      :group 'sml
142      :type '(boolean))
143    
144  ;;; OTHER GENERIC MODE VARIABLES  ;;; OTHER GENERIC MODE VARIABLES
145    
# Line 201  Line 207 
207    `(;;(sml-font-comments-and-strings)    `(;;(sml-font-comments-and-strings)
208      ("\\<\\(fun\\|and\\)\\s-+\\('\\sw+\\s-+\\)*\\(\\sw+\\)"      ("\\<\\(fun\\|and\\)\\s-+\\('\\sw+\\s-+\\)*\\(\\sw+\\)"
209       (1 font-lock-keyword-face)       (1 font-lock-keyword-face)
210       (3 font-lock-function-def-face))       (3 font-lock-function-name-face))
211      ("\\<\\(\\(data\\|abs\\|with\\|eq\\)?type\\)\\s-+\\('\\sw+\\s-+\\)*\\(\\sw+\\)"      ("\\<\\(\\(data\\|abs\\|with\\|eq\\)?type\\)\\s-+\\('\\sw+\\s-+\\)*\\(\\sw+\\)"
212       (1 font-lock-keyword-face)       (1 font-lock-keyword-face)
213       (4 font-lock-type-def-face))       (4 font-lock-type-def-face))
214      ("\\<\\(val\\)\\s-+\\(\\sw+\\>\\s-*\\)?\\(\\sw+\\)\\s-*="      ("\\<\\(val\\)\\s-+\\(\\sw+\\>\\s-*\\)?\\(\\sw+\\)\\s-*="
215       (1 font-lock-keyword-face)       (1 font-lock-keyword-face)
216       ;;(6 font-lock-variable-def-face nil t)       ;;(6 font-lock-variable-def-face nil t)
217       (3 font-lock-variable-def-face))       (3 font-lock-variable-name-face))
218      ("\\<\\(structure\\|functor\\|abstraction\\)\\s-+\\(\\sw+\\)"      ("\\<\\(structure\\|functor\\|abstraction\\)\\s-+\\(\\sw+\\)"
219       (1 font-lock-keyword-face)       (1 font-lock-keyword-face)
220       (2 font-lock-module-def-face))       (2 font-lock-module-def-face))
# Line 219  Line 225 
225      (,sml-keywords-regexp . font-lock-keyword-face))      (,sml-keywords-regexp . font-lock-keyword-face))
226    "Regexps matching standard SML keywords.")    "Regexps matching standard SML keywords.")
227    
228  ;; default faces values  (defface font-lock-type-def-face
229  (flet ((def-face (face def)    '((t (:bold t)))
230           "Define a face for font-lock."    "Font Lock mode face used to highlight type definitions."
231           (unless (boundp face)    :group 'font-lock-highlighting-faces)
232             (set face (cond  (defvar font-lock-type-def-face 'font-lock-type-def-face
233                        ((facep face) face)    "Face name to use for type definitions.")
234                        ((facep def) (copy-face def face))  
235                        (t def))))))  (defface font-lock-module-def-face
236    (def-face 'font-lock-function-def-face 'font-lock-function-name-face)    '((t (:bold t)))
237    (def-face 'font-lock-type-def-face 'font-lock-type-face)    "Font Lock mode face used to highlight module definitions."
238    (def-face 'font-lock-module-def-face 'font-lock-function-name-face)    :group 'font-lock-highlighting-faces)
239    (def-face 'font-lock-interface-def-face 'font-lock-type-face)  (defvar font-lock-module-def-face 'font-lock-module-def-face
240    (def-face 'font-lock-variable-def-face 'font-lock-variable-name-face))    "Face name to use for module definitions.")
241    
242    (defface font-lock-interface-def-face
243      '((t (:bold t)))
244      "Font Lock mode face used to highlight interface definitions."
245      :group 'font-lock-highlighting-faces)
246    (defvar font-lock-interface-def-face 'font-lock-interface-def-face
247      "Face name to use for interface definitions.")
248    
249  (defvar sml-syntax-prop-table  (defvar sml-syntax-prop-table
250    (let ((st (make-syntax-table)))    (let ((st (make-syntax-table)))
251      (modify-syntax-entry ?l "(d" st)      ;;(modify-syntax-entry ?l "(d" st)
252      (modify-syntax-entry ?s "(d" st)      ;;(modify-syntax-entry ?s "(d" st)
253      (modify-syntax-entry ?d ")l" st)      ;;(modify-syntax-entry ?d ")l" st)
254      (modify-syntax-entry ?\\ "." st)      (modify-syntax-entry ?\\ "." st)
255      (modify-syntax-entry ?* "." st)      (modify-syntax-entry ?* "." st)
256      st))      st))

Legend:
Removed from v.393  
changed lines
  Added in v.394

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