1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00
Commit Graph

57 Commits

Author SHA1 Message Date
Kenichi Handa
463f5630a5 New directory 2003-09-08 11:56:09 +00:00
Miles Bader
ab5796a9f9 Add arch taglines 2003-09-01 15:45:59 +00:00
Stefan Monnier
f5a356cdd6 (forms-mode-hook): Rename from forms-mode-hooks.
(forms-mode): Use add-hook rather than make-local-variable+setq.
Use with-current-buffer.  Run the new and the old hooks.
(forms--update): Use with-current-buffer and line-end-position.
(forms--goto-record): New fun.
(forms-jump-record, forms-insert-record, forms-delete-record): Use it.
(forms--process-format-list): Remove unused var `this-item'.
(forms--intuit-from-file): Remove unused var `the-result'.
(forms--trans): Remove unused var `x'.
(forms--exit, forms-exit, forms-exit-no-save): Remove unused arg.
2003-05-29 23:53:21 +00:00
Richard M. Stallman
c2fe6e7a07 (forms-mode): Use write-file-functions instead of local-write-file-hooks.
Use make-local-variable to make it local.
2003-05-28 11:19:48 +00:00
Richard M. Stallman
4d308b5a2c (forms--mode-commands1): Bind \t, not `tab'.
(forms--mode-commands): Don't bind \t in the maps where
we call forms--mode-commands1.
2003-05-23 12:48:06 +00:00
Juanma Barranquero
71296446d3 Trailing whitespace deleted. 2003-02-04 11:26:42 +00:00
Andreas Schwab
ef6a4dfef8 (forms--change-commands): Use command remapping instead of
substitute-key-definition.
2003-01-12 20:47:48 +00:00
Pavel Janík
17b1725804 (forms-jump-record, forms-insert-record, forms-delete-record): Calculate
lines from the beginning of the accessible portion rather than from the
beginning of the buffer.
2002-05-18 08:05:54 +00:00
Pavel Janík
e8af40eed4 Some fixes to follow coding conventions. 2001-07-16 12:23:00 +00:00
Dave Love
4c1fc0f6a8 (forms-mode-hooks): Fix :type. 2001-02-07 23:40:52 +00:00
Gerd Moellmann
5658a814fd Use new backquote syntax.
(forms--make-format-elt-using-text-properties):
Treat `intangible' differently.
1999-11-13 22:07:05 +00:00
Eli Zaretskii
f3ae6c2a76 forms-save-buffer): Call set-buffer-modified-p to
force the data buffer to be saved, even if the data didn't
change, in case the write filter was modified.  Restore the
current record after read-file-filter finishes.
1999-05-31 08:34:19 +00:00
Karl Heuer
4e0a3e2723 (forms-mode): Don't call forms-first-record or
forms-last-record if the data file has zero records.
1999-05-01 01:11:12 +00:00
Richard M. Stallman
a9d358fb75 (forms--show-record): Convert integers to string
expicitly since concat will no longer accept integers.
(forms-print): Use local `total-nb-records' since
`forms--total-records' will be inaccessible after buffer switching.
1999-01-15 16:19:53 +00:00
Karl Heuer
4e0c86509d Comment fix. 1998-10-06 23:22:48 +00:00
Stephen Eglen
fc6bfeec0b (forms-mode): Doc fix (remove slashes from keybindings). 1998-07-17 14:01:15 +00:00
Richard M. Stallman
02cf578193 Further doc fix. 1997-08-27 23:10:59 +00:00
Richard M. Stallman
a08bd820d4 (forms-read-only): Un-customize, and doc fix. 1997-08-27 06:47:51 +00:00
Richard M. Stallman
d2e7d71ba8 Customized. 1997-08-19 04:55:58 +00:00
Richard M. Stallman
a92f7abb62 (forms-mode, forms--process-format-list)
(forms--make-parser-elt, forms-search-forward, forms-search-backward):
Fix error messages.

(forms-save-buffer):
Do not run the `write-file-filter' hooks
explicitly since they are run via `local-write-file-hooks'.
(forms-search-forward, forms-search-backward):
Wrap the search.  Use `error' to signal failure.
1997-06-11 21:07:22 +00:00
Karl Heuer
38bd9da2df Use `error' where possible to signal errors.
Remove (beep)s for warnings.
Change comment about the iif hook to reflect the actual reason.
Correct error in field numbering.

(forms-mode): Make `forms--elements' local before calling
`forms--process-format-list'.

(forms-save-buffer): `forms-write-file-filter' and
`forms-read-file-filter' were not called correctly.
1997-06-10 18:32:33 +00:00
Johan Vromans
149bb5bea4 (forms-insert-after): New variable. Non-nil means: inserts of new
records go after current record, also initial position is at last
record.
(forms-mode, forms-insert-record): Use it.
1996-03-01 21:13:01 +00:00
Karl Heuer
5cc7f7d64f (forms--process-format-list): Fix error format string. 1996-01-29 23:15:25 +00:00
Karl Heuer
60a37dc67d (forms-mode, forms-toggle-read-only): Fix message text.
(forms-search-forward, forms-search-backward): Likewise.
1996-01-25 06:16:34 +00:00
Karl Heuer
5edb2df7d3 (forms--help, forms-search-forward, forms-search-backward): Pass proper format string to message. 1996-01-25 00:54:17 +00:00
Erik Naggum
b578f267af Update FSF's address. 1996-01-14 07:34:30 +00:00
Karl Heuer
968db5f75c (forms-toggle-read-only, forms-enumerate): Doc fix. 1996-01-04 23:38:16 +00:00
Johan Vromans
a0844fc643 Use buffer-substring-no-properties' instead of buffer-substring' to
avoid the properties being copied.
1995-11-16 20:04:57 +00:00
Richard M. Stallman
be01074898 Comment change. 1995-10-30 17:35:01 +00:00
Richard M. Stallman
776f3a6d46 Comment change. 1995-10-28 16:21:33 +00:00
Richard M. Stallman
4fd3a710d0 (forms-check-number-of-fields): New vbl.
(forms-mode): Don't issue warning if vbl says not to.
1995-08-14 06:45:37 +00:00
Johan Vromans
be3e4bb1b8 (forms-mode): treat local-write-file-hooks as a list. 1995-07-08 13:16:54 +00:00
Johan Vromans
ff6481825c Withdraw mouse-major-mode-map modifications.
They were erroneous and not needed.
1995-06-18 14:43:23 +00:00
Richard M. Stallman
22bf061573 (forms--mode-menu-edit,forms--mode-menu-ro):
Set `mouse-major-mode-menu'.
1995-06-17 13:00:22 +00:00
Karl Heuer
dad40e131c (forms--mode-menu-ro, forms--mode-menu-edit): Fix capitalization in menu bar. 1995-05-30 22:54:53 +00:00
Richard M. Stallman
91f769d408 (forms--mode-commands): Delete C-c ? binding. 1995-05-02 01:37:11 +00:00
Richard M. Stallman
2996d9f848 (forms--make-format-elt-using-text-properties)
forms--make-format): Add `intangible' text property to read-only areas.
(forms-next-field, forms-previous-field): Use
`inhibit-point-motion-hooks' to allow move between two
intangible areas.
1995-04-25 17:44:28 +00:00
Johan Vromans
0a840b84de Bump version. 1995-01-05 12:32:54 +00:00
Johan Vromans
ac7e3dbebe Change forms-search to forms-search-forward, and add
forms-search-backward.
(forms--mode-menu-ro, forms--mode-menu-edit): New
functions to create a pulldown menu in the menubar.
(forms--mode-commands): Call them for the edit and view mode.
(forms-print): New function.
1995-01-05 11:54:18 +00:00
Richard M. Stallman
11c05cd6a8 (forms--update): Undo change made mistakenly. 1994-07-26 21:31:13 +00:00
Richard M. Stallman
9c308ed258 (forms-read-file-filter): new hook function to
preprocess file contents before being passed to forms mode.
(forms-write-file-filter): new hook function to preprocess file
contents before it is being saved to disk. Can be used to undo the
effects of `forms-read-file-filter'.
(forms-mode): Supply a default format if no `forms-format-list' was
specified.
Preprocess file contents using `forms-read-file-filter' and attach
`forms-write-file-filter' to the `local-write-file-hooks' of the file
buffer.
Present a friendly message if the visited file is empty or new.
(forms--intuit-from-file): New subroutine to get the number of fields
from the data file; constructs a default format list.
(forms-save-buffer): Forms mode wrapper for `save-buffer'.
(forms--change-commands, forms--exit): Use it.
(forms--update): Check for the presence of the field separator in any
of the fields.  Refuse update if found.
(forms-delete-record): Allow the last record of the file to be
deleted, even if not terminated by a newline.
(forms--local-write-file-function): Remove.  Didn't do any good.
Replaced by `forms-save-buffer'.
1994-07-26 19:47:39 +00:00
Richard M. Stallman
eb4ca29510 (forms-delete-record): Handle deletion of last line
when it has no terminating newline.
1994-07-17 23:56:09 +00:00
Richard M. Stallman
485efad04b (forms-mode): Plug security hole by disabling `eval-buffer' unless
`enable-local-eval' is set to t.
Correct setting of `forms--mode-setup'.
(forms--local-write-file-function): New function to be used as
`local-write-file-hooks'.
(forms-mode): Use it.
(forms-find-file,forms-find-file-other-window): Locally set
`enable-local-eval' and `enable-local-variables' to t.
(forms-find-file-other-window): Remove extraneous call to
`eval-current-buffer'.
1994-06-13 12:07:44 +00:00
Richard M. Stallman
a4e104bf5c Doc fix. 1994-05-22 22:14:17 +00:00
Karl Heuer
724244d233 (forms-mode): Set visited file name to nil to prevent overwrite and autosave.
The previous method didn't go far enough.
1994-05-07 01:52:42 +00:00
Karl Heuer
4a971a936b (forms-mode): Set major mode before finding forms-file. (This gives
the find-file-hook a way to detect that it's a forms-datafile.)
1994-03-28 23:13:07 +00:00
Richard M. Stallman
891f0daae1 (forms--set-minor-mode): Rewrite so that describe-mode
can parse the value of minor-mode-alist correctly.  The string
" View" is now dependent on the value of forms-read-only.

Documentation: `forms-forms-scroll' and `forms-forms-jump'
now default to nil.
`forms-new-record-filter' and `forms-modified-record-filter'
cannot be redefined as functions.
Commands and keymaps are changed.
Add function key defs.

