Sather editing in GNU Emacs
==========================

The modern modes require GNU Emacs 27.1 or newer. They replace the Emacs 19
and hilit19/hl319 integration. The original modes were written by Stephen
M. Omohundro and Kevin K. Lewis.

The RPM installs the Lisp source and bytecode under the standard Emacs
site-lisp directory and an autoload-only sather-init.el in site-start.d.
Visiting .sa/.psa or .module/.pmodule files selects the appropriate mode.
No personal init-file changes are needed after installing the RPM.

For an unpackaged source checkout, add this directory to load-path, then:
    (autoload 'sather-mode "sather" nil t)
    (autoload 'sather-module-mode "sather-module" nil t)
    (add-to-list 'auto-mode-alist '("\\.p?sa\\'" . sather-mode))
    (add-to-list 'auto-mode-alist '("\\.p?module\\'" . sather-module-mode))

Editing
-------
TAB indents a line; C-M-\ indents a region. The default block indentation
is three spaces. Use M-x customize-group RET sather to change block and
continuation indentation or the compile/browser commands.

Indentation understands class/routine bodies, inline end clauses, if/elsif/
else, case/typecase, protect/when, lock/guard, par/fork/parloop, with/near,
include aliases, delimiter continuation, generic parameters and array
literals. Comments, strings and character literals do not create blocks.
Region indentation preserves empty lines and quoted content.

Font-lock distinguishes keywords, types (including $ABSTRACT types),
routine definitions, iterators, attributes, numeric literals and comments.
Module mode highlights compiler options, paths and $(VARIABLE) references
and aligns continued class lists after -has.

C-c C-c compiles the current file; M-x next-error visits compiler errors,
including file:line:column diagnostics and filenames containing spaces.
C-c C-b opens the current file in sabrowse. The browser must be installed.
M-x imenu lists classes and routines; C-M-a/C-M-e navigate definitions.
Standard Emacs comment, fill, electric-indent and show-paren facilities work.

Compatibility
-------------
The feature names sather, sather-module and sather-lib remain available.
sather-indent, sather-continued-line-indent, sather-comment-col and custom
compile/browser command settings remain supported. The helper sather-lib
is now a compatibility loader; it no longer replaces built-in Emacs functions.
Obsolete XEmacs/hilit19 support, template/mail-report commands and the old
private editing toggles are not loaded. Use standard Emacs facilities instead.
The historical Texinfo documentation describes the old mode; this README
describes the installed implementation.

Tests
-----
From the source root:
    emacs -Q --batch -L Emacs -l Test/test-emacs.el \
        -f ert-run-tests-batch-and-exit

The RPM byte-compiles the three libraries with warnings treated as errors
and runs these ERT tests. The site startup file is deliberately not byte-
compiled: it only establishes load-path, autoloads and filename associations.
