Ok folks. As promised I've enclosed my jess-mode package for Emacs,
distributed as a Unix "shell-archive" (shar) file. The package
includes source for both jess-mode.el and inf-jess.el, plus a brief
README. There should be sufficient documentation within the README and
source files to get you started; drop me a line if you're having
difficulty.

NB: I've only tested jess-mode under Emacs 20.{3,4}, Linux and
Solaris. Indeed, the package might not work on Emacs versions older
that 19.34 because of changes to font-lock and comint.

You can also find this package on gnu.emacs.sources. Please send
enhancement requests and bug fixes directly to me. Enjoy.

Regards,

--    
-----------------------------------------------------------------
David E. Young
Fujitsu Network Communications  "The fact that ... we still
([EMAIL PROTECTED])    live well cannot ease the pain of
                                 feeling that we no longer live nobly."
                                  -- John Updike
"Programming should be fun,
 programs should be beautiful"
  -- P. Graham

------------ cut here ----------------
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.2).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 1999-08-16 14:49 EDT by <[EMAIL PROTECTED]>.
# Source directory was `/home/dey/elisp'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#   9428 -rw-r--r-- jess-mode.el
#  11720 -rw-r--r-- inf-jess.el
#   1826 -rw-rw-r-- README
#
save_IFS="${IFS}"
IFS="${IFS}:"
gettext_dir=FAILED
locale_dir=FAILED
first_param="$1"
for dir in $PATH
do
  if test "$gettext_dir" = FAILED && test -f $dir/gettext \
     && ($dir/gettext --version >/dev/null 2>&1)
  then
    set `$dir/gettext --version 2>&1`
    if test "$3" = GNU
    then
      gettext_dir=$dir
    fi
  fi
  if test "$locale_dir" = FAILED && test -f $dir/shar \
     && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
  then
    locale_dir=`$dir/shar --print-text-domain-dir`
  fi
done
IFS="$save_IFS"
if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
then
  echo=echo
else
  TEXTDOMAINDIR=$locale_dir
  export TEXTDOMAINDIR
  TEXTDOMAIN=sharutils
  export TEXTDOMAIN
  echo="$gettext_dir/gettext -s"
fi
touch -am 1231235999 $$.touch >/dev/null 2>&1
if test ! -f 1231235999 && test -f $$.touch; then
  shar_touch=touch
else
  shar_touch=:
  echo
  $echo 'WARNING: not restoring timestamps.  Consider getting and'
  $echo "installing GNU \`touch', distributed in GNU File Utilities..."
  echo
fi
rm -f 1231235999 $$.touch
#
if mkdir _sh02254; then
  $echo 'x -' 'creating lock directory'
else
  $echo 'failed to create lock directory'
  exit 1
fi
# ============= jess-mode.el ==============
if test -f 'jess-mode.el' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'jess-mode.el' '(file already exists)'
else
  $echo 'x -' extracting 'jess-mode.el' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'jess-mode.el' &&
