branch: elpa/csv2ledger commit 57bd4d12f25de447a1d652b87bda5b5f216ad73e Author: Joost Kremers <joostkrem...@fastmail.com> Commit: Joost Kremers <joostkrem...@fastmail.com>
Move definition of c2l-field-modify-functions. The functions in c2l-field-modify-functions are applied before c2l-transaction-modify-functions, so it makes sense to have it first. (This is mainly true in the README, but the order of customise options in the README reflects the order of the defcustoms in the source code.) --- csv2ledger.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/csv2ledger.el b/csv2ledger.el index adb7f555ef..24236c9c98 100644 --- a/csv2ledger.el +++ b/csv2ledger.el @@ -141,6 +141,15 @@ in the transaction. They may be used in the option :type '(repeat symbol) :group 'csv2ledger) +(defcustom c2l-field-modify-functions nil + "List of functions to modify fields in an entry. +This option should be an alist mapping field names (as symbols) +to functions. These functions should take a single string +argument and should return a string, which will be the value used +for the field in question." + :type '(repeat (cons (symbol :tag "Field") function)) + :group 'csv2ledger) + (defvar c2l-transaction-modifier nil "The function that modifies a CSV transaction before creating a ledger entry. This is the composite function created with the functions in @@ -174,15 +183,6 @@ this option outside of Customize, make sure to call the function (seq-every-p #'symbolp v)) :group 'csv2ledger) -(defcustom c2l-field-modify-functions nil - "List of functions to modify fields in an entry. -This option should be an alist mapping field names (as symbols) -to functions. These functions should take a single string -argument and should return a string, which will be the value used -for the field in question." - :type '(repeat (cons (symbol :tag "Field") function)) - :group 'csv2ledger) - (defcustom c2l-entry-function #'c2l-compose-entry "Function to create a ledger entry. This should be a function that takes an alist of field-value