(compile-mouse-goto-error): New command.
[bpt/emacs.git] / lisp / forms.el
index a2a296d..d6ad210 100644 (file)
@@ -1,7 +1,7 @@
 ;;; forms.el -- Forms mode: edit a file as a form to fill in.
 ;;; Copyright (C) 1991, 1993 Free Software Foundation, Inc.
 
-;; Author: Johan Vromans <jv@mh.nl>
+;; Author: Johan Vromans <jv@nl.net>
 ;; Version: $Revision: 2.3 $
 
 ;; This file is part of GNU Emacs.
 (defconst forms-version (substring "$Revision: 2.3 $" 11 -2)
   "The version number of forms-mode (as string).  The complete RCS id is:
 
-  $Id: forms.el,v 2.3 1993/09/26 14:07:12 jv Exp $")
+  $Id: forms.el,v 2.3 1993/10/21 00:43:51 rms Exp kwzh $")
 
 (defvar forms-mode-hooks nil
   "Hook functions to be run upon entering Forms mode.")
@@ -545,6 +545,10 @@ Commands:                        Equivalent keys in read-only mode:
     ;;(message "forms: building keymap... done.")
     )
 
+  ;; set the major mode indicator
+  (setq major-mode 'forms-mode)
+  (setq mode-name "Forms")
+
   ;; find the data file
   (setq forms--file-buffer (find-file-noselect forms-file))
 
@@ -565,12 +569,13 @@ Commands:                        Equivalent keys in read-only mode:
        (setq forms-read-only t)))
 
   ;;(message "forms: proceeding setup...")
-  ;; set the major mode indicator
-  (setq major-mode 'forms-mode)
-  (setq mode-name "Forms")
-  (make-local-variable 'minor-mode-alist) ; needed?
-  ;;(message "forms: proceeding setup (minor mode)...")
-  (forms--set-minor-mode)
+
+  ;; Since we aren't really implementing a minor mode, we hack the modeline
+  ;; directly to get the text " View " into forms-read-only form buffers.  For
+  ;; that reason, this variable must be buffer only.
+  (make-local-variable 'minor-mode-alist)
+  (setq minor-mode-alist (list (list 'forms-read-only " View")))
+
   ;;(message "forms: proceeding setup (keymaps)...")
   (forms--set-keymaps)
   ;;(message "forms: proceeding setup (commands)...")
@@ -1071,12 +1076,6 @@ Commands:                        Equivalent keys in read-only mode:
       (setq forms--field nil)))
    ))
 \f
-(defun forms--set-minor-mode ()
-  (setq minor-mode-alist
-       (if forms-read-only
-           " View"
-         nil)))
-
 (defun forms--set-keymaps ()
   "Set the keymaps used in this mode."
 
@@ -1720,4 +1719,3 @@ Usage: (setq forms-number-of-fields
          (insert ret)))))
 
 ;;; forms.el ends here.
-