;;; jess-mode.el --- Jess editing mode.
X
;; Copyright (C) 1999 by David E. Young.
X
;; Author: David E. Young <[EMAIL PROTECTED]>
;; Keywords: languages, jess
X
;; This is version 0.5 of 9 August 1999.
X
;; This program 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 2, or (at your option)
;; any later version.
X
;; This program 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.
X
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
;; 02111-1307  USA
X
;;; Commentary:
X
;; The major mode for editing Jess code. Very similar to CLIPS, which
;; in turn is a close relative of Lisp. This is an early,
;; "beta-quality" release; it's functional but a bit simplistic,
;; perhaps. Much of the code was borrowed from the various
;; Lisp-related modes developed for Emacs.
X
;; For interacting with a Jess interpreter see `run-jess' in
;; the `inf-jess' package.
X
;; Please send enhancement requests and bug reports directly to me
;; <[EMAIL PROTECTED]>. If you make a change yourself, or
;; adapt this program to another environment, I'd appreciate hearing
;; about it.
X
;; To do:
;;   * Figure out how to get 'font-lock' to recognize the "=>" and
;;     "<-" Jess symbols.
;;   * Figure out how to change the indentation rules for 'else and
;;     other similar keywords.
;;   * Add any more key bindings that make sense.
;;   * Consider defining user-customizable variables with 'defcustom'.
X
;;; Code:
X
(require 'lisp-mode)
X
(defvar jess-mode-map nil)
X
(defvar jess-mode-hook nil
X  "*Hooks for customising Jess mode.")
X
(defvar jess-mode-syntax-table nil
X  "The value of which is the syntax table for Jess mode.")
X
(when (not jess-mode-map)
X  (let ((map (make-sparse-keymap "Jess")))
X    (setq jess-mode-map
X      (nconc (make-sparse-keymap) shared-lisp-mode-map))
X    (define-key jess-mode-map [menu-bar] (make-sparse-keymap))
X    (define-key jess-mode-map [menu-bar jess]
X      (cons "Jess" map))
X    (define-key map [run-jess] '("Run Inferior Jess" . jess-mode-run-jess))
X    (define-key map [comment-region] '("Comment Region" . comment-region))
X    (define-key map [indent-region] '("Indent Region" . indent-region))
X    (define-key map [indent-line] '("Indent Line" . lisp-indent-line))))
X
(if (not jess-mode-syntax-table)
X    (let ((i 0))
X      (setq jess-mode-syntax-table (make-syntax-table))
X      (while (< i ?0)
X             (modify-syntax-entry i "_   " jess-mode-syntax-table)
X             (setq i (1+ i)))
X      (setq i (1+ ?9))
X      (while (< i ?A)
X             (modify-syntax-entry i "_   " jess-mode-syntax-table)
X             (setq i (1+ i)))
X      (setq i (1+ ?Z))
X      (while (< i ?a)
X             (modify-syntax-entry i "_   " jess-mode-syntax-table)
X             (setq i (1+ i)))
X      (setq i (1+ ?z))
X      (while (< i 128)
X             (modify-syntax-entry i "_   " jess-mode-syntax-table)
X             (setq i (1+ i)))
X      (modify-syntax-entry ?  "    " jess-mode-syntax-table)
X      (modify-syntax-entry ?\t "    " jess-mode-syntax-table)
X      (modify-syntax-entry ?\n ">   " jess-mode-syntax-table)
X      (modify-syntax-entry ?\f ">   " jess-mode-syntax-table)
X      (modify-syntax-entry ?\; "<   " jess-mode-syntax-table)
X      (modify-syntax-entry ?` "'   " jess-mode-syntax-table)
X      (modify-syntax-entry ?' "'   " jess-mode-syntax-table)
X      (modify-syntax-entry ?, "'   " jess-mode-syntax-table)
X      (modify-syntax-entry ?. "'   " jess-mode-syntax-table)
X      (modify-syntax-entry ?# "'   " jess-mode-syntax-table)
X      (modify-syntax-entry ?\" "\"    " jess-mode-syntax-table)
X      (modify-syntax-entry ?\\ "\\   " jess-mode-syntax-table)
X      (modify-syntax-entry ?\( "()  " jess-mode-syntax-table)
X      (modify-syntax-entry ?\) ")(  " jess-mode-syntax-table)
X      (modify-syntax-entry ?\[ "(]  " jess-mode-syntax-table)
X      (modify-syntax-entry ?\] ")[  " jess-mode-syntax-table)
X      (modify-syntax-entry ?*   "w   " jess-mode-syntax-table)
X      ;; The next syntax entry doesn't work with these forms:
X      ;;  `,.foo
X      ;;  #.foo
X      ;; but it works better with variables with .'s in them
X      (modify-syntax-entry ?. "w   " jess-mode-syntax-table)
X      (modify-syntax-entry ?\| "_   " jess-mode-syntax-table)
X      (modify-syntax-entry ?\[ "_   " jess-mode-syntax-table)
X      (modify-syntax-entry ?\] "_   " jess-mode-syntax-table)))
X
(defconst jess-font-lock-keywords-1
X  (eval-when-compile
X    (let ((jess-constructs
X           (regexp-opt
X            '("deffunction" "deftemplate" "defrule" "deffacts" "defgeneric"
X              "defmodule" "defadvice" "defglobal" "defmethod"
X              "definstance" "defclass")))
X         (jess-identifier
X          (let ((letter "a-zA-Z_$\-\300-\326\330-\366\370-\377")
X                (digit "0-9"))
X            (concat "\\<\\([" letter "][" letter digit "]*\\)\\>"))))
X     (list
X      (cons (concat "\\<" jess-constructs "\\>\\s *" jess-identifier)
X            `(,(+ 1 (regexp-opt-depth jess-constructs)) font-lock-function-name-face))
X      (cons (concat "\\<\\(" jess-constructs "\\)\\>") 'font-lock-keyword-face))))
X  "Subdued expressions to highlight in Jess modes.")
X
(defconst jess-font-lock-keywords-2
X  (append jess-font-lock-keywords-1
X          (eval-when-compile
X            (let ((jess-builtins
X                   (regexp-opt
X                    '("slot" "multislot" "type" "default" "default-dynamic"
X                      "extends" "crlf""range" "nil" "if" "then" "else" "while"
X                      "progn" "progn$" "not" "or" "switch" "case" "and" "reset"
X                      "assert" "test" "declare" "salience" "return" "bind"
X                      "retract" "explicit" "unique" "node-index-hash" "halt"
X                      "=>")))
X                  (jess-connective-constraints
X                   (regexp-opt '("|" "&"))))
X              (list
X               (cons (concat "\\<\\(" jess-builtins "\\)\\>") 'font-lock-builtin-face)
X               (cons (concat "\\<\\(" jess-connective-constraints "\\)\\>")
X                     'font-lock-builtin-face)))))
X  "Gaudy expressions to highlight in Jess modes.")
X
(defvar jess-font-lock-keywords jess-font-lock-keywords-2
X  "Default expressions to highlight in Jess modes.")
X
(defun jess-initialize-mode ()
X  (set-syntax-table jess-mode-syntax-table)
X  (make-local-variable 'paragraph-start)
X  (setq paragraph-start (concat page-delimiter "\\|$" ))
X  (make-local-variable 'paragraph-separate)
X  (setq paragraph-separate paragraph-start)
X  (make-local-variable 'paragraph-ignore-fill-prefix)
X  (setq paragraph-ignore-fill-prefix t)
X  (make-local-variable 'fill-paragraph-function)
X  (setq fill-paragraph-function 'lisp-fill-paragraph)
X  ;; Adaptive fill mode gets in the way of auto-fill,
X  ;; and should make no difference for explicit fill
X  ;; because lisp-fill-paragraph should do the job.
X  (make-local-variable 'adaptive-fill-mode)
X  (setq adaptive-fill-mode nil)
X  (make-local-variable 'indent-line-function)
X  (setq indent-line-function 'lisp-indent-line)
X  (make-local-variable 'indent-region-function)
X  (setq indent-region-function 'lisp-indent-region)
X  (make-local-variable 'parse-sexp-ignore-comments)
X  (setq parse-sexp-ignore-comments t)
X  (make-local-variable 'outline-regexp)
X  (setq outline-regexp ";;; \\|(....")
X  (make-local-variable 'comment-start)
X  (setq comment-start ";")
X  (make-local-variable 'comment-start-skip)
X  ;; Look within the line for a ; following an even number of backslashes
X  ;; after either a non-backslash or the line beginning.
X  (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
X  (make-local-variable 'comment-column)
X  (setq comment-column 40)
X  (make-local-variable 'comment-indent-function)
X  (setq comment-indent-function 'lisp-comment-indent)
X  (make-local-variable 'imenu-generic-expression)
X  (setq imenu-generic-expression lisp-imenu-generic-expression)
X  (make-local-variable 'font-lock-defaults)
X  (setq font-lock-defaults '(jess-font-lock-keywords))
X  (use-local-map jess-mode-map)
X  (set-syntax-table jess-mode-syntax-table))
X
(put 'else 'jess-indent-function 0)
X
(defun jess-indent-function (ipoint state)
X  (message "jess-indent-function")
X  (lisp-indent-function ipoint state))
X
(defun jess-mode ()
X  "Major mode for editing Jess code.
Editing commands are similar to those of other Lisp-like modes.
X
In addition, if an inferior Jess process is running, some additional
commands will be defined for evaluating expressions and controlling
the interpreter. The status of the process will also be displayed in
the modeline of all Jess buffers.
X
Commands:
\\{jess-mode-map}
Entry to this mode calls the value of `jess-mode-hook' if that value
is non-nil."
X  (interactive)
X  (kill-all-local-variables)
X  (jess-initialize-mode)
X  (setq major-mode 'jess-mode)
X  (setq mode-name "Jess")
X  (run-hooks 'jess-mode-hook))
X
(defun jess-mode-run-jess ()
X  "Load the inferior Jess mode (if necessary) and run the interpreter."
X  (require 'inf-jess)
X  (run-jess))
X
(provide 'jess-mode)
X
;;; jess-mode.el ends here
SHAR_EOF
  $shar_touch -am 0816114999 'jess-mode.el' &&
  chmod 0644 'jess-mode.el' ||
  $echo 'restore of' 'jess-mode.el' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'jess-mode.el:' 'MD5 check failed'
dfeba5f0b91c4f2132a55b2187aa418b  jess-mode.el
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'jess-mode.el'`"
    test 9428 -eq "$shar_count" ||
    $echo 'jess-mode.el:' 'original size' '9428,' 'current size' "$shar_count!"
  fi
fi
# ============= inf-jess.el ==============
if test -f 'inf-jess.el' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'inf-jess.el' '(file already exists)'
else
  $echo 'x -' extracting 'inf-jess.el' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'inf-jess.el' &&
;;; inf-jess.el --- Inferior Jess mode.
X
;; Copyright (C) 1999 by David E. Young.
X
;; Author: David E. Young <[EMAIL PROTECTED]>
;; Keywords: languages, jess
X
;; This is version 0.5 of 9 August 1999.
X
;; This program 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 2, or (at your option)
;; any later version.
X
;; This program 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.
X
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
;; 02111-1307  USA
X
;;; Commentary:
X
;; An inferior mode for running a Jess interpreter within Emacs.
X
;; The mechanism used to invoke Jess can be customized by setting
;; various hooks and variables. In fact, you *must* set the variable
;; `inferior-jess-program' to something meaningful. For example, from
;; within your '.emacs' you might have something like:
;;
;;  (add-hook 'inferior-jess-load-hook
;;            #'(lambda ()
;;                (setq inferior-jess-program
;;                      #'(lambda ()
;;                          '("-classpath" "/usr/local/jess/jess.jar"
;;                            "jess.Main")))))
;;
;; inf-jess will evaluate `inferior-jess-program' to create the Java
;; VM's argument list, then run the interpreter using the VM specified
;; by `inferior-jess-vm'. Alternatively, if you typically invoke Jess
;; via a shell script do something like:
;;
;;   (add-hook 'inferior-jess-load-hook
;;             #'(lambda ()
;;                 (setq inferior-jess-program
;;                       "/usr/local/bin/jess")))
;;
;; In this case, inf-jess will ignore `inferior-jess-vm' and use the
;; supplied shell script to run the interpreter.
X
;; See the documentation on `inf-jess-mode' for additional
;; information.
X
;; Please send enhancement requests and bug reports directly to me
;; <[EMAIL PROTECTED]>. If you make a change yourself, or
;; adapt this program for use with another language (CLIPS perhaps)
;; I'd appreciate hearing about it.
X
;; To do:
;;   * Consider defining user-customizable variables with 'defcustom'.
;;   * Consider eliminating the variable `inferior-jess-vm'; get the
;;     name of the Java executable by evaluating (first inferior-jess-program)
;;     instead.
X
;;; Code:
X
(require 'comint)
(require 'jess-mode)
X
(defvar inferior-jess-mode-map nil)
X
(defvar inferior-jess-mode-hook nil
X  "*Hooks for customising Jess mode.")
X
(defvar inferior-jess-load-hook nil
X  "*Hooks run after this module is loaded.")
X
(defvar inferior-jess-buffer nil
X  "The current inferior Jess process buffer.")
X
(defvar inferior-jess-program nil
X  "*Defines a program name or function used to construct an inferior
Jess process.
If this variable evaluates to a string, it is interpreted as a
'self-contained' executable (eg. shell script) that requires no
arguments. If this variable's value is a function, it should evaluate
to a list of arguments which are handed to the Java virtual machine as
defined by `inferior-jess-vm'.")
X
(defvar inferior-jess-vm "java"
X  "*Defines the virtual machine used to run an inferior Jess process.")
X
(defvar source-modes '(inferior-jess-mode)
X  "*Used to determine whether or not a buffer contains Jess source code.")
X
(defvar previous-dir/file nil
X  "Records the last directory and file used in loading. Holds a dotted
pair of the form `(DIRECTORY . FILE)' describing the last
`load-file' command.")
X
(when (not inferior-jess-mode-map)
X  (setq inferior-jess-mode-map
X    (copy-keymap comint-mode-map)))
X
(define-key inferior-jess-mode-map "\C-ci" 'inf-jess-reset-engine) ; initialize engine
(define-key inferior-jess-mode-map "\C-cl" 'inf-jess-load-file)
(define-key inferior-jess-mode-map "\C-cg" 'inf-jess-run-engine) ; "go"...
(define-key inferior-jess-mode-map "\C-cf" 'inf-jess-get-facts)
(define-key inferior-jess-mode-map "\C-cr" 'inf-jess-get-rules)
X
;; These keys augment 'jess-mode-map' with behavior specific to an
;; inferior Jess process...
X
(define-key jess-mode-map "\C-x\C-e" 'inf-jess-eval-last-sexp)  ; GNU convention
(define-key jess-mode-map "\M-\C-x" 'inf-jess-eval-deffunction) ; GNU convention
(define-key jess-mode-map "\C-ce" 'inf-jess-eval-region)
(define-key jess-mode-map "\C-ct" 'inf-jess-eval-deftemplate)
X
(defun inferior-jess-mode ()
X  "Major mode for interacting with an inferior Jess process.
Runs a Jess interpreter as a subprocess of Emacs, with Jess I/O
through an Emacs buffer.  Variable `inferior-jess-program'
controls how the Jess interpreter is run.
X
For information on running multiple processes in multiple buffers, see
documentation for variable `inferior-jess-buffer'.
X
\\{inferior-jess-mode-map}
X
Customisation: Entry to this mode runs the hooks on `comint-mode-hook' and
`inferior-jess-mode-hook' (in that order).
X
You can send text to the inferior Jess process from other buffers containing
Jess source.  
X    switch-to-inferior-jess switches the current buffer to the Jess process buffer.
X    jess-eval-region sends the current region to the Jess process.
X
X    Prefixing the jess-eval-region command with a
X    \\[universal-argument] causes a switch to the Jess process buffer
X    after sending the text.
X
Commands:
Return after the end of the process' output sends the text from the 
X    end of process to point.
Return before the end of the process' output copies the sexp ending at point
X    to the end of the process' output, and sends it.
Delete converts tabs to spaces as it moves back.
Tab indents for Jess; with argument, shifts rest
X    of expression rigidly with the current line.
C-M-q does Tab on each line starting within following expression.
Paragraphs are separated only by blank lines.  Semicolons start comments.
If you accidentally suspend your process, use \\[comint-continue-subjob]
to continue it."
X  (interactive)
X  (kill-all-local-variables)
X  (comint-mode)
X  (setq major-mode 'inferior-jess-mode)
X  (setq mode-name "Inferior Jess")
X  (setq mode-line-process '(": %s"))
X  (use-local-map inferior-jess-mode-map)
X  (setq comint-input-sentinel 'ignore)
X  (run-hooks 'inferior-jess-mode-hook))
X
(defun run-jess (&optional image)
X  "Run an inferior Jess process, with input and output via buffer
`*jess*'. If there is a process already running in `*jess*', just
switch to that buffer.
With argument, allows you to edit the command line (default is value
of `inferior-jess-program').  Runs the hooks from
`inferior-jess-mode-hook' (after the `comint-mode-hook' is run).
\(Type \\[describe-mode] in the process buffer for a list of commands.)"
X  (interactive (list
X                (and current-prefix-arg
X                     (read-string "Run Jess like this: "))))
X  (when (not (comint-check-proc "*jess*"))
X    (let* ((image
X            (or image inferior-jess-program))
X           (buffer
X            (cond ((stringp image)
X                   (make-comint "jess" image))
X                  ((functionp image)
X                   (apply 'make-comint
X                          "jess" inferior-jess-vm nil
X                          (funcall image)))
X                  (t
X                   (error "Variable `inferior-jess-program' must be either stringp or 
functionp")))))
X      (set-buffer buffer)
X      (inferior-jess-mode)))
X  (setq inferior-jess-buffer "*jess*")
X  (switch-to-buffer inferior-jess-buffer))
X
(defun test-run-jess ()
X  (interactive)
X  (setq inferior-jess-program
X        #'(lambda ()
X            '("-classpath"
X              "/files/devel/jem/classes/jess.jar"
X              "jess.Main")))
X  (run-jess))
X                      
(defun inf-jess-send-request(req)
X  (let ((proc (inferior-jess-process)))
X    (comint-send-string proc (concat req "\n"))))
X
(defun inf-jess-load-file (fname)
X  "Load a Jess source file into the inferior Jess process."
X  (interactive
X   (comint-get-source "Load Jess file: "
X                      previous-dir/file
X                      source-modes t))
X  (comint-check-source fname)
X  (setq previous-dir/file
X    (cons (file-name-directory fname)
X          (file-name-nondirectory fname)))
X  (inf-jess-send-request (format "(batch %s)" fname))
X  (switch-to-inferior-jess t))
X
(defun inf-jess-get-facts ()
X  "Retrieve the fact list from the inferior Jess process."
X  (interactive)
X  (inf-jess-send-request "(facts)"))
X
(defun inf-jess-get-rules ()
X  "Retrieve the rule list from the inferior Jess process."
X  (interactive)
X  (inf-jess-send-request "(rules)"))
X
(defun inf-jess-reset-engine ()
X  "Reset the inference engine running in the inferior Jess process."
X  (interactive)
X  (inf-jess-send-request "(reset)"))
X
(defun inf-jess-run-engine ()
X  "Run the inference engine in the inferior Jess process."
X  (interactive)
X  (inf-jess-send-request "(run)"))
X
(defun inferior-jess-process ()
X  (let ((proc (get-buffer-process
X               (if (eq major-mode 'inferior-jess-mode)
X                   (current-buffer)
X                 inferior-jess-buffer))))
X    (or proc
X        (error "No Jess sub-process; see variable `inferior-jess-buffer'"))))
X
(defun switch-to-inferior-jess (eob-p)
X  "Switch to the inferior Jess process buffer.
With argument, positions cursor at end of buffer."
X  (interactive "P")
X  (if (get-buffer-process inferior-jess-buffer)
X      (let ((pop-up-frames
X            ;; Be willing to use another frame
X            ;; that already has the window in it.
X             (or pop-up-frames
X                 (get-buffer-window inferior-jess-buffer t))))
X        (pop-to-buffer inferior-jess-buffer))
X    (run-jess inferior-jess-program))
X  (when eob-p
X    (push-mark)
X    (goto-char (point-max))))
X
(defun inf-jess-eval-region (start end &optional and-go)
X  "Send the current region to the inferior Jess process.
Prefix argument forces switch to Jess buffer afterwards."
X  (interactive "r\nP")
X  (let ((proc (inferior-jess-process)))
X    (comint-send-region proc start end)
X    (comint-send-string proc "\n")
X    (if and-go
X        (switch-to-inferior-jess t))))
X
(defun inf-jess-eval-last-sexp (&optional and-go)
X  "Send the previous sexp to the inferior Jess process.
Prefix argument means switch to the Jess buffer afterwards."
X  (interactive "P")
X  (inf-jess-eval-region
X   (save-excursion
X     (backward-sexp) (point))
X   (point) and-go))
X
(defun inf-jess-eval-form (&optional and-go)
X  "Send the current form to the inferior Jess process.
Prefix argument means switch to the Jess buffer afterwards."
X  (interactive "P")
X  (save-excursion
X    (end-of-defun)
X    (skip-chars-backward " \t\n\r\f") ;  Makes allegro happy
X    (let ((end (point)))
X      (beginning-of-defun)
X      (inf-jess-eval-region (point) end)))
X  (if and-go
X      (switch-to-inferior-jess t)))
X
(defun inf-jess-eval-deffunction (&optional and-go)
X  "Send the current deffunction to the inferior Jess process.
Prefix argument means switch to the Jess buffer afterwards."
X  (interactive "P")
X  (inf-jess-eval-form and-go))
X
(defun inf-jess-eval-defrule (&optional and-go)
X  "Send the current defrule to the inferior Jess process.
Prefix argument means switch to the Jess buffer afterwards."
X  (interactive "P")
X  (inf-jess-eval-form and-go))
X
(defun inf-jess-eval-deftemplate (&optional and-go)
X  "Send the current deftemplate to the inferior Jess process.
Prefix argument means switch to the Jess buffer afterwards."
X  (interactive "P")
X  (inf-jess-eval-form and-go))
X
(run-hooks 'inferior-jess-load-hook)
X
(provide 'inf-jess)
X
;;; inf-jess.el ends here
SHAR_EOF
  $shar_touch -am 0816115599 'inf-jess.el' &&
  chmod 0644 'inf-jess.el' ||
  $echo 'restore of' 'inf-jess.el' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'inf-jess.el:' 'MD5 check failed'
651c1d1468e4ab3d4ea1d73107cc5f5e  inf-jess.el
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'inf-jess.el'`"
    test 11720 -eq "$shar_count" ||
    $echo 'inf-jess.el:' 'original size' '11720,' 'current size' "$shar_count!"
  fi
fi
# ============= README ==============
if test -f 'README' && test "$first_param" != -c; then
  $echo 'x -' SKIPPING 'README' '(file already exists)'
else
  $echo 'x -' extracting 'README' '(text)'
  sed 's/^X//' << 'SHAR_EOF' > 'README' &&
This package contains a beta version of jess-mode, a collection of
Emacs Lisp files designed to facilitate the development of Jess
applications. Currently, jess-mode consists of two source files:
X
X  * inf-jess.el: An inferior mode for running a Jess interpreter
X    within Emacs. This mode is derived from 'comint', and offers hooks
X    to customize the way Jess is invoked.
X
X  * jess-mode.el: A major mode for editing Jess code. Based on
X    'lisp-mode', jess-mode includes such niceties as font-lock support
X    and special commands for evaluating expressions and controlling an
X    inferior Jess interpreter.
X
To use jess-mode you should probably install the files in some
location accessible via 'load-path' (like site-lisp or perhaps your
personal elisp repository). Otherwise, you'll have to tell Emacs where
jess-mode lives. You might put something like
X
X  (setq load-path (cons "<path to jess-mode>" load-path))
X
in your .emacs file, or wherever you keep such things. Next, you'll
probably want to "auto load" the functions 'jess-mode' and 'run-jess';
add the following someplace appropriate (again, perhaps your .emacs
file):
X
X  (autoload 'jess-mode "jess-mode" "Jess Editing Mode" t nil)
X  (autoload 'run-jess "inf-jess" "Inferior Jess Mode" t nil)
X
Finally, tell Emacs to start 'jess-mode' whenever you visit a Jess
source file:
X
X  (setq auto-mode-alist
X        (append '(("\\.clp$" . jess-mode))))
X
To run an inferior Jess process you must first tell inf-jess how Jess
should be started. Look at the documentation at the top of inf-jess.el
for an explanation and examples. Once this has been accomplished,
evaluating the form (run-jess) should give you a buffer attached to
the inferior process.
X
Send any comments and all your bug fixes/complaints to
`[EMAIL PROTECTED]'.
X
X                
X
X
X
X
X        
SHAR_EOF
  $shar_touch -am 0816144999 'README' &&
  chmod 0664 'README' ||
  $echo 'restore of' 'README' 'failed'
  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
    || $echo 'README:' 'MD5 check failed'
d6ccc93399c93fccac98e07ea53fc2e9  README
SHAR_EOF
  else
    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < 'README'`"
    test 1826 -eq "$shar_count" ||
    $echo 'README:' 'original size' '1826,' 'current size' "$shar_count!"
  fi
fi
rm -fr _sh02254
exit 0
---------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the
list (use your own address!) List problems? Notify [EMAIL PROTECTED]
---------------------------------------------------------------------

Reply via email to