diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/sml-mode/BUGS | 11 | ||||
-rw-r--r-- | packages/sml-mode/INSTALL | 39 | ||||
-rw-r--r-- | packages/sml-mode/Makefile | 177 | ||||
-rw-r--r-- | packages/sml-mode/NEWS | 137 | ||||
-rw-r--r-- | packages/sml-mode/makefile.pkg | 15 | ||||
-rw-r--r-- | packages/sml-mode/sml-mode.el | 100 |
6 files changed, 88 insertions, 391 deletions
diff --git a/packages/sml-mode/BUGS b/packages/sml-mode/BUGS deleted file mode 100644 index 1623cdede8e..00000000000 --- a/packages/sml-mode/BUGS +++ /dev/null @@ -1,11 +0,0 @@ --*- text -*- - -Here are the current known bugs. -If you find any other, send it to <monnier@iro.umontreal.ca>. - -* M-x next-error and other compile.el support doesn't work on XEmacs. - -* indentation of a declaration after a long `datatype' is slow. - -* buggy indentation samples - Try `make test' to see the known problems in testcases.sml diff --git a/packages/sml-mode/INSTALL b/packages/sml-mode/INSTALL deleted file mode 100644 index 6fb7e67d704..00000000000 --- a/packages/sml-mode/INSTALL +++ /dev/null @@ -1,39 +0,0 @@ -SML-MODE shouldn't require any special external support package, -as far as I can rememebr. Just a recent copy of Emacs or XEmacs. - -Installation of the program -=================================== - - 1. Edit the file `Makefile' to reflect the situation at your site. - The only things you have to change is the definition of `lispdir' - and `infodir'. The elisp files will be copied to `lispdir', and - the info file to `infodir'. - - 2. Have some sorbet. - - 3. Type `make install' in the source directory. This will byte-compile - all `.el' files and copy all into the directory you specified in step - 1. It will also copy the info files (and add a corresponding entry to - the info-dir file if install-info can be found). - - If you only want to create the compiled elisp files, you can just type - `make elcfiles' instead. - - 4. Edit the file `site-start.el' in your emacs lisp directory (usually - `/usr/local/share/emacs/site-lisp' or something similar) and make it - load the file `sml-mode-startup.el'. It contains a couple of - `auto-load's that facilitates the use of sml-mode. Alternatively, you - can just use `make install_startup'. If you're only installing it for - yourself rather than for the whole system, then use something like - `make install_startup startupfile=$HOME/.emacs'. - - 5. If you had copied the contents of a previous sml-mode-startup.el file to - your site-start.el (or .emacs), you might want to remove that. - - -How to make typeset documentation from the TeXinfo manual -========================================================= - - If you have TeX installed at your site, you can make a typeset version of -the manual typing ``make dvi''. If you prefer a postscript version of this -file, just use ``make postscript''. diff --git a/packages/sml-mode/Makefile b/packages/sml-mode/Makefile deleted file mode 100644 index 0e54d795db5..00000000000 --- a/packages/sml-mode/Makefile +++ /dev/null @@ -1,177 +0,0 @@ -# Makefile for emacs-lisp package - -# Copyright (C) 1998,1999,2004,2007,2010-2012 Stefan Monnier <monnier@gnu.org> - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by the -# Free Software Foundation; either version 3, or (at your option) any -# later version. - -# This file is distributed in the hope that it will be useful, but WITHOUT -# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -# for more details. - -# You should have received a copy of the GNU General Public License -# along with GNU Emacs; see the file COPYING. If not, write to -# the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. - -# load the package-specific settings -include makefile.pkg - -# set up the usual installation paths -prefix = /usr/local -datadir = $(prefix)/share - -# the directory where you install third-party emacs packges -lispdir = $(datadir)/emacs/site-lisp - -# the directory where the .elc files will be installed -elcdir = $(lispdir)/$(PACKAGE) -# the directory where the .el files will be installed -eldir = $(elcdir) - -# the file where the initialization goes. -#startupfile = $(HOME/.emacs -startupfile = $(lispdir)/site-start.el - -# the directory where you installed the elib .elc files. -# This is only needed if your site-start.el (or default.el) does not -# set up elib correctly. -elibdir = $(lispdir)/elib - -# the directory where you install the info doc -infodir = $(prefix)/info -docdir = $(prefix)/doc - -EMACS = emacs -MAKEINFO= makeinfo -TEXI2DVI= texi2dvi -SHELL = /bin/sh -DVIPS = dvips -CP = cp -RM = rm -f -MKDIR = mkdir -p -ETAGS = etags - -###################################################################### -### No changes below this line should be necessary ### -###################################################################### - -ELFLAGS = --eval '(setq load-path (append (list "." "$(elibdir)" "$(lispdir)") load-path))' -ELC = $(EMACS) -batch $(ELFLAGS) -f batch-byte-compile - -ELCFILES = $(ELFILES:.el=.elc) - -TEXEXTS = *.cps *.fns *.kys *.vr *.tp *.pg *.log *.aux *.toc *.cp *.ky *.fn - -.SUFFIXES: .elc .el .info .ps .dvi .texi -.PHONY: elcfiles info clean distclean default -.PHONY: install_startup install_elc install install_el install_info -.PHONY: dvi postscript - -.el.elc: - $(ELC) $< - -.texi.info: - $(MAKEINFO) $< - -.texi.dvi: - $(TEXI2DVI) $< - -.dvi.ps: - $(DVIPS) -f $< >$@ - -###################################################################### - -default: elcfiles - -elcfiles: $(ELCFILES) -info: $(PACKAGE).info - -install_elc: $(ELCFILES) $(PACKAGE)-startup.el - $(MKDIR) $(elcdir) - for f in $(ELCFILES) $(PACKAGE)-startup.el; do \ - $(CP) $$f $(elcdir)/$$f ;\ - done - -install_el: - $(MKDIR) $(eldir) - for f in $(ELFILES); do \ - $(CP) $$f $(eldir)/$$f ;\ - done - -install_info: $(PACKAGE).info - $(MKDIR) $(infodir) - $(CP) *.info* $(infodir)/ - -[ ! -w $(infodir)/dir ] \ - || install-info --info-dir=$(infodir)/dir $(PACKAGE).info - -install_startup: - $(MKDIR) $(lispdir) - @if grep $(PACKAGE) $(lispdir)/site-start.el >/dev/null 2>&1 || \ - grep $(PACKAGE) $(startupfile) >/dev/null 2>&1 || \ - grep $(PACKAGE) $(lispdir)/default.el >/dev/null 2>&1; \ - then \ - echo "**********************************************************" ;\ - echo "*** It seems you already have some setup code" ;\ - echo "*** for $(PACKAGE) in your startup files." ;\ - echo "*** Check that it properly loads \"$(PACKAGE)-startup\"" ;\ - echo "**********************************************************" ;\ - else \ - echo 'echo ";; load $(PACKAGE) setup code" >>$(startupfile)' ;\ - echo ";; load $(PACKAGE) setup code" >>$(startupfile) ;\ - echo 'echo "(load \"$(elcdir)/$(PACKAGE)-startup\")" >>$(startupfile)' ;\ - echo "(load \"$(elcdir)/$(PACKAGE)-startup\")" >>$(startupfile) ;\ - fi - -postscript: $(PACKAGE).ps -dvi: $(PACKAGE).dvi -install_dvi: dvi - $(MKDIR) $(docdir) - $(CP) `find . -type f -name '*.dvi' -print` $(docdir)/ - -install: install_elc install_info install_startup install_el - -clean: - $(RM) *~ core .\#* $(TEXEXTS) - -TAGS tags: - $(ETAGS) $(ELFILES) - -distclean: clean - $(RM) *.elc *.dvi *.info* *.ps - -###################################################################### -### don't look below ### -###################################################################### - -$(PACKAGE)-startup.el: $(ELFILES) - echo "\ - ;;; $@ --- automatically extracted autoloads\n\ - ;;; Code:\n\ - (add-to-list 'load-path\n\ - (or (file-name-directory load-file-name) (car load-path)))\n\ - " >$@ - $(EMACS) --batch --eval '(setq generated-autoload-file "'`pwd`'/$@")' -f batch-update-autoloads "." - -## - -#TAG = $(shell echo v$(VERSION) | tr '.' '_') -URL=$(shell sed -n -e '5p' .svn/entries) -#TAG=$(shell dirname "$(URL)")/releases/$(PACKAGE)-$(VERSION) -TAG="v$(VERSION)" -ftpdir=/u/monnier/html/elisp/ -cvsmodule=$(shell cat CVS/Repository) -cvsroot=$(shell cat CVS/Root) - -dist: - echo bzr tag "$(TAG)" &&\ - bzr export "$(TMP)/$(PACKAGE)-$(VERSION)" &&\ - cd "$(TMP)/$(PACKAGE)-$(VERSION)" &&\ - $(MAKE) info $(PACKAGE)-startup.el &&\ - cd .. &&\ - ztar $(PACKAGE)-$(VERSION) &&\ - rm -rf $(PACKAGE)-$(VERSION) - mv $(TMP)/$(PACKAGE)-$(VERSION).tar.gz $(ftpdir)/ - ln -sf $(PACKAGE)-$(VERSION).tar.gz $(ftpdir)/$(PACKAGE).tar.gz diff --git a/packages/sml-mode/NEWS b/packages/sml-mode/NEWS deleted file mode 100644 index 4d9cc1c51a1..00000000000 --- a/packages/sml-mode/NEWS +++ /dev/null @@ -1,137 +0,0 @@ -Changes since 4.1: - -* New indentation code using SMIE when available. - -* `sml-back-to-outer-indent' is now on S-tab (aka `backtab') rather than M-tab. - -* Support for electric-layout-mode and electric-indent-mode. - -* `sml-mark-defun' tries to be more clever. - -* A single file (sml-mode.el) is needed unless you want to use an interactive - process like SML/NJ, or if your Emacs does not provide SMIE. - -Changes since 4.0: - -* Switch to GPLv3+. - -* When possible (i.e. running under Emacs>=23), be case-sensitive when - expanding abbreviations, and don't expand them in comments and strings. - -* When you `next-error' to a type error, highlight the actual parts of the - types that differ. - -* Flush the recorded errors not only upon sml-compile and friends, but also - when typing commands directly at the prompt. - -* New command sml-mlton-typecheck. - -* Simple support to parse errors and warnings in MLton's output. - -* Simple support for MLton's def-use files. - -Changes since 3.9.5: - -* No need to add the dir to your load-path any more. - The sml-mode-startup.el file does it for you. - -* Symbols like -> can be displayed as real arrows. See sml-font-lock-symbols. - -* Fix some incompatibilities with the upcoming Emacs-21.4. - -* Indentation rules improved. New customizable variable - `sml-rightalign-and'. Also `sml-symbol-indent' is now customizable. - -Changes since 3.9.3: - -* New add-log support (try C-x 4 a from within an SML function). - -* Imenu support - -* sml-bindings has disappeared. - -* The code skeletons are now abbrevs as well. - -* A new *sml* process is sent the content of sml-config-file (~/.sml-proc.sml) - if it exists. - -* `sml-compile' works yet a bit differently. The command can begin - with `cd "path";' and it will be replaced by OS.FileSys.chDir. - -* run-sml now pops up the new buffer. It can also run the command on another - machine. And it always prompts for the command name. Use a prefix - argument if you want to give args or to specify a host on which - to run the command. - -* mouse-2 to yank in *sml* should work again (but won't work for next-error - any more). - -* New major-modes sml-cm-mode, sml-lex-mode and sml-yacc-mode. - -* sml-load-hook has disappeared as has inferior-sml-load-hook. - -* sml-mode-startup.el is now automatically generated and you're supposed to - `load' it from .emacs or site-start.el. - -* Minor bug fixes. - -Changes since 3.3: - -* the sml-drag-* commands have disappeared. - -* added a little bit of `customize' support. Many of the customization - variables for indentation are still in flux, so they are not customize'd. - -* proformas have been replaced by skeletons. it's mostly the same as - before (the layout has slightly changed, tho). The main difference - is that the indentation relies on the major-mode indentation so it - is implicitly customized, which makes more sense to me. - Also I added an electric space M-SPC that will call the corresponding - skeleton if any matches the immediately preceding symbol. Basically - that allows you to type `l e t M-SPC' to call the `let' skeleton. - -* M-C-f and M-C-b try to be smart and jump around let..end and such blocks. - It's probably either too smart or not smart enough, tho. - -* there is no more sml-<compiler>.el since the code should work for "all" - known compilers. If your favorite compiler doesn't seem to work right - send me a sample session. - -* hilite support has disappeared and font-lock and menu support is now built-in. - -* the indentation algorithm is inherently much slower. I've tried to ensure - the slowness never manifests itself in practice, but if you find a case - where the indentation doesn't feel instantaneous, tell me. - -* function arguments get properly indented (yes, madam). - -* the indentation has been majorly reworked. The list of changes is too long. - Many customizations have disappeared, some may reappear depending on the - feedback I get. The indentation should now "always" work right, so - tell me when it doesn't. - -* nested comments are only properly handled if you have a nested-comments - aware Emacs (I don't know of any yet) or if you turn on font-lock. - -* provide `sml-compile' which does something similat to `compile' except it - passes the command to an inferior-sml process. Also it has an additional - hack to look for sml-make-file-name in parent directories and cd to it - before sending the command (handy for CM.make() when the sources.cm file - is not in the current directory). This hack is very ad-hoc and quite - misleading for people who don't use CM. I.e. the default is not safe. - -* sml-send-region and friends now always use a temp file. The temp file - management has been made a little more secure. - -* the overlay is now turned off by default. Instead the region is activated, - so that transient-mark-mode will end up highlighting the error just like - the overlay used to do. - -* sml-proc uses compile.el for error parsing. This mostly means that instead - of C-c ` you want to use the standard C-x `. It also means that error - formats for any compiler can be added more easily. - -* The special frame handling has been thrown out because it doesn't interact - well with Emacs' own similar feature. I believe XEmacs still doesn't provide - such a feature, so if you miss it, either switch to Emacs or (convince - someone else to) add it to XEmacs. diff --git a/packages/sml-mode/makefile.pkg b/packages/sml-mode/makefile.pkg deleted file mode 100644 index 47ea4ed25cd..00000000000 --- a/packages/sml-mode/makefile.pkg +++ /dev/null @@ -1,15 +0,0 @@ -PACKAGE = sml-mode -ELFILES = sml-mode.el - -default: elcfiles - -TESTCASE = testcases.sml - -test: - $(RM) $(TESTCASE).new - $(EMACS) --batch \ - --eval "(load \"$$(pwd)/sml-mode-startup\")" \ - $(TESTCASE) \ - --eval '(indent-region (point-min) (point-max) nil)' \ - --eval '(write-region (point-min) (point-max) "$(TESTCASE).new")' - diff -u -B $(TESTCASE) $(TESTCASE).new diff --git a/packages/sml-mode/sml-mode.el b/packages/sml-mode/sml-mode.el index beca4499453..02b35e2dcab 100644 --- a/packages/sml-mode/sml-mode.el +++ b/packages/sml-mode/sml-mode.el @@ -3,16 +3,15 @@ ;; Copyright (C) 1989,1999,2000,2004,2007,2010-2012 Free Software Foundation, Inc. ;; Maintainer: (Stefan Monnier) <monnier@iro.umontreal.ca> -;; Version: 6.0 +;; Version: 6.1 ;; Keywords: SML -;; Authors of previous versions: -;; Lars Bo Nielsen -;; Olin Shivers -;; Fritz Knabe (?) -;; Steven Gilmore (?) -;; Matthew Morley <mjm@scs.leeds.ac.uk> -;; Matthias Blume <blume@cs.princeton.edu> -;; (Stefan Monnier) <monnier@iro.umontreal.ca> +;; Author: Lars Bo Nielsen +;; Olin Shivers +;; Fritz Knabe (?) +;; Steven Gilmore (?) +;; Matthew Morley <mjm@scs.leeds.ac.uk> +;; Matthias Blume <blume@cs.princeton.edu> +;; (Stefan Monnier) <monnier@iro.umontreal.ca> ;; This file is part of GNU Emacs. @@ -43,6 +42,75 @@ ;; - outline-minor-mode (with some known problems). ;; - Interaction with a read-eval-print loop. +;;;; Known bugs: + +;; - Indentation after "functor toto() where type foo = bar =" +;; Because the last is treated as an equality comparison. +;; - indentation of a declaration after a long `datatype' can be slow. + +;;;; News: + +;;;;; Changes since 5.0: + +;; - sml-electric-pipe-mode to make the | key electric. +;; - Removal of a lot of compatibility code. Requires Emacs-24. +;; - Integrate in GNU ELPA. + +;;;;; Changes since 4.1: + +;; - New indentation code using SMIE when available. +;; - `sml-back-to-outer-indent' is now on S-tab (aka `backtab') rather +;; than M-tab. +;; - Support for electric-layout-mode and electric-indent-mode. +;; - `sml-mark-defun' tries to be more clever. +;; - A single file (sml-mode.el) is needed unless you want to use an +;; interactive process like SML/NJ, or if your Emacs does not provide SMIE. + +;;;;; Changes since 4.0: + +;; - Switch to GPLv3+. +;; - When possible (i.e. running under Emacs>=23), be case-sensitive when +;; expanding abbreviations, and don't expand them in comments and strings. +;; - When you `next-error' to a type error, highlight the actual parts of the +;; types that differ. +;; - Flush the recorded errors not only upon sml-compile and friends, but also +;; when typing commands directly at the prompt. +;; - New command sml-mlton-typecheck. +;; - Simple support to parse errors and warnings in MLton's output. +;; - Simple support for MLton's def-use files. + +;;;;; Changes since 3.9.5: + +;; - No need to add the dir to your load-path any more. +;; The sml-mode-startup.el file does it for you. +;; - Symbols like -> can be displayed as real arrows. +;; See sml-font-lock-symbols. +;; - Fix some incompatibilities with the upcoming Emacs-21.4. +;; - Indentation rules improved. New customizable variable +;; `sml-rightalign-and'. Also `sml-symbol-indent' is now customizable. + +;;;;; Changes since 3.9.3: + +;; - New add-log support (try C-x 4 a from within an SML function). +;; - Imenu support +;; - sml-bindings has disappeared. +;; - The code skeletons are now abbrevs as well. +;; - A new *sml* process is sent the content of sml-config-file +;; (~/.sml-proc.sml) if it exists. +;; - `sml-compile' works yet a bit differently. The command can begin +;; with `cd "path";' and it will be replaced by OS.FileSys.chDir. +;; - run-sml now pops up the new buffer. It can also run the command on +;; another machine. And it always prompts for the command name. +;; Use a prefix argument if you want to give args or to specify a host on +;; which to run the command. +;; - mouse-2 to yank in *sml* should work again (but won't work for next-error +;; any more). +;; - New major-modes sml-cm-mode, sml-lex-mode and sml-yacc-mode. +;; - sml-load-hook has disappeared as has inferior-sml-load-hook. +;; - sml-mode-startup.el is now automatically generated and you're supposed to +;; `load' it from .emacs or site-start.el. +;; - Minor bug fixes. + ;;; Code: (eval-when-compile (require 'cl)) @@ -116,7 +184,7 @@ notion of \"the end of an outline\".") (easy-menu-define sml-mode-menu sml-mode-map "Menu used in `sml-mode'." '("SML" ("Process" - ["Start SML repl" run-sml t] + ["Start SML repl" sml-run t] ["-" nil nil] ["Compile the project" sml-prog-proc-compile t] ["Send file" sml-prog-proc-load-file t] @@ -762,6 +830,11 @@ AND-GO if non-nil indicate to additionally switch to the process's buffer." (car sml-prog-proc--tmp-file))) str) +(defvar sml-prog-proc-comint-mode-map + (let ((map (make-sparse-keymap))) + (define-key map "\C-c\C-l" 'sml-prog-proc-load-file) + map)) + (define-derived-mode sml-prog-proc-comint-mode comint-mode "Sml-Prog-Proc-Comint" "Major mode for an inferior process used to run&compile source code." ;; Enable compilation-minor-mode, but only after the child mode is setup @@ -964,6 +1037,10 @@ See `compilation-error-regexp-alist' for a description of the format.") (read-string "On host: " sml-host-name) sml-host-name))) +;;;###autoload +(defalias 'run-sml 'sml-run) + +;;;###autoload (defun sml-run (cmd arg &optional host) "Run the program CMD with given arguments ARG. The command is run in buffer *CMD* using mode `inferior-sml-mode'. @@ -1014,8 +1091,7 @@ With a prefix argument AND-GO switch to the repl buffer as well." (defvar inferior-sml-mode-map (let ((map (make-sparse-keymap))) (set-keymap-parent map comint-mode-map) - (define-key map "\C-c\C-s" 'run-sml) - (define-key map "\C-c\C-l" 'sml-load-file) + (define-key map "\C-c\C-s" 'sml-run) (define-key map "\t" 'completion-at-point) map) "Keymap for inferior-sml mode.") |