diff options
| author | Richard M. Stallman | 1997-08-19 04:55:58 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-08-19 04:55:58 +0000 |
| commit | d2e7d71ba8b34d802aca5b2098052ab399bb5f97 (patch) | |
| tree | da1495f86ac40a5fe13905406f393d6fa9711407 /lisp | |
| parent | e5023df970bf30a68bd56b0be1e55791f9fad4ba (diff) | |
| download | emacs-d2e7d71ba8b34d802aca5b2098052ab399bb5f97.tar.gz emacs-d2e7d71ba8b34d802aca5b2098052ab399bb5f97.zip | |
Customized.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/forms.el | 76 |
1 files changed, 49 insertions, 27 deletions
diff --git a/lisp/forms.el b/lisp/forms.el index 3abb15c8c20..669d188337a 100644 --- a/lisp/forms.el +++ b/lisp/forms.el | |||
| @@ -287,18 +287,24 @@ | |||
| 287 | 287 | ||
| 288 | ;;; Code: | 288 | ;;; Code: |
| 289 | 289 | ||
| 290 | (defgroup forms nil | ||
| 291 | "Edit a file as a form to fill in." | ||
| 292 | :group 'data) | ||
| 293 | |||
| 290 | ;;; Global variables and constants: | 294 | ;;; Global variables and constants: |
| 291 | 295 | ||
| 292 | (provide 'forms) ;;; official | 296 | (provide 'forms) ;;; official |
| 293 | (provide 'forms-mode) ;;; for compatibility | 297 | (provide 'forms-mode) ;;; for compatibility |
| 294 | 298 | ||
| 295 | (defconst forms-version (substring "$Revision: 2.30 $" 11 -2) | 299 | (defconst forms-version (substring "$Revision: 2.31 $" 11 -2) |
| 296 | "The version number of forms-mode (as string). The complete RCS id is: | 300 | "The version number of forms-mode (as string). The complete RCS id is: |
| 297 | 301 | ||
| 298 | $Id: forms.el,v 2.30 1997/06/10 18:32:33 kwzh Exp rms $") | 302 | $Id: forms.el,v 2.31 1997/06/11 21:07:22 rms Exp rms $") |
| 299 | 303 | ||
| 300 | (defvar forms-mode-hooks nil | 304 | (defcustom forms-mode-hooks nil |
| 301 | "Hook functions to be run upon entering Forms mode.") | 305 | "Hook functions to be run upon entering Forms mode." |
| 306 | :group 'forms | ||
| 307 | :type 'function) | ||
| 302 | 308 | ||
| 303 | ;;; Mandatory variables - must be set by evaluating the control file. | 309 | ;;; Mandatory variables - must be set by evaluating the control file. |
| 304 | 310 | ||
| @@ -313,26 +319,34 @@ | |||
| 313 | 319 | ||
| 314 | ;;; Optional variables with default values. | 320 | ;;; Optional variables with default values. |
| 315 | 321 | ||
| 316 | (defvar forms-check-number-of-fields t | 322 | (defcustom forms-check-number-of-fields t |
| 317 | "*If non-nil, warn about records with wrong number of fields.") | 323 | "*If non-nil, warn about records with wrong number of fields." |
| 324 | :group 'forms | ||
| 325 | :type 'boolean) | ||
| 318 | 326 | ||
| 319 | (defvar forms-field-sep "\t" | 327 | (defvar forms-field-sep "\t" |
| 320 | "Field separator character (default TAB).") | 328 | "Field separator character (default TAB).") |
| 321 | 329 | ||
| 322 | (defvar forms-read-only nil | 330 | (defcustom forms-read-only nil |
| 323 | "Non-nil means: visit the file in view (read-only) mode. | 331 | "*Non-nil means: visit the file in view (read-only) mode. |
| 324 | \(Defaults to the write access on the data file).") | 332 | \(Default is to allow write access on the data file)." |
| 333 | :group 'forms | ||
| 334 | :type 'boolean) | ||
| 325 | 335 | ||
| 326 | (defvar forms-multi-line "\C-k" | 336 | (defvar forms-multi-line "\C-k" "\ |
| 327 | "If not nil: use this character to separate multi-line fields (default C-k).") | 337 | If not nil: use this character to separate multi-line fields (default C-k).") |
| 328 | 338 | ||
| 329 | (defvar forms-forms-scroll nil | 339 | (defcustom forms-forms-scroll nil |
| 330 | "*Non-nil means replace scroll-up/down commands in Forms mode. | 340 | "*Non-nil means replace scroll-up/down commands in Forms mode. |
| 331 | The replacement commands performs forms-next/prev-record.") | 341 | The replacement commands performs forms-next/prev-record." |
| 342 | :group 'forms | ||
| 343 | :type 'boolean) | ||
| 332 | 344 | ||
| 333 | (defvar forms-forms-jump nil | 345 | (defcustom forms-forms-jump nil |
| 334 | "*Non-nil means redefine beginning/end-of-buffer in Forms mode. | 346 | "*Non-nil means redefine beginning/end-of-buffer in Forms mode. |
| 335 | The replacement commands performs forms-first/last-record.") | 347 | The replacement commands performs forms-first/last-record." |
| 348 | :group 'forms | ||
| 349 | :type 'boolean) | ||
| 336 | 350 | ||
| 337 | (defvar forms-read-file-filter nil | 351 | (defvar forms-read-file-filter nil |
| 338 | "The name of a function that is called after reading the data file. | 352 | "The name of a function that is called after reading the data file. |
| @@ -341,7 +355,7 @@ suitable for forms processing.") | |||
| 341 | 355 | ||
| 342 | (defvar forms-write-file-filter nil | 356 | (defvar forms-write-file-filter nil |
| 343 | "The name of a function that is called before writing the data file. | 357 | "The name of a function that is called before writing the data file. |
| 344 | This can be used to undo the effects of form-read-file-hook.") | 358 | This can be used to undo the effects of `form-read-file-hook'.") |
| 345 | 359 | ||
| 346 | (defvar forms-new-record-filter nil | 360 | (defvar forms-new-record-filter nil |
| 347 | "The name of a function that is called when a new record is created.") | 361 | "The name of a function that is called when a new record is created.") |
| @@ -354,19 +368,27 @@ This can be used to undo the effects of form-read-file-hook.") | |||
| 354 | This variable is for use by the filter routines only. | 368 | This variable is for use by the filter routines only. |
| 355 | The contents may NOT be modified.") | 369 | The contents may NOT be modified.") |
| 356 | 370 | ||
| 357 | (defvar forms-use-text-properties (fboundp 'set-text-properties) | 371 | (defcustom forms-use-text-properties t |
| 358 | "*Non-nil means: use emacs-19 text properties. | 372 | "*Non-nil means: use text properties. |
| 359 | Defaults to t if this emacs is capable of handling text properties.") | 373 | Defaults to t if this Emacs is capable of handling text properties." |
| 374 | :group 'forms | ||
| 375 | :type 'boolean) | ||
| 360 | 376 | ||
| 361 | (defvar forms-insert-after nil | 377 | (defcustom forms-insert-after nil |
| 362 | "*Non-nil means: inserts of new records go after current record. | 378 | "*Non-nil means: inserts of new records go after current record. |
| 363 | Also, initial position is at last record.") | 379 | Also, initial position is at last record." |
| 364 | 380 | :group 'forms | |
| 365 | (defvar forms-ro-face 'default | 381 | :type 'boolean) |
| 366 | "The face (a symbol) that is used to display read-only text on the screen.") | 382 | |
| 367 | 383 | (defcustom forms-ro-face 'default | |
| 368 | (defvar forms-rw-face 'region | 384 | "The face (a symbol) that is used to display read-only text on the screen." |
| 369 | "The face (a symbol) that is used to display read-write text on the screen.") | 385 | :group 'forms |
| 386 | :type 'face) | ||
| 387 | |||
| 388 | (defcustom forms-rw-face 'region | ||
| 389 | "The face (a symbol) that is used to display read-write text on the screen." | ||
| 390 | :group 'forms | ||
| 391 | :type 'face) | ||
| 370 | 392 | ||
| 371 | ;;; Internal variables. | 393 | ;;; Internal variables. |
| 372 | 394 | ||