diff options
author | Craig Earls <enderw88@gmail.com> | 2014-12-01 20:18:11 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2014-12-01 20:18:11 -0700 |
commit | c844170aed4caad47b7607b6284b8b6a35d54908 (patch) | |
tree | 2f0e8063117e5b648e7519a6dd069cb4b2161844 /lisp | |
parent | 66d2e4fecd50354cb32bac61038a6c3fc7becaf3 (diff) | |
download | fork-ledger-c844170aed4caad47b7607b6284b8b6a35d54908.tar.gz fork-ledger-c844170aed4caad47b7607b6284b8b6a35d54908.tar.bz2 fork-ledger-c844170aed4caad47b7607b6284b8b6a35d54908.zip |
Doc string cleanup.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ledger-post.el | 10 | ||||
-rw-r--r-- | lisp/ledger-reconcile.el | 41 |
2 files changed, 27 insertions, 24 deletions
diff --git a/lisp/ledger-post.el b/lisp/ledger-post.el index f0b7b8c1..11cd5847 100644 --- a/lisp/ledger-post.el +++ b/lisp/ledger-post.el @@ -42,7 +42,7 @@ :group 'ledger-post) (defcustom ledger-post-use-completion-engine :built-in - "Which completion engine to use, :iswitchb or :ido chose those engines, + "Which completion engine to use, :iswitchb or :ido chose those engines. :built-in uses built-in Ledger-mode completion" :type '(radio (const :tag "built in completion" :built-in) (const :tag "ido completion" :ido) @@ -83,7 +83,7 @@ point at beginning of the commodity." (match-end 3)) (point))))) (defun ledger-next-account (&optional end) - "Move point to the beginning of the next account, or status marker (!*), as long as it is not past END. + "Move to the beginning of the posting, or status marker, limit to END. Return the column of the beginning of the account and leave point at beginning of account" (if (> end (point)) @@ -95,13 +95,13 @@ at beginning of account" (current-column)))) (defun ledger-post-align-xact (pos) - (interactive "d") + "Align all the posting in the xact at POS." + (interactive "d") (let ((bounds (ledger-navigate-find-xact-extents pos))) (ledger-post-align-postings (car bounds) (cadr bounds)))) (defun ledger-post-align-postings (&optional beg end) - "Align all accounts and amounts within region, if there is no -region align the posting on the current line." + "Align all accounts and amounts between BEG and END, or the current line." (interactive) (save-excursion diff --git a/lisp/ledger-reconcile.el b/lisp/ledger-reconcile.el index 504a4b5c..cbfc2ccf 100644 --- a/lisp/ledger-reconcile.el +++ b/lisp/ledger-reconcile.el @@ -44,8 +44,7 @@ :group 'ledger-reconcile) (defcustom ledger-narrow-on-reconcile t - "If t, limit transactions shown in main buffer to those -matching the reconcile regex." + "If t, limit transactions shown in main buffer to those matching the reconcile regex." :type 'boolean :group 'ledger-reconcile) @@ -56,8 +55,7 @@ Then that transaction will be shown in its source buffer." :group 'ledger-reconcile) (defcustom ledger-reconcile-force-window-bottom nil - "If t make the reconcile window appear along the bottom of the -register window and resize." + "If t make the reconcile window appear along the bottom of the register window and resize." :type 'boolean :group 'ledger-reconcile) @@ -68,25 +66,26 @@ reconcile-finish will mark all pending posting cleared." :group 'ledger-reconcile) (defcustom ledger-reconcile-default-date-format ledger-default-date-format - "Default date format for the reconcile buffer" + "Default date format for the reconcile buffer." :type 'string :group 'ledger-reconcile) (defcustom ledger-reconcile-target-prompt-string "Target amount for reconciliation " - "Default prompt for recon target prompt" + "Default prompt for recon target prompt." :type 'string :group 'ledger-reconcile) (defcustom ledger-reconcile-buffer-header "Reconciling account %s\n\n" - "Default header string for the reconcile buffer. If non-nil, - the name of the account being reconciled will be substituted + "Default header string for the reconcile buffer. + +If non-nil, the name of the account being reconciled will be substituted into the '%s'. If nil, no header willbe displayed." :type 'string :group 'ledger-reconcile) (defcustom ledger-reconcile-buffer-line-format "%(date)s %-4(code)s %-50(payee)s %-30(account)s %15(amount)s\n" - "Format string for the ledger reconcile posting -format. Available fields are date, status, code, payee, account, + "Format string for the ledger reconcile posting format. +Available fields are date, status, code, payee, account, amount. The format for each field is %WIDTH(FIELD), WIDTH can be preced by a minus sign which mean to left justify and pad the field." @@ -94,8 +93,9 @@ field." :group 'ledger-reconcile) (defcustom ledger-reconcile-sort-key "(0)" - "Default key for sorting reconcile buffer. Possible values are -'(date)', '(amount)', '(payee)'. For no sorting, i.e. using + "Default key for sorting reconcile buffer. + +Possible values are '(date)', '(amount)', '(payee)'. For no sorting, i.e. using ledger file order, use '(0)'." :type 'string :group 'ledger-reconcile) @@ -106,7 +106,7 @@ ledger file order, use '(0)'." :group 'ledger-reconcile) (defun ledger-reconcile-get-cleared-or-pending-balance (buffer account) - "Calculate the cleared or pending balance of the account." + "Use BUFFER to Calculate the cleared or pending balance of the ACCOUNT." ;; these vars are buffer local, need to hold them for use in the ;; temp buffer below @@ -321,7 +321,7 @@ POSTING is used in `ledger-clear-whole-transactions' is nil." (nth 0 posting))))) ;; return line-no of posting (defun ledger-reconcile-compile-format-string (fstr) - "return a function that implements the format string in fstr" + "Return a function that implements the format string in FSTR." (let (fields (start 0)) (while (string-match "(\\(.*?\\))" fstr start) @@ -334,6 +334,7 @@ POSTING is used in `ledger-clear-whole-transactions' is nil." (defun ledger-reconcile-format-posting (beg where fmt date code status payee account amount) + "Format posting for the reconcile buffer." (insert (funcall fmt date code status payee account amount)) ; Set face depending on cleared status @@ -350,6 +351,7 @@ POSTING is used in `ledger-clear-whole-transactions' is nil." 'where where)))) (defun ledger-reconcile-format-xact (xact fmt) + "Format XACT using FMT." (let ((date-format (or (cdr (assoc "date-format" ledger-environment-alist)) ledger-default-date-format))) (dolist (posting (nthcdr 5 xact)) @@ -366,7 +368,8 @@ POSTING is used in `ledger-clear-whole-transactions' is nil." (nth 2 posting)))))) ; amount (defun ledger-do-reconcile (&optional sort) - "Return the number of uncleared transactions in the account and display them in the *Reconcile* buffer." + "SORT the uncleared transactions in the account and display them in the *Reconcile* buffer. +Return a count of the uncleared transactions." (let* ((buf ledger-buf) (account ledger-acct) (ledger-success nil) @@ -401,9 +404,8 @@ POSTING is used in `ledger-clear-whole-transactions' is nil." (length xacts))) (defun ledger-reconcile-ensure-xacts-visible () - "Ensures that the last of the visible transactions in the -ledger buffer is at the bottom of the main window. The key to -this is to ensure the window is selected when the buffer point is + "Ensure the last of the visible transactions in the ledger buffer is at the bottom of the main window. +The key to this is to ensure the window is selected when the buffer point is moved and recentered. If they aren't strange things happen." (let ((recon-window (get-buffer-window (get-buffer ledger-recon-buffer-name)))) @@ -485,7 +487,8 @@ moved and recentered. If they aren't strange things happen." (setq ledger-target (ledger-read-commodity-string ledger-reconcile-target-prompt-string))) (defmacro ledger-reconcile-change-sort-key-and-refresh (sort-by) - `(lambda () + "Set the sort-key to SORT-BY." + `(lambda () (interactive) (setq ledger-reconcile-sort-key ,sort-by) |