HCoop
/
bpt
/
emacs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
(rmail-spam-filter): Autoload it.
[bpt/emacs.git]
/
lisp
/
forms.el
diff --git
a/lisp/forms.el
b/lisp/forms.el
index
a7f4209
..
5e4c4f8
100644
(file)
--- a/
lisp/forms.el
+++ b/
lisp/forms.el
@@
-1,15
+1,16
@@
;;; forms.el --- Forms mode: edit a file as a form to fill in
;;; forms.el --- Forms mode: edit a file as a form to fill in
-;; Copyright (C) 1991, 1994, 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
+;; Copyright (C) 1991, 1994, 1995, 1996, 1997, 2001, 2002, 2003,
+;; 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Johan Vromans <jvromans@squirrel.nl>
;; This file is part of GNU Emacs.
;; Author: Johan Vromans <jvromans@squirrel.nl>
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software
;
you can redistribute it and/or modify
+;; GNU Emacs is free software
:
you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; 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.
+;; the Free Software Foundation
, either version 3 of the License, or
+;;
(at your option)
any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
@@
-17,13
+18,11
@@
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; GNU General Public License for more details.
;; 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.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
;;; Commentary:
-;; Visit a file using a form.
+;; Visit a file using a form.
See forms-d2.el for examples.
;;
;; === Naming conventions
;;
;;
;; === Naming conventions
;;
@@
-63,7
+62,7
@@
;; Automatic mode switching is supported if you specify
;; "-*- forms -*-" in the first line of the control file.
;;
;; Automatic mode switching is supported if you specify
;; "-*- forms -*-" in the first line of the control file.
;;
-;; The control file is visited, evaluated using `eval-
current-
buffer',
+;; The control file is visited, evaluated using `eval-buffer',
;; and should set at least the following variables:
;;
;; forms-file [string]
;; and should set at least the following variables:
;;
;; forms-file [string]
@@
-301,11
+300,6
@@
(provide 'forms) ;;; official
(provide 'forms-mode) ;;; for compatibility
(provide 'forms) ;;; official
(provide 'forms-mode) ;;; for compatibility
-(defconst forms-version (substring "$Revision: 2.49 $" 11 -2)
- "The version number of forms-mode (as string). The complete RCS id is:
-
- $Id: forms.el,v 2.49 2003/09/01 15:45:12 miles Exp $")
-
(defcustom forms-mode-hook nil
"Hook run upon entering Forms mode."
:group 'forms
(defcustom forms-mode-hook nil
"Hook run upon entering Forms mode."
:group 'forms
@@
-523,8
+517,8
@@
Commands: Equivalent keys in read-only mode:
(if (or (eq enable-local-eval t)
(yes-or-no-p
(concat "Evaluate lisp code in buffer "
(if (or (eq enable-local-eval t)
(yes-or-no-p
(concat "Evaluate lisp code in buffer "
- (buffer-name) " to display forms ")))
- (eval-
current-
buffer)
+ (buffer-name) " to display forms
?
")))
+ (eval-buffer)
(error "`enable-local-eval' inhibits buffer evaluation"))
;; Check if the mandatory variables make sense.
(error "`enable-local-eval' inhibits buffer evaluation"))
;; Check if the mandatory variables make sense.
@@
-555,7
+549,7
@@
Commands: Equivalent keys in read-only mode:
(eq (length forms-multi-line) 1))
(if (string= forms-multi-line forms-field-sep)
(error (concat "Forms control file error: "
(eq (length forms-multi-line) 1))
(if (string= forms-multi-line forms-field-sep)
(error (concat "Forms control file error: "
- "`forms-multi-line' is equal to
'
forms-field-sep'")))
+ "`forms-multi-line' is equal to
`
forms-field-sep'")))
(error (concat "Forms control file error: "
"`forms-multi-line' must be nil or a one-character string"))))
(or (fboundp 'set-text-properties)
(error (concat "Forms control file error: "
"`forms-multi-line' must be nil or a one-character string"))))
(or (fboundp 'set-text-properties)
@@
-694,7
+688,7
@@
Commands: Equivalent keys in read-only mode:
;;(message "forms: proceeding setup (new file)...")
(progn
(insert
;;(message "forms: proceeding setup (new file)...")
(progn
(insert
- "GNU Emacs Forms Mode
version " forms-version "
\n\n"
+ "GNU Emacs Forms Mode\n\n"
(if (file-exists-p forms-file)
(concat "No records available in file `" forms-file "'\n\n")
(format "Creating new file `%s'\nwith %d field%s per record\n\n"
(if (file-exists-p forms-file)
(concat "No records available in file `" forms-file "'\n\n")
(format "Creating new file `%s'\nwith %d field%s per record\n\n"
@@
-718,7
+712,7
@@
Commands: Equivalent keys in read-only mode:
;; user customising
;;(message "forms: proceeding setup (user hooks)...")
;; user customising
;;(message "forms: proceeding setup (user hooks)...")
- (run-hooks 'forms-mode-hook 'forms-mode-hooks)
+ (run-
mode-
hooks 'forms-mode-hook 'forms-mode-hooks)
;;(message "forms: setting up... done.")
;; be helpful
;;(message "forms: setting up... done.")
;; be helpful
@@
-1212,7
+1206,7
@@
Commands: Equivalent keys in read-only mode:
;; Need a file to do this.
(if (not (file-exists-p forms-file))
;; Need a file to do this.
(if (not (file-exists-p forms-file))
- (error "Need existing file or explicit
'forms-number-of-recor
ds'")
+ (error "Need existing file or explicit
`forms-number-of-fiel
ds'")
;; Visit the file and extract the first record.
(setq forms--file-buffer (find-file-noselect forms-file))
;; Visit the file and extract the first record.
(setq forms--file-buffer (find-file-noselect forms-file))
@@
-1988,7
+1982,7
@@
after writing out the data."
(goto-char (aref forms--markers (1- (length forms--markers)))))))
(defun forms-print ()
(goto-char (aref forms--markers (1- (length forms--markers)))))))
(defun forms-print ()
- "Send the records to the printer with
'
print-buffer', one record per page."
+ "Send the records to the printer with
`
print-buffer', one record per page."
(interactive)
(let ((inhibit-read-only t)
(save-record forms--current-record)
(interactive)
(let ((inhibit-read-only t)
(save-record forms--current-record)
@@
-2059,5
+2053,5
@@
Usage: (setq forms-number-of-fields
(goto-char (point-max))
(insert ret)))))
(goto-char (point-max))
(insert ret)))))
-;;
;
arch-tag: 4a6695c7-d47a-4a21-809b-5cec7f8ec7a1
+;; arch-tag: 4a6695c7-d47a-4a21-809b-5cec7f8ec7a1
;;; forms.el ends here
;;; forms.el ends here