(forms-version): Docstring includes full RCS id.
(forms-forms-scroll): Defaults to nil.
(forms-forms-jump): Defaults to nil.
(forms-mode-edit-map, forms-mode-ro-map): Additional keymaps
for edit mode and read-only mode.
(forms--new-record-filter, forms--modified-record-filter): Deleted.
(forms-mode): Docstring now includes the key bindings, since
both edit mode and read-only mode must be supported.
Changed `forms-new-record-filter' and `forms-modified-record-filter'
semantics: the variable must point to a function and may
not be defined as a function anymore.
Use three keymaps: `forms-mode-map' (C-c commands),
`forms-mode-edit-map' (normal mode) and `forms-mode-ro-map'
(read-only mode). The maps are not buffer local.
Corrected error message text.
Moved setting up write-file-hooks and revert-buffer-function
to function `forms--change-commands'.
(forms--process-format-list): Changed error messages to be more descriptive.
(forms--set-keymaps): Setup the three keymaps.
(forms--mode-commands): Use new command key bindings.
(forms--mode-commands1): New helper function for `forms--mode-commands'.
(forms--change-commands): Handle setup of
local-write-file-hooks and revert-buffer-function.
(forms--help): Show new command bindings.
(forms--show-record): Replaced `forms--modified-record-filter' by
`forms-modified-record-filter'.
(forms-jump-record): Changed error message.
(forms-toggle-read-only): New function.
(forms-view-mode, forms-edit-mode): Deleted.
(forms-insert-record): Replaced `forms--new-record-filter' by
`forms-new-record-filter'.
(forms-insert-record, forms-delete-record): Disallow in read-only mode.
(forms-prev-field): New function.
1993-10-21 00:43:51 +00:00
Richard M. Stallman
2cc27dd3d2 Version 2.3.
Documentation: `forms-forms-scroll' and `forms-forms-jump'
now default to nil.
`forms-new-record-filter' and `forms-modified-record-filter'
cannot be redefined as functions.
Commands and keymaps are changed.
Add function key defs.
(forms-version): Docstring includes full RCS id.
(forms-forms-scroll): Defaults to nil.
(forms-forms-jump): Defaults to nil.
(forms-mode-edit-map, forms-mode-ro-map): Additional keymaps
for edit mode and read-only mode.
(forms--new-record-filter, forms--modified-record-filter): Deleted.
(forms-mode): Docstring now includes the key bindings, since
both edit mode and read-only mode must be supported.
Changed `forms-new-record-filter' and `forms-modified-record-filter'
semantics: the variable must point to a function and may
not be defined as a function anymore.
Use three keymaps: `forms-mode-map' (C-c commands),
`forms-mode-edit-map' (normal mode) and `forms-mode-ro-map'
(read-only mode). The maps are not buffer local.
Changed the text of error messages to be more descriptive, and
onsistent with the documentation.
Moved setting up write-file-hooks and revert-buffer-function
to function `forms--change-commands'.
(forms--process-format-list): Changed error messages to be
more descriptive.
(forms--set-keymaps): Setup the three keymaps.
(forms--mode-commands): Use new command key bindings.
(forms--mode-commands1): New helper function for
`forms--mode-commands'.
(forms--change-commands): Handle setup of
local-write-file-hooks and revert-buffer-function.
(forms--help): Show new command bindings.
(forms--show-record): Replaced `forms--modified-record-filter' by
`forms-modified-record-filter'.
(forms-jump-record): Changed error message.
(forms-toggle-read-only): New function, replaces
`forms-view-mode' and `forms-edit-mode'.
(forms-view-mode, forms-edit-mode): Deleted.
(forms-insert-record): Replaced `forms--new-record-filter' by
`forms-new-record-filter'.
(forms-insert-record, forms-delete-record): Disallow in read-only mode.
(forms-prev-field): New function.
1993-09-27 02:19:46 +00:00
Richard M. Stallman
1f11101804 Change typos in comments.
(forms-delete-record, forms--update): Use `delete-region' instead of
`kill-line' to avoid messing around with the kill ring.

Release 2.1 for Emacs 19.19.
(forms--process-format-list): No need to prepend a text item anymore.
(forms--ro-modification-start): Renamed to `forms--iif-start.
(forms--ro-properties): Renamed to `forms--iif-properties'.
(forms--romh): Renamed to `forms--iif-hook'.  Rewritten to use
`insert-in-front-hooks' instead of `modification-hooks'.
(forms--romh-post-command-hook): Renamed to
`forms--iif-post-command-hook'.  Rewritten to use
`insert-in-front-hooks' instead of `modification-hooks'.
(forms--make-format, forms--make-format-elt-using-text-properties):
Use `insert-in-front-hooks' instead of `modification-hooks'.
Remove `forms--electric' code.  Use `front-sticky' and
`rear-nonsticky' text properties to control the insertion of text
between read-only fields.
(forms--show-record): Remove `forms--electric' code.
1993-09-15 05:25:16 +00:00
Richard M. Stallman
fbee972730 Rewritten by Vromans to use text properties. 1993-07-17 19:15:19 +00:00