Mercurial > emacs
comparison lisp/forms.el @ 14356:0c88041fc50a
(forms-mode, forms-toggle-read-only): Fix message text.
(forms-search-forward, forms-search-backward): Likewise.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Thu, 25 Jan 1996 06:16:34 +0000 |
parents | ab041898078d |
children | 319064f5de2e |
comparison
equal
deleted
inserted
replaced
14355:87fde6ef6c95 | 14356:0c88041fc50a |
---|---|
287 ;;; Global variables and constants: | 287 ;;; Global variables and constants: |
288 | 288 |
289 (provide 'forms) ;;; official | 289 (provide 'forms) ;;; official |
290 (provide 'forms-mode) ;;; for compatibility | 290 (provide 'forms-mode) ;;; for compatibility |
291 | 291 |
292 (defconst forms-version (substring "$Revision: 2.25 $" 11 -2) | 292 (defconst forms-version (substring "$Revision: 2.26 $" 11 -2) |
293 "The version number of forms-mode (as string). The complete RCS id is: | 293 "The version number of forms-mode (as string). The complete RCS id is: |
294 | 294 |
295 $Id: forms.el,v 2.25 1996/01/14 07:34:30 erik Exp kwzh $") | 295 $Id: forms.el,v 2.26 1996/01/25 00:54:17 kwzh Exp kwzh $") |
296 | 296 |
297 (defvar forms-mode-hooks nil | 297 (defvar forms-mode-hooks nil |
298 "Hook functions to be run upon entering Forms mode.") | 298 "Hook functions to be run upon entering Forms mode.") |
299 | 299 |
300 ;;; Mandatory variables - must be set by evaluating the control file. | 300 ;;; Mandatory variables - must be set by evaluating the control file. |
667 ;;(message "forms: proceeding setup (new file)...") | 667 ;;(message "forms: proceeding setup (new file)...") |
668 (progn | 668 (progn |
669 (insert | 669 (insert |
670 "GNU Emacs Forms Mode version " forms-version "\n\n" | 670 "GNU Emacs Forms Mode version " forms-version "\n\n" |
671 (if (file-exists-p forms-file) | 671 (if (file-exists-p forms-file) |
672 (concat "No records available in file \"" forms-file "\".\n\n") | 672 (concat "No records available in file `" forms-file "'\n\n") |
673 (format "Creating new file \"%s\"\nwith %d field%s per record.\n\n" | 673 (format "Creating new file `%s'\nwith %d field%s per record\n\n" |
674 forms-file forms-number-of-fields | 674 forms-file forms-number-of-fields |
675 (if (= 1 forms-number-of-fields) "" "s"))) | 675 (if (= 1 forms-number-of-fields) "" "s"))) |
676 "Use " (substitute-command-keys "\\[forms-insert-record]") | 676 "Use " (substitute-command-keys "\\[forms-insert-record]") |
677 " to create new records.\n") | 677 " to create new records.\n") |
678 (setq forms--current-record 1) | 678 (setq forms--current-record 1) |
1722 (if (save-excursion | 1722 (if (save-excursion |
1723 (set-buffer forms--file-buffer) | 1723 (set-buffer forms--file-buffer) |
1724 buffer-read-only) | 1724 buffer-read-only) |
1725 (progn | 1725 (progn |
1726 (setq forms-read-only t) | 1726 (setq forms-read-only t) |
1727 (message "No write access to \"%s\"" forms-file) | 1727 (message "No write access to `%s'" forms-file) |
1728 (beep)) | 1728 (beep)) |
1729 (setq forms-read-only nil)) | 1729 (setq forms-read-only nil)) |
1730 (if (equal ro forms-read-only) | 1730 (if (equal ro forms-read-only) |
1731 nil | 1731 nil |
1732 (forms-mode))) | 1732 (forms-mode))) |
1831 (setq here (point)) | 1831 (setq here (point)) |
1832 (end-of-line) | 1832 (end-of-line) |
1833 (if (null (re-search-forward regexp nil t)) | 1833 (if (null (re-search-forward regexp nil t)) |
1834 (progn | 1834 (progn |
1835 (goto-char here) | 1835 (goto-char here) |
1836 (message "\"%s\" not found." regexp) | 1836 (message "\"%s\" not found" regexp) |
1837 nil) | 1837 nil) |
1838 (setq the-record (forms--get-record)) | 1838 (setq the-record (forms--get-record)) |
1839 (setq the-line (1+ (count-lines (point-min) (point)))))) | 1839 (setq the-line (1+ (count-lines (point-min) (point)))))) |
1840 (progn | 1840 (progn |
1841 (setq forms--current-record the-line) | 1841 (setq forms--current-record the-line) |
1863 (setq here (point)) | 1863 (setq here (point)) |
1864 (beginning-of-line) | 1864 (beginning-of-line) |
1865 (if (null (re-search-backward regexp nil t)) | 1865 (if (null (re-search-backward regexp nil t)) |
1866 (progn | 1866 (progn |
1867 (goto-char here) | 1867 (goto-char here) |
1868 (message "\"%s\" not found." regexp) | 1868 (message "\"%s\" not found" regexp) |
1869 nil) | 1869 nil) |
1870 (setq the-record (forms--get-record)) | 1870 (setq the-record (forms--get-record)) |
1871 (setq the-line (1+ (count-lines (point-min) (point)))))) | 1871 (setq the-line (1+ (count-lines (point-min) (point)))))) |
1872 (progn | 1872 (progn |
1873 (setq forms--current-record the-line) | 1873 (setq forms--current-record the-line) |