"Editing SML code."
:group 'languages)
-(defvar sml-outline-regexp "[ \t]*\\((\\*+\\|\\(let[ \t]+\\)?fun.\\)"
- "Regexp matching a major heading.")
+(defvar sml-outline-regexp
+ ;; `st' and `si' are to match structure and signature.
+ "\f\\|s[ti]\\|[ \t]*\\(let[ \t]+\\)?\\(fun\\|and\\)\\>"
+ "Regexp matching a major heading.
+This actually can't work without extending `outline-minor-mode' with the
+notion of \"the end of an outline\".")
;;;
;;; Internal defines
--- /dev/null
+%define emacs emacs
+%define prefix %{_prefix}
+%define datadir %{_datadir}
+%define lispdir %{datadir}/emacs/site-lisp
+%define startupfile %{lispdir}/site-start.el
+%define infodir %{_infodir}
+
+Summary: Emacs mode for editing Standard ML source
+Name: sml-mode
+Version: 3.9.3
+Release: 3
+Group: Applications/Editors
+Copyright: GPL
+Packager: José Romildo Malaquias <romildo@iceb.ufop.br>
+Source: ftp://flint.cs.yale.edu/pub/monnier/sml-mode/sml-mode-%{version}.tar.gz
+Buildroot: %{_tmppath}/%{name}-buildroot
+Requires: %{emacs}
+BuildArch: noarch
+
+%description
+SML-MODE is a major Emacs mode for editing Standard ML. It provides syntax
+highlighting and automatic indentation and comes with sml-proc which allows
+interaction with an inferior SML interactive loop.
+
+%prep
+%setup -q -n sml-mode-%{version}
+%patch -p1 -b .compat
+
+%install
+rm -rf $RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT%{infodir}
+make install install_el install_startup \
+ prefix=$RPM_BUILD_ROOT%{prefix} \
+ datadir=$RPM_BUILD_ROOT%{datadir} \
+ infodir=$RPM_BUILD_ROOT%{infodir} \
+ lispdir=$RPM_BUILD_ROOT%{lispdir} \
+ startupfile=$RPM_BUILD_ROOT%{startupfile} \
+ EMACS=%{emacs}
+
+gzip -9f $RPM_BUILD_ROOT%{lispdir}/sml-mode/*.el
+
+sed -e "s|$RPM_BUILD_ROOT||" $RPM_BUILD_ROOT%{startupfile} > $RPM_BUILD_ROOT%{lispdir}/sml-mode/sml-mode-startup.el
+
+texi2pdf sml-mode.texi
+
+if [ %{xemacs}x!=\%{xemacs}x ]; then
+ mkdir -p $RPM_BUILD_ROOT%{lispdir}/../man
+ cp -p sml-mode.texi $RPM_BUILD_ROOT%{lispdir}/../man
+ echo "%doc %{lispdir}/../man/sml-mode.texi" > files
+else
+ echo "%doc sml-mode.texi" > files
+fi
+
+%post
+cat >> %{startupfile} <<EOF
+;; sml-mode-start
+;; This section was automatically generated by rpm
+(load-library "%{lispdir}/sml-mode/sml-mode-startup.el")
+;; End of automatically generated section
+;; sml-mode-end
+EOF
+
+if [ %{xemacs}x=\%{xemacs}x ]; then
+ /sbin/install-info %{infodir}/sml-mode.info.gz %{infodir}/dir --section=Emacs
+fi
+
+%postun
+ed -s %{startupfile} <<EOF
+/^;; sml-mode-start$/,/^;; sml-mode-end$/d
+wq
+EOF
+if [ %{xemacs}=\%{xemacs} ]; then
+ /sbin/install-info --delete %{infodir}/sml-mode.info.gz %{infodir}/dir
+fi
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files -f files
+%defattr(-,root,root)
+%doc BUGS ChangeLog INSTALL NEWS README TODO
+%doc sml-mode.texi sml-mode.pdf
+%{lispdir}/sml-mode
+%{infodir}/*
+
+%changelog
+* Thu Oct 5 2000 José Romildo Malaquias <romildo@iceb.ufop.br>
+- Rebuild for Red Hat Linux 7.0
+
+* Thu Aug 17 1999 José Romildo Malaquias <romildo@iceb.ufop.br>
+- Version 3.9.3.
+- Emacs/XEmacs switching.
+
+* Tue Jun 23 1998 José Romildo Malaquias <romildo@iceb.ufop.br>
+- initialization of spec file.
+