]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/prolog.el
(gnus-newsrc-file-version): Add defvar.
[gnu-emacs] / lisp / progmodes / prolog.el
index c5a169d2fa1441a53d19dba2bc8c1a4627c535ea..d23dbad0762d13f19187a92fda3ad926374744cb 100644 (file)
@@ -1,6 +1,7 @@
 ;;; prolog.el --- major mode for editing and running Prolog under Emacs
 
-;; Copyright (C) 1986, 1987, 2003, 2004 Free Software Foundation, Inc.
+;; Copyright (C) 1986, 1987, 2001, 2002, 2003, 2004, 2005
+;; Free Software Foundation, Inc.
 
 ;; Author: Masanobu UMEDA <umerin@mse.kyutech.ac.jp>
 ;; Keywords: languages
@@ -19,8 +20,8 @@
 
 ;; 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, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
 
 ;;; Code:
 
+(defvar comint-prompt-regexp)
+
+
 (defgroup prolog nil
-  "Major mode for editing and running Prolog under Emacs"
+  "Major mode for editing and running Prolog under Emacs."
   :group 'languages)
 
 
@@ -56,8 +60,8 @@
   :group 'prolog)
 
 (defcustom prolog-eof-string "end_of_file.\n"
-  "*String that represents end of file for prolog.
-nil means send actual operating system end of file."
+  "*String that represents end of file for Prolog.
+When nil, send actual operating system end of file."
   :type 'string
   :group 'prolog)
 
@@ -101,7 +105,7 @@ nil means send actual operating system end of file."
   (make-local-variable 'paragraph-ignore-fill-prefix)
   (setq paragraph-ignore-fill-prefix t)
   (make-local-variable 'imenu-generic-expression)
-  (setq imenu-generic-expression "^[a-z][a-zA-Z0-9_]+")
+  (setq imenu-generic-expression '((nil "^\\sw+" 0)))
   (make-local-variable 'indent-line-function)
   (setq indent-line-function 'prolog-indent-line)
   (make-local-variable 'comment-start)
@@ -158,7 +162,7 @@ rigidly along with this one (not yet)."
     ))
 
 (defun prolog-indent-level ()
-  "Compute prolog indentation level."
+  "Compute Prolog indentation level."
   (save-excursion
     (beginning-of-line)
     (skip-chars-forward " \t")
@@ -234,8 +238,8 @@ Entry to this mode calls the value of `prolog-mode-hook' with no arguments,
 if that value is non-nil.  Likewise with the value of `comint-mode-hook'.
 `prolog-mode-hook' is called after `comint-mode-hook'.
 
-You can send text to the inferior Prolog from other buffers
-using the commands `send-region', `send-string' and \\[prolog-consult-region].
+You can send text to the inferior Prolog from other buffers using the commands
+`process-send-region', `process-send-string' and \\[prolog-consult-region].
 
 Commands:
 Tab indents for Prolog; with argument, shifts rest
@@ -265,12 +269,12 @@ If COMPILE (prefix arg) is not nil, use compile mode rather than consult mode."
   (interactive "P\nr")
   (save-excursion
     (if compile
-       (send-string "prolog" prolog-compile-string)
-      (send-string "prolog" prolog-consult-string))
-    (send-region "prolog" beg end)
-    (send-string "prolog" "\n")                ;May be unnecessary
+       (process-send-string "prolog" prolog-compile-string)
+      (process-send-string "prolog" prolog-consult-string))
+    (process-send-region "prolog" beg end)
+    (process-send-string "prolog" "\n")                ;May be unnecessary
     (if prolog-eof-string
-       (send-string "prolog" prolog-eof-string)
+       (process-send-string "prolog" prolog-eof-string)
       (process-send-eof "prolog")))) ;Send eof to prolog process.
 
 (defun prolog-consult-region-and-go (compile beg end)