comparison lisp/forms.el @ 63400:00398c07d65c

(forms--intuit-from-file): Fix reference to `forms-number-of-fields' in error message. (forms-print): Fix quoting in error message. (forms-mode): Fix quoting in docstring.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 14 Jun 2005 11:30:22 +0000
parents f68140c1b23a
children 6fb026ad601f e58cb448e07c a1b34dec1104
comparison
equal deleted inserted replaced
63399:9452fd6cf27f 63400:00398c07d65c
548 (if forms-multi-line 548 (if forms-multi-line
549 (if (and (stringp forms-multi-line) 549 (if (and (stringp forms-multi-line)
550 (eq (length forms-multi-line) 1)) 550 (eq (length forms-multi-line) 1))
551 (if (string= forms-multi-line forms-field-sep) 551 (if (string= forms-multi-line forms-field-sep)
552 (error (concat "Forms control file error: " 552 (error (concat "Forms control file error: "
553 "`forms-multi-line' is equal to 'forms-field-sep'"))) 553 "`forms-multi-line' is equal to `forms-field-sep'")))
554 (error (concat "Forms control file error: " 554 (error (concat "Forms control file error: "
555 "`forms-multi-line' must be nil or a one-character string")))) 555 "`forms-multi-line' must be nil or a one-character string"))))
556 (or (fboundp 'set-text-properties) 556 (or (fboundp 'set-text-properties)
557 (setq forms-use-text-properties nil)) 557 (setq forms-use-text-properties nil))
558 558
1205 ;; If `forms-number-of-fields' is not set, get it from the data file. 1205 ;; If `forms-number-of-fields' is not set, get it from the data file.
1206 (if (null forms-number-of-fields) 1206 (if (null forms-number-of-fields)
1207 1207
1208 ;; Need a file to do this. 1208 ;; Need a file to do this.
1209 (if (not (file-exists-p forms-file)) 1209 (if (not (file-exists-p forms-file))
1210 (error "Need existing file or explicit 'forms-number-of-records'") 1210 (error "Need existing file or explicit `forms-number-of-fields'")
1211 1211
1212 ;; Visit the file and extract the first record. 1212 ;; Visit the file and extract the first record.
1213 (setq forms--file-buffer (find-file-noselect forms-file)) 1213 (setq forms--file-buffer (find-file-noselect forms-file))
1214 (let ((read-file-filter forms-read-file-filter) 1214 (let ((read-file-filter forms-read-file-filter)
1215 (the-record)) 1215 (the-record))
1981 (throw 'done t)))))) 1981 (throw 'done t))))))
1982 nil 1982 nil
1983 (goto-char (aref forms--markers (1- (length forms--markers))))))) 1983 (goto-char (aref forms--markers (1- (length forms--markers)))))))
1984 1984
1985 (defun forms-print () 1985 (defun forms-print ()
1986 "Send the records to the printer with 'print-buffer', one record per page." 1986 "Send the records to the printer with `print-buffer', one record per page."
1987 (interactive) 1987 (interactive)
1988 (let ((inhibit-read-only t) 1988 (let ((inhibit-read-only t)
1989 (save-record forms--current-record) 1989 (save-record forms--current-record)
1990 (total-nb-records forms--total-records) 1990 (total-nb-records forms--total-records)
1991 (nb-record 1) 1991 (nb-record 1)