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

SCM Repository

[smlnj] Annotation of /sml/trunk/sml-mode/sml-site.el
ViewVC logotype

Annotation of /sml/trunk/sml-mode/sml-site.el

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (view) (download)

1 : monnier 32 ;;; sml-site.el. Site initialisation for sml-mode
2 :    
3 :     ;; Copyright (C) 1997, Matthew J. Morley
4 :     ;; Thanks to Ken Larsen <kla@it.dtu.dk> for his suggestions.
5 :    
6 :     ;; This file is not part of GNU Emacs, but it is distributed under the
7 :     ;; same conditions.
8 :    
9 :     ;; ====================================================================
10 :    
11 :     ;; This program is free software; you can redistribute it and/or
12 :     ;; modify it under the terms of the GNU General Public License as
13 :     ;; published by the Free Software Foundation; either version 2, or (at
14 :     ;; your option) any later version.
15 :    
16 :     ;; This program is distributed in the hope that it will be useful, but
17 :     ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 :     ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 :     ;; General Public License for more details.
20 :    
21 :     ;; You should have received a copy of the GNU General Public License
22 :     ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 :     ;; Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
24 :    
25 :     ;; ====================================================================
26 :    
27 :     ;;; DESCRIPTION
28 :    
29 :     ;; This file is provided for site administrators to install and
30 :     ;; configure sml-mode for the convenience of all their users. Even if
31 :     ;; you only install sml-mode for your private use, this is still a
32 :     ;; good place to do the necessary configuration.
33 :    
34 :     ;; Follow the comments below to set the (few) necessary defaults; add
35 :     ;; any other configurations to the end of the file. Users just need to
36 :     ;; put
37 :    
38 :     ;; (require 'sml-site)
39 :    
40 :     ;; in their .emacs files (along with any personal customisations).
41 :     ;; Make sure this file is on the user's *default* load-path!
42 :    
43 :     ;;; CODE
44 :    
45 :     ;; *******************
46 :     ;; sml-lisp-directory:
47 :     ;; *******************
48 :    
49 :     ;; This is where the sml-mode lisp (.el and/or .elc) files are to be
50 :     ;; kept. It is used for no purpose other than resetting the load-path
51 :     ;; variable. Site administrators might consider setqing this in their
52 :     ;; site-init.el file instead.
53 :    
54 :     ;; A subdirectory of site-lisp directory seems a reasonable place...
55 :    
56 :     (defvar sml-lisp-directory "/usr/local/share/emacs/site-lisp/sml-mode"
57 :     "*The directory where sml-mode lisp files are located.
58 :     Used in sml-site.el in resetting the Emacs lisp `load-path' (qv).")
59 :    
60 :     (if (member sml-lisp-directory load-path)
61 :     () ;take no prisoners
62 :     (setq load-path (cons sml-lisp-directory load-path)))
63 :    
64 :     ;; ****************
65 :     ;; auto-mode-alist:
66 :     ;; ****************
67 :    
68 :     ;; Buffers for files that end with these extensions will be placed in
69 :     ;; sml-mode automatically.
70 :    
71 :     (if (rassoc 'sml-mode auto-mode-alist)
72 :     () ;assume user has her own ideas
73 :     (setq auto-mode-alist
74 :     (append '(("\\.sml$" . sml-mode)
75 :     ("\\.ML$" . sml-mode)
76 :     ("\\.sig$" . sml-mode)) auto-mode-alist)))
77 :    
78 :     ;; **************
79 :     ;; sml-mode-info:
80 :     ;; **************
81 :    
82 :     ;; This is where sml-mode will look for it's online documentation.
83 :    
84 :     ;; The default value in sml-mode.el is "sml-mode" which is correct if
85 :     ;; sml-mode.info is placed somewhere on Emacs' default info directory
86 :     ;; path. If you move sml-mode.info to the root of the site's info
87 :     ;; hierarchy don't forget to add a `dir' file menu entry like
88 :    
89 :     ;; * SML: (sml-mode). Editing & Running Standard ML from Emacs
90 :    
91 :     ;; If you can't (or won't) move the .info file onto the default info
92 :     ;; directory path, uncomment this defvar and set the full name here.
93 :    
94 :     ;;(defvar sml-mode-info "/usr/???/sml-mode" "*Where to find sml-mode Info.")
95 :    
96 :     ;; *****************
97 :     ;; sml-program-name:
98 :     ;; *****************
99 :    
100 :     ;; sml-mode (sml-proc.el) defaults all its complier settings to SML/NJ
101 :     ;; (0.93, in this release of sml-mode). If the New Jersey compiler is
102 :     ;; called anything other than "sml" at your site, uncomment this
103 :     ;; defvar and set the correct name here.
104 :    
105 :     ;;(defvar sml-program-name "sml" "*Program to run as ML.")
106 :    
107 :     ;; The info file (Configuration) explains how to set up sml-mode for
108 :     ;; use with other ML compilers. Point users in that direction.
109 :    
110 :     ;;; AUTOLOADS
111 :    
112 :     (autoload 'sml-mode "sml-mode" "Major mode for editing Standard ML." t)
113 :     (autoload 'sml "sml-proc" "Run an inferior ML process." t)
114 :    
115 :     ;; By all means set up Moscow ML and/or Poly/ML to autoload, but first
116 :     ;; check that "mosml" and/or "poly" appear on the user's default PATH.
117 :    
118 :     (autoload 'sml-mosml "sml-mosml" "Set up and run Moscow ML." t)
119 :     (autoload 'sml-poly-ml "sml-poly-ml" "Set up and run Poly/ML." t)
120 :    
121 :     ;; If they don't, users will winge until they discover how to change
122 :     ;; their PATH, or redefine sml-program-name, for themselves.
123 :    
124 :     ;; Then
125 :    
126 :     (provide 'sml-site)
127 :    
128 :     ;; and tell users to (require 'sml-site) in their .emacs files for the
129 :     ;; above to take effect. Byte compile this file or not, as you wish.
130 :    
131 :     ;;; sml-site.el endeth.
132 :    

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