diff --git a/doc/manual.adoc b/doc/manual.adoc index 96714e2..fc4cec4 100644 --- a/doc/manual.adoc +++ b/doc/manual.adoc @@ -109,7 +109,7 @@ Column directives indicate how many columns to use to display fields. A column directive consists of a record with the values `col` and an integer number of columns. -==== Hook Directives (`txn`) +==== Hook Directives (`txn` and `hook`) Hook directives indicate a series of hooks to be run on each load or save operation. Several different hooks are available. The default set of hooks is @@ -127,7 +127,7 @@ allows a user to keep a history of the data and to easily back it up to another location. A hook directive consists of a record starting with the value `txn`, and -followed by a list of hook names. +followed by a list of hook names. `hook` may be used as a synonym for `txn`. === Configuration File diff --git a/lib/newfol/database.py b/lib/newfol/database.py index c14d1e8..85d6c1a 100644 --- a/lib/newfol/database.py +++ b/lib/newfol/database.py @@ -376,7 +376,7 @@ class Schema: except ValueError: raise newfol.exception.SchemaError("has invalid " + "number of columns") - elif rectype in ['txn', 'transaction']: + elif rectype in ['txn', 'transaction', 'hook']: self._txntype = i.fields[1:] elif rectype in ['dpy', 'display']: self._layout = list(map(fix_up_layout, i.fields[1:]))