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

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

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

revision 1471, Mon Mar 29 22:45:55 2004 UTC revision 1472, Sun Apr 4 07:17:07 2004 UTC
# Line 2  Line 2 
2    
3  ;; Copyright (C) 1989       Lars Bo Nielsen  ;; Copyright (C) 1989       Lars Bo Nielsen
4  ;; Copyright (C) 1994-1997  Matthew J. Morley  ;; Copyright (C) 1994-1997  Matthew J. Morley
5  ;; Copyright (C) 1999-2000  Stefan Monnier  ;; Copyright (C) 1999,2000,2004  Stefan Monnier
6    
7  ;; Author: Lars Bo Nielsen  ;; Author: Lars Bo Nielsen
8  ;;      Olin Shivers  ;;      Olin Shivers
# Line 299  Line 299 
299         'sml-imenu-create-index)         'sml-imenu-create-index)
300    (set (make-local-variable 'add-log-current-defun-function)    (set (make-local-variable 'add-log-current-defun-function)
301         'sml-current-fun-name)         'sml-current-fun-name)
302      ;; Treat paragraph-separators in comments as paragraph-separators.
303      (set (make-local-variable 'paragraph-separate)
304           (concat "\\([ \t]*\\*)?\\)?\\(" paragraph-separate "\\)"))
305      (set (make-local-variable 'require-final-newline) t)
306    ;; forward-sexp-function is an experimental variable in my hacked Emacs.    ;; forward-sexp-function is an experimental variable in my hacked Emacs.
307    (set (make-local-variable 'forward-sexp-function) 'sml-user-forward-sexp)    (set (make-local-variable 'forward-sexp-function) 'sml-user-forward-sexp)
308    ;; For XEmacs    ;; For XEmacs
# Line 312  Line 316 
316    (setq local-abbrev-table sml-mode-abbrev-table)    (setq local-abbrev-table sml-mode-abbrev-table)
317    ;; A paragraph is separated by blank lines or ^L only.    ;; A paragraph is separated by blank lines or ^L only.
318    
   (set (make-local-variable 'paragraph-start)  
        (concat "^[\t ]*$\\|" page-delimiter))  
   (set (make-local-variable 'paragraph-separate) paragraph-start)  
319    (set (make-local-variable 'indent-line-function) 'sml-indent-line)    (set (make-local-variable 'indent-line-function) 'sml-indent-line)
320    (set (make-local-variable 'comment-start) "(* ")    (set (make-local-variable 'comment-start) "(* ")
321    (set (make-local-variable 'comment-end) " *)")    (set (make-local-variable 'comment-end) " *)")
# Line 377  Line 378 
378       (skip-chars-forward "\t |")       (skip-chars-forward "\t |")
379       (skip-syntax-forward "w")       (skip-syntax-forward "w")
380       (skip-chars-forward "\t ")       (skip-chars-forward "\t ")
381       (when (= ?= (char-after)) (backward-char)))))       (when (eq ?= (char-after)) (backward-char)))))
382    
383  (defun sml-electric-semi ()  (defun sml-electric-semi ()
384    "Insert a \;.    "Insert a \;.
# Line 497  Line 498 
498    (let ((sym (unless (save-excursion (sml-backward-arg))    (let ((sym (unless (save-excursion (sml-backward-arg))
499                 (sml-backward-spaces)                 (sml-backward-spaces)
500                 (sml-backward-sym))))                 (sml-backward-sym))))
501      (if (equal sym "d=") (setq sym nil))      (if (member sym '(";" "d=")) (setq sym nil))
502      (if sym (sml-get-sym-indent sym)      (if sym (sml-get-sym-indent sym)
503        ;; FIXME: this can take a *long* time !!        ;; FIXME: this can take a *long* time !!
504        (setq sym (sml-find-matching-starter sml-starters-syms))        (setq sym (sml-find-matching-starter sml-starters-syms))
# Line 589  Line 590 
590  Optional argument STYLE is currently ignored."  Optional argument STYLE is currently ignored."
591    (assert (equal sym (save-excursion (sml-forward-sym))))    (assert (equal sym (save-excursion (sml-forward-sym))))
592    (save-excursion    (save-excursion
593      (let ((delegate (assoc sym sml-close-paren))      (let ((delegate (and (not (equal sym "end")) (assoc sym sml-close-paren)))
594            (head-sym sym))            (head-sym sym))
595        (when (and delegate (not (eval (third delegate))))        (when (and delegate (not (eval (third delegate))))
596          ;;(sml-find-match-backward sym delegate)          ;;(sml-find-match-backward sym delegate)
# Line 686  Line 687 
687            (progn (sml-backward-sexp prec)            (progn (sml-backward-sexp prec)
688                   (setq sym (save-excursion (sml-forward-sym)))                   (setq sym (save-excursion (sml-forward-sym)))
689                   (not (or (member sym syms) (bobp)))))                   (not (or (member sym syms) (bobp)))))
690        (unless (bobp) sym))))        (if (member sym syms) sym))))
691    
692  (defun sml-skip-siblings ()  (defun sml-skip-siblings ()
693    (while (and (not (bobp)) (sml-backward-arg))    (while (and (not (bobp)) (sml-backward-arg))
# Line 881  Line 882 
882              "\\>")))              "\\>")))
883  ;;;###autoload  ;;;###autoload
884  (add-to-list 'completion-ignored-extensions "CM/")  (add-to-list 'completion-ignored-extensions "CM/")
885    (add-to-list 'completion-ignored-extensions ".cm/")
886  ;;;###autoload  ;;;###autoload
887  (add-to-list 'auto-mode-alist '("\\.cm\\'" . sml-cm-mode))  (add-to-list 'auto-mode-alist '("\\.cm\\'" . sml-cm-mode))
888  ;;;###autoload  ;;;###autoload

Legend:
Removed from v.1471  
changed lines
  Added in v.1472

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