summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2013-07-02 15:37:33 -0700
committerCraig Earls <enderw88@gmail.com>2013-07-02 15:37:33 -0700
commit63ba45dbaab04722cd59bf610ae77b8334ca213d (patch)
treebd0b1b22729a38b99d24bc1b1bc490a42e3acf53 /lisp
parent5b8817c8e8bb7524734d7f39ab6a170b856c6e90 (diff)
downloadfork-ledger-63ba45dbaab04722cd59bf610ae77b8334ca213d.tar.gz
fork-ledger-63ba45dbaab04722cd59bf610ae77b8334ca213d.tar.bz2
fork-ledger-63ba45dbaab04722cd59bf610ae77b8334ca213d.zip
Finished changing name to ledger-*
All files and references changed ldg-* to ledger-*
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ledger-commodities.el (renamed from lisp/ldg-commodities.el)8
-rw-r--r--lisp/ledger-complete.el (renamed from lisp/ldg-complete.el)6
-rw-r--r--lisp/ledger-context.el (renamed from lisp/ldg-context.el)6
-rw-r--r--lisp/ledger-exec.el (renamed from lisp/ldg-exec.el)8
-rw-r--r--lisp/ledger-fonts.el (renamed from lisp/ldg-fonts.el)8
-rw-r--r--lisp/ledger-init.el (renamed from lisp/ldg-init.el)14
-rw-r--r--lisp/ledger-mode.el (renamed from lisp/ldg-mode.el)42
-rw-r--r--lisp/ledger-occur.el (renamed from lisp/ldg-occur.el)6
-rw-r--r--lisp/ledger-post.el (renamed from lisp/ldg-post.el)8
-rw-r--r--lisp/ledger-reconcile.el (renamed from lisp/ldg-reconcile.el)54
-rw-r--r--lisp/ledger-regex.el (renamed from lisp/ldg-regex.el)4
-rw-r--r--lisp/ledger-report.el (renamed from lisp/ldg-report.el)42
-rw-r--r--lisp/ledger-schedule.el (renamed from lisp/ldg-schedule.el)68
-rw-r--r--lisp/ledger-sort.el (renamed from lisp/ldg-sort.el)6
-rw-r--r--lisp/ledger-state.el (renamed from lisp/ldg-state.el)10
-rw-r--r--lisp/ledger-test.el (renamed from lisp/ldg-test.el)4
-rw-r--r--lisp/ledger-texi.el (renamed from lisp/ldg-texi.el)4
-rw-r--r--lisp/ledger-xact.el (renamed from lisp/ldg-xact.el)6
18 files changed, 152 insertions, 152 deletions
diff --git a/lisp/ldg-commodities.el b/lisp/ledger-commodities.el
index a7f58f40..48d41979 100644
--- a/lisp/ldg-commodities.el
+++ b/lisp/ledger-commodities.el
@@ -1,4 +1,4 @@
-;;; ldg-commodities.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-commodities.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -26,7 +26,7 @@
;;; Code:
-(require 'ldg-regex)
+(require 'ledger-regex)
(defcustom ledger-reconcile-default-commodity "$"
"The default commodity for use in target calculations in ledger reconcile."
@@ -142,6 +142,6 @@ longer ones are after the value."
comm
(list (car comm) ledger-reconcile-default-commodity))))))
-(provide 'ldg-commodities)
+(provide 'ledger-commodities)
-;;; ldg-commodities.el ends here
+;;; ledger-commodities.el ends here
diff --git a/lisp/ldg-complete.el b/lisp/ledger-complete.el
index 1bc7588c..a8ef9a8a 100644
--- a/lisp/ldg-complete.el
+++ b/lisp/ledger-complete.el
@@ -1,4 +1,4 @@
-;;; ldg-complete.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-complete.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -252,6 +252,6 @@ ledger-magic-tab would cycle properly"
'(sole shortest))
pcomplete-last-completion-raw))))))
-(provide 'ldg-complete)
+(provide 'ledger-complete)
-;;; ldg-complete.el ends here
+;;; ledger-complete.el ends here
diff --git a/lisp/ldg-context.el b/lisp/ledger-context.el
index b0e35115..b1bcd870 100644
--- a/lisp/ldg-context.el
+++ b/lisp/ledger-context.el
@@ -1,4 +1,4 @@
-;;; ldg-context.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-context.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -206,6 +206,6 @@ specified line, returns nil."
(defun ledger-context-goto-field-end (context-info field-name)
(goto-char (ledger-context-field-end-position context-info field-name)))
-(provide 'ldg-context)
+(provide 'ledger-context)
-;;; ldg-report.el ends here
+;;; ledger-report.el ends here
diff --git a/lisp/ldg-exec.el b/lisp/ledger-exec.el
index f6c3bb54..34757d99 100644
--- a/lisp/ldg-exec.el
+++ b/lisp/ledger-exec.el
@@ -1,4 +1,4 @@
-;;; ldg-exec.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-exec.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -77,7 +77,7 @@
(let ((buffer ledger-buf)
(version-strings '()))
(with-temp-buffer
- (when (ledger-exec-ledger (current-buffer) (current-buffer) "--version")
+ (when (ledger-exec-ledger (current-buffer) (current-buffer) "--version")
(goto-char (point-min))
(delete-horizontal-space)
(setq version-strings (split-string
@@ -96,6 +96,6 @@
(message "Good Ledger Version")
(message "Bad Ledger Version")))
-(provide 'ldg-exec)
+(provide 'ledger-exec)
-;;; ldg-exec.el ends here
+;;; ledger-exec.el ends here
diff --git a/lisp/ldg-fonts.el b/lisp/ledger-fonts.el
index ab0a3317..28f1f98d 100644
--- a/lisp/ldg-fonts.el
+++ b/lisp/ledger-fonts.el
@@ -1,4 +1,4 @@
-;;; ldg-fonts.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-fonts.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -26,7 +26,7 @@
;;; Code:
-(require 'ldg-regex)
+(require 'ledger-regex)
(defgroup ledger-faces nil "Ledger mode highlighting" :group 'ledger)
(defface ledger-font-payee-uncleared-face
@@ -133,6 +133,6 @@
"Expressions to highlight in Ledger mode.")
-(provide 'ldg-fonts)
+(provide 'ledger-fonts)
-;;; ldg-fonts.el ends here
+;;; ledger-fonts.el ends here
diff --git a/lisp/ldg-init.el b/lisp/ledger-init.el
index f283c77c..fd06d4c5 100644
--- a/lisp/ldg-init.el
+++ b/lisp/ledger-init.el
@@ -1,4 +1,4 @@
-;;; ldg-init.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-init.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -22,7 +22,7 @@
;;; Commentary:
;; Determine the ledger environment
-(require 'ldg-regex)
+(require 'ledger-regex)
(defcustom ledger-init-file-name "~/.ledgerrc"
"Location of the ledger initialization file. nil if you don't have one"
@@ -38,7 +38,7 @@
(let ((matchb (match-beginning 0)) ;; save the match data, string-match stamp on it
(matche (match-end 0)))
(end-of-line)
- (setq environment-alist
+ (setq environment-alist
(append environment-alist
(list (cons (let ((flag (buffer-substring-no-properties (+ 2 matchb) matche)))
(if (string-match "[ \t\n\r]+\\'" flag)
@@ -57,12 +57,12 @@
(ledger-init-parse-initialization init-base-name)
(when (and ledger-init-file-name
(file-exists-p ledger-init-file-name)
- (file-readable-p ledger-init-file-name))
+ (file-readable-p ledger-init-file-name))
(find-file-noselect ledger-init-file-name)
- (setq ledger-environment-alist
+ (setq ledger-environment-alist
(ledger-init-parse-initialization init-base-name))
(kill-buffer init-base-name)))))
-(provide 'ldg-init)
+(provide 'ledger-init)
-;;; ldg-init.el ends here
+;;; ledger-init.el ends here
diff --git a/lisp/ldg-mode.el b/lisp/ledger-mode.el
index 9e5e85e9..0dce4f61 100644
--- a/lisp/ldg-mode.el
+++ b/lisp/ledger-mode.el
@@ -1,4 +1,4 @@
-;;; ldg-mode.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-mode.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -26,25 +26,25 @@
;;; Code:
-(require 'ldg-regex)
+(require 'ledger-regex)
(require 'esh-util)
(require 'esh-arg)
-(require 'ldg-commodities)
-(require 'ldg-complete)
-(require 'ldg-context)
-(require 'ldg-exec)
-(require 'ldg-fonts)
-(require 'ldg-init)
-(require 'ldg-occur)
-(require 'ldg-post)
-(require 'ldg-reconcile)
-(require 'ldg-report)
-(require 'ldg-sort)
-(require 'ldg-state)
-(require 'ldg-test)
-(require 'ldg-texi)
-(require 'ldg-xact)
-(require 'ldg-schedule)
+(require 'ledger-commodities)
+(require 'ledger-complete)
+(require 'ledger-context)
+(require 'ledger-exec)
+(require 'ledger-fonts)
+(require 'ledger-init)
+(require 'ledger-occur)
+(require 'ledger-post)
+(require 'ledger-reconcile)
+(require 'ledger-report)
+(require 'ledger-sort)
+(require 'ledger-state)
+(require 'ledger-test)
+(require 'ledger-texi)
+(require 'ledger-xact)
+(require 'ledger-schedule)
;;; Code:
@@ -233,8 +233,8 @@ Can indent, complete or align depending on context."
(define-key map [(meta ?p)] 'ledger-post-prev-xact)
(define-key map [(meta ?n)] 'ledger-post-next-xact)
- (define-key map [menu-bar] (make-sparse-keymap "ldg-menu"))
- (define-key map [menu-bar ldg-menu] (cons "Ledger" map))
+ (define-key map [menu-bar] (make-sparse-keymap "ledger-menu"))
+ (define-key map [menu-bar ledger-menu] (cons "Ledger" map))
(define-key map [report-kill] '(menu-item "Kill Report" ledger-report-kill :enable ledger-works))
(define-key map [report-edit] '(menu-item "Edit Report" ledger-report-edit :enable ledger-works))
@@ -295,4 +295,4 @@ Can indent, complete or align depending on context."
(provide 'ledger)
-;;; ldg-mode.el ends here
+;;; ledger-mode.el ends here
diff --git a/lisp/ldg-occur.el b/lisp/ledger-occur.el
index 451ad1a7..33d3a56c 100644
--- a/lisp/ldg-occur.el
+++ b/lisp/ledger-occur.el
@@ -1,4 +1,4 @@
-;;; ldg-mode.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-mode.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -187,6 +187,6 @@ Used for coordinating `ledger-occur' with other buffers, like reconcile."
(setq current-end (cadr match))))
(nreverse (push (list current-beginning current-end) points))))
-(provide 'ldg-occur)
+(provide 'ledger-occur)
-;;; ldg-occur.el ends here
+;;; ledger-occur.el ends here
diff --git a/lisp/ldg-post.el b/lisp/ledger-post.el
index 693b9e0e..447a34f8 100644
--- a/lisp/ldg-post.el
+++ b/lisp/ledger-post.el
@@ -1,4 +1,4 @@
-;;; ldg-post.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-post.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -23,7 +23,7 @@
;;; Commentary:
;; Utility functions for dealing with postings.
-(require 'ldg-regex)
+(require 'ledger-regex)
;;; Code:
@@ -242,8 +242,8 @@ region align the posting on the current line."
-(provide 'ldg-post)
+(provide 'ledger-post)
-;;; ldg-post.el ends here
+;;; ledger-post.el ends here
diff --git a/lisp/ldg-reconcile.el b/lisp/ledger-reconcile.el
index ae5142b7..4725c6e4 100644
--- a/lisp/ldg-reconcile.el
+++ b/lisp/ledger-reconcile.el
@@ -1,4 +1,4 @@
-;;; ldg-reconcile.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-reconcile.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -453,33 +453,33 @@ moved and recentered. If they aren't strange things happen."
(define-key map [(control ?c) (control ?p)] (ledger-reconcile-change-sort-key-and-refresh "(payee)"))
- (define-key map [menu-bar] (make-sparse-keymap "ldg-recon-menu"))
- (define-key map [menu-bar ldg-recon-menu] (cons "Reconcile" map))
- (define-key map [menu-bar ldg-recon-menu qui] '("Quit" . ledger-reconcile-quit))
- (define-key map [menu-bar ldg-recon-menu sep1] '("--"))
- (define-key map [menu-bar ldg-recon-menu pre] '("Previous Entry" . previous-line))
- (define-key map [menu-bar ldg-recon-menu vis] '("Visit Source" . ledger-reconcile-visit))
- (define-key map [menu-bar ldg-recon-menu nex] '("Next Entry" . next-line))
- (define-key map [menu-bar ldg-recon-menu sep2] '("--"))
- (define-key map [menu-bar ldg-recon-menu del] '("Delete Entry" . ledger-reconcile-delete))
- (define-key map [menu-bar ldg-recon-menu add] '("Add Entry" . ledger-reconcile-add))
- (define-key map [menu-bar ldg-recon-menu tog] '("Toggle Entry" . ledger-reconcile-toggle))
- (define-key map [menu-bar ldg-recon-menu sep3] '("--"))
- (define-key map [menu-bar ldg-recon-menu sort-amt] `("Sort by amount" . ,(ledger-reconcile-change-sort-key-and-refresh "(amount)")))
- (define-key map [menu-bar ldg-recon-menu sort-pay] `("Sort by date" . ,(ledger-reconcile-change-sort-key-and-refresh "(date)")))
- (define-key map [menu-bar ldg-recon-menu sort-dat] `("Sort by payee" . ,(ledger-reconcile-change-sort-key-and-refresh "(payee)")))
- (define-key map [menu-bar ldg-recon-menu sep4] '("--"))
- (define-key map [menu-bar ldg-recon-menu bal] '("Show Cleared Balance" . ledger-display-balance))
- (define-key map [menu-bar ldg-recon-menu tgt] '("Change Target Balance" . ledger-reconcile-change-target))
- (define-key map [menu-bar ldg-recon-menu sep5] '("--"))
- (define-key map [menu-bar ldg-recon-menu rna] '("Reconcile New Account" . ledger-reconcile))
- (define-key map [menu-bar ldg-recon-menu sep6] '("--"))
- (define-key map [menu-bar ldg-recon-menu fin] '("Finish" . ledger-reconcile-finish))
- (define-key map [menu-bar ldg-recon-menu ref] '("Refresh" . ledger-reconcile-refresh))
- (define-key map [menu-bar ldg-recon-menu sav] '("Save" . ledger-reconcile-save))
+ (define-key map [menu-bar] (make-sparse-keymap "ledger-recon-menu"))
+ (define-key map [menu-bar ledger-recon-menu] (cons "Reconcile" map))
+ (define-key map [menu-bar ledger-recon-menu qui] '("Quit" . ledger-reconcile-quit))
+ (define-key map [menu-bar ledger-recon-menu sep1] '("--"))
+ (define-key map [menu-bar ledger-recon-menu pre] '("Previous Entry" . previous-line))
+ (define-key map [menu-bar ledger-recon-menu vis] '("Visit Source" . ledger-reconcile-visit))
+ (define-key map [menu-bar ledger-recon-menu nex] '("Next Entry" . next-line))
+ (define-key map [menu-bar ledger-recon-menu sep2] '("--"))
+ (define-key map [menu-bar ledger-recon-menu del] '("Delete Entry" . ledger-reconcile-delete))
+ (define-key map [menu-bar ledger-recon-menu add] '("Add Entry" . ledger-reconcile-add))
+ (define-key map [menu-bar ledger-recon-menu tog] '("Toggle Entry" . ledger-reconcile-toggle))
+ (define-key map [menu-bar ledger-recon-menu sep3] '("--"))
+ (define-key map [menu-bar ledger-recon-menu sort-amt] `("Sort by amount" . ,(ledger-reconcile-change-sort-key-and-refresh "(amount)")))
+ (define-key map [menu-bar ledger-recon-menu sort-pay] `("Sort by date" . ,(ledger-reconcile-change-sort-key-and-refresh "(date)")))
+ (define-key map [menu-bar ledger-recon-menu sort-dat] `("Sort by payee" . ,(ledger-reconcile-change-sort-key-and-refresh "(payee)")))
+ (define-key map [menu-bar ledger-recon-menu sep4] '("--"))
+ (define-key map [menu-bar ledger-recon-menu bal] '("Show Cleared Balance" . ledger-display-balance))
+ (define-key map [menu-bar ledger-recon-menu tgt] '("Change Target Balance" . ledger-reconcile-change-target))
+ (define-key map [menu-bar ledger-recon-menu sep5] '("--"))
+ (define-key map [menu-bar ledger-recon-menu rna] '("Reconcile New Account" . ledger-reconcile))
+ (define-key map [menu-bar ledger-recon-menu sep6] '("--"))
+ (define-key map [menu-bar ledger-recon-menu fin] '("Finish" . ledger-reconcile-finish))
+ (define-key map [menu-bar ledger-recon-menu ref] '("Refresh" . ledger-reconcile-refresh))
+ (define-key map [menu-bar ledger-recon-menu sav] '("Save" . ledger-reconcile-save))
(use-local-map map)))
-(provide 'ldg-reconcile)
+(provide 'ledger-reconcile)
-;;; ldg-reconcile.el ends here
+;;; ledger-reconcile.el ends here
diff --git a/lisp/ldg-regex.el b/lisp/ledger-regex.el
index ab875579..77ce38c6 100644
--- a/lisp/ldg-regex.el
+++ b/lisp/ledger-regex.el
@@ -1,4 +1,4 @@
-;;; ldg-regex.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-regex.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -332,4 +332,4 @@
"\\(.*\\)" ;; desc
"\\)"))
-(provide 'ldg-regex)
+(provide 'ledger-regex)
diff --git a/lisp/ldg-report.el b/lisp/ledger-report.el
index 9b16522f..e785bc1b 100644
--- a/lisp/ldg-report.el
+++ b/lisp/ledger-report.el
@@ -1,4 +1,4 @@
-;;; ldg-report.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-report.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -105,22 +105,22 @@ text that should replace the format specifier."
'ledger-report-edit)
(define-key map [return] 'ledger-report-visit-source)
-
- (define-key map [menu-bar] (make-sparse-keymap "ldg-rep"))
- (define-key map [menu-bar ldg-rep] (cons "Reports" map))
-
- (define-key map [menu-bar ldg-rep lrq] '("Quit" . ledger-report-quit))
- (define-key map [menu-bar ldg-rep s2] '("--"))
- (define-key map [menu-bar ldg-rep lrd] '("Scroll Down" . scroll-down))
- (define-key map [menu-bar ldg-rep vis] '("Visit Source" . ledger-report-visit-source))
- (define-key map [menu-bar ldg-rep lru] '("Scroll Up" . scroll-up))
- (define-key map [menu-bar ldg-rep s1] '("--"))
- (define-key map [menu-bar ldg-rep rev] '("Reverse report order" . ledger-report-reverse-lines))
- (define-key map [menu-bar ldg-rep s0] '("--"))
- (define-key map [menu-bar ldg-rep lrk] '("Kill Report" . ledger-report-kill))
- (define-key map [menu-bar ldg-rep lrr] '("Re-run Report" . ledger-report-redo))
- (define-key map [menu-bar ldg-rep lre] '("Edit Report" . ledger-report-edit))
- (define-key map [menu-bar ldg-rep lrs] '("Save Report" . ledger-report-save))
+
+ (define-key map [menu-bar] (make-sparse-keymap "ledger-rep"))
+ (define-key map [menu-bar ledger-rep] (cons "Reports" map))
+
+ (define-key map [menu-bar ledger-rep lrq] '("Quit" . ledger-report-quit))
+ (define-key map [menu-bar ledger-rep s2] '("--"))
+ (define-key map [menu-bar ledger-rep lrd] '("Scroll Down" . scroll-down))
+ (define-key map [menu-bar ledger-rep vis] '("Visit Source" . ledger-report-visit-source))
+ (define-key map [menu-bar ledger-rep lru] '("Scroll Up" . scroll-up))
+ (define-key map [menu-bar ledger-rep s1] '("--"))
+ (define-key map [menu-bar ledger-rep rev] '("Reverse report order" . ledger-report-reverse-lines))
+ (define-key map [menu-bar ledger-rep s0] '("--"))
+ (define-key map [menu-bar ledger-rep lrk] '("Kill Report" . ledger-report-kill))
+ (define-key map [menu-bar ledger-rep lrr] '("Re-run Report" . ledger-report-redo))
+ (define-key map [menu-bar ledger-rep lre] '("Edit Report" . ledger-report-edit))
+ (define-key map [menu-bar ledger-rep lrs] '("Save Report" . ledger-report-save))
(use-local-map map)))
@@ -310,7 +310,7 @@ Optional EDIT the command."
(let ((file (match-string 1))
(line (string-to-number (match-string 2))))
(delete-region (match-beginning 0) (match-end 0))
- (when file
+ (when file
(set-text-properties (line-beginning-position) (line-end-position)
(list 'ledger-source (cons file (save-window-excursion
(save-excursion
@@ -330,7 +330,7 @@ Optional EDIT the command."
(let* ((prop (get-text-property (point) 'ledger-source))
(file (if prop (car prop)))
(line-or-marker (if prop (cdr prop))))
- (when (and file line-or-marker)
+ (when (and file line-or-marker)
(find-file-other-window file)
(widen)
(if (markerp line-or-marker)
@@ -414,6 +414,6 @@ Optional EDIT the command."
(ledger-reports-add ledger-report-name ledger-report-cmd)
(ledger-reports-custom-save)))))))
-(provide 'ldg-report)
+(provide 'ledger-report)
-;;; ldg-report.el ends here
+;;; ledger-report.el ends here
diff --git a/lisp/ldg-schedule.el b/lisp/ledger-schedule.el
index 885c0876..7497c7d0 100644
--- a/lisp/ldg-schedule.el
+++ b/lisp/ledger-schedule.el
@@ -1,4 +1,4 @@
-;;; ldg-schedule.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-schedule.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2013 Craig Earls (enderw88 at gmail dot com)
@@ -20,7 +20,7 @@
;; Boston, MA 02111-1307, USA.
;;; Commentary:
-;;
+;;
;; This module provides for automatically adding transactions to a
;; ledger buffer on a periodic basis. Recurrence expressions are
;; inspired by Martin Fowler's "Recurring Events for Calendars",
@@ -67,7 +67,7 @@ If year is nil, assume it is not a leap year"
(error "Month out of range, MONTH=%S" month)))
;; Macros to handle date expressions
-
+
(defun ledger-schedule-constrain-day-in-month (count day-of-week)
"Return a form that evaluates DATE that returns true for the COUNT DAY-OF-WEEK.
For example, return true if date is the 3rd Thursday of the
@@ -80,24 +80,24 @@ COUNT 0) means EVERY day-of-week (eg. every Saturday)"
(let ((decoded (gensym)))
`(let ((,decoded (decode-time date)))
(and (eq (nth 6 ,decoded) ,day-of-week)
- (between (nth 3 ,decoded)
- ,(* (1- count) 7)
+ (between (nth 3 ,decoded)
+ ,(* (1- count) 7)
,(* count 7))))))
- ((< count 0)
+ ((< count 0)
(let ((days-in-month (gensym))
(decoded (gensym)))
`(let* ((,decoded (decode-time date))
- (,days-in-month (ledger-schedule-days-in-month
- (nth 4 ,decoded)
+ (,days-in-month (ledger-schedule-days-in-month
+ (nth 4 ,decoded)
(nth 5 ,decoded))))
(and (eq (nth 6 ,decoded) ,day-of-week)
- (between (nth 3 ,decoded)
- (+ ,days-in-month ,(* count 7))
+ (between (nth 3 ,decoded)
+ (+ ,days-in-month ,(* count 7))
(+ ,days-in-month ,(* (1+ count) 7)))))))
(t
(error "COUNT out of range, COUNT=%S" count)))
- (error "Invalid argument to ledger-schedule-day-in-month-macro %S %S"
- count
+ (error "Invalid argument to ledger-schedule-day-in-month-macro %S %S"
+ count
day-of-week)))
(defun ledger-schedule-constrain-every-count-day (day-of-week skip start-date)
@@ -138,10 +138,10 @@ the transaction should be logged for that day."
(let ((date-descriptor "")
(transaction nil)
(xact-start (match-end 0)))
- (setq date-descriptors
+ (setq date-descriptors
(ledger-schedule-read-descriptor-tree
- (buffer-substring-no-properties
- (match-beginning 0)
+ (buffer-substring-no-properties
+ (match-beginning 0)
(match-end 0))))
(forward-paragraph)
(setq transaction (list date-descriptors
@@ -150,7 +150,7 @@ the transaction should be logged for that day."
(point))))
(setq xact-list (cons transaction xact-list))))
xact-list)))
-
+
(defun ledger-schedule-replace-brackets ()
"Replace all brackets with parens"
(goto-char (point-min))
@@ -166,7 +166,7 @@ the transaction should be logged for that day."
"\\([\*]\\|\\([0-3][0-9]\\)\\|"
"\\([0-5]"
"\\(\\(Su\\)\\|"
- "\\(Mo\\)\\|"
+ "\\(Mo\\)\\|"
"\\(Tu\\)\\|"
"\\(We\\)\\|"
"\\(Th\\)\\|"
@@ -182,19 +182,19 @@ returns true if the date meets the requirements"
;; Replace brackets with parens
(insert descriptor-string)
(ledger-schedule-replace-brackets)
-
+
(goto-char (point-max))
;; double quote all the descriptors for string processing later
(while (re-search-backward ledger-schedule-descriptor-regex nil t) ;; Day slot
- (goto-char
+ (goto-char
(match-end 0))
(insert ?\")
(goto-char (match-beginning 0))
(insert "\"" )))
-
+
;; read the descriptor string into a lisp object the transform the
;; string descriptor into useable things
- (ledger-schedule-transform-auto-tree
+ (ledger-schedule-transform-auto-tree
(read (buffer-substring-no-properties (point-min) (point-max))))))
(defun ledger-schedule-transform-auto-tree (descriptor-string-list)
@@ -207,7 +207,7 @@ returns true if the date meets the requirements"
(if (consp newcar)
(setq newcar (ledger-schedule-transform-auto-tree (car descriptor-string-list))))
;; newcar may be a cons now, after ledger-schedule-transfrom-auto-tree
- (if (consp newcar)
+ (if (consp newcar)
(push newcar result)
;; this is where we actually turn the string descriptor into useful lisp
(push (ledger-schedule-compile-constraints newcar) result)) )
@@ -215,7 +215,7 @@ returns true if the date meets the requirements"
;; tie up all the clauses in a big or and lambda, and return
;; the lambda function as list to be executed by funcall
- `(lambda (date)
+ `(lambda (date)
,(nconc (list 'or) (nreverse result) descriptor-string-list)))))
(defun ledger-schedule-compile-constraints (descriptor-string)
@@ -238,8 +238,8 @@ returns true if the date meets the requirements"
(error "Improperly specified year constraint: " str)))))
(defun ledger-schedule-constrain-month (str)
-
- (let ((month-match t))
+
+ (let ((month-match t))
(cond ((string= str "*")
month-match) ;; always match
((/= 0 (setq month-match (string-to-number str)))
@@ -298,17 +298,17 @@ returns true if the date meets the requirements"
(defvar auto-items)
(defun ledger-schedule-test ( early horizon)
- (ledger-schedule-create-auto-buffer
- (ledger-schedule-scan-transactions ledger-schedule-file)
- early
- horizon
+ (ledger-schedule-create-auto-buffer
+ (ledger-schedule-scan-transactions ledger-schedule-file)
+ early
+ horizon
(get-buffer "2013.ledger")))
(defun ledger-schedule-test-predict ()
(let ((today (current-time))
test-date items)
-
+
(loop for day from 0 to ledger-schedule-look-forward by 1 do
(setq test-date (time-add today (days-to-time day)))
(dolist (item auto-items items)
@@ -318,13 +318,13 @@ returns true if the date meets the requirements"
(defun ledger-schedule-upcoming ()
(interactive)
- (ledger-schedule-create-auto-buffer
- (ledger-schedule-scan-transactions ledger-schedule-file)
+ (ledger-schedule-create-auto-buffer
+ (ledger-schedule-scan-transactions ledger-schedule-file)
ledger-schedule-look-backward
ledger-schedule-look-forward
(current-buffer)))
-(provide 'ldg-schedule)
+(provide 'ledger-schedule)
-;;; ldg-schedule.el ends here
+;;; ledger-schedule.el ends here
diff --git a/lisp/ldg-sort.el b/lisp/ledger-sort.el
index 42b49648..c5a41952 100644
--- a/lisp/ldg-sort.el
+++ b/lisp/ledger-sort.el
@@ -1,4 +1,4 @@
-;;; ldg-xact.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-xact.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -121,6 +121,6 @@
sort-end
(point-max)))))
-(provide 'ldg-sort)
+(provide 'ledger-sort)
-;;; ldg-sort.el ends here
+;;; ledger-sort.el ends here
diff --git a/lisp/ldg-state.el b/lisp/ledger-state.el
index 58777631..121e97ca 100644
--- a/lisp/ldg-state.el
+++ b/lisp/ledger-state.el
@@ -1,4 +1,4 @@
-;;; ldg-state.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-state.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -110,7 +110,7 @@ dropped."
;;this excursion toggles the posting status
(save-excursion
(setq inhibit-modification-hooks t)
-
+
(goto-char (line-beginning-position))
(when (looking-at "[ \t]")
(skip-chars-forward " \t")
@@ -228,7 +228,7 @@ dropped."
(eq (ledger-state-from-char (char-after)) 'cleared))
(progn
(delete-char 1)
- (when (and style (eq style 'cleared))
+ (when (and style (eq style 'cleared))
(insert " *")
'cleared))
(if (and style (eq style 'pending))
@@ -239,6 +239,6 @@ dropped."
(insert " * ")
'cleared))))))
-(provide 'ldg-state)
+(provide 'ledger-state)
-;;; ldg-state.el ends here
+;;; ledger-state.el ends here
diff --git a/lisp/ldg-test.el b/lisp/ledger-test.el
index 0c571caa..a275ae7f 100644
--- a/lisp/ldg-test.el
+++ b/lisp/ledger-test.el
@@ -1,4 +1,4 @@
-;;; ldg-test.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-test.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -124,4 +124,4 @@
(async-shell-command (format "\"%s\" %s" command args))
(cd prev-directory)))))))
-(provide 'ldg-test)
+(provide 'ledger-test)
diff --git a/lisp/ldg-texi.el b/lisp/ledger-texi.el
index 84ba34c2..68880550 100644
--- a/lisp/ldg-texi.el
+++ b/lisp/ledger-texi.el
@@ -1,4 +1,4 @@
-;;; ldg-texi.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-texi.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -169,4 +169,4 @@
(ledger-texi-write-test example-name command input output
"../test/manual")))))
-(provide 'ldg-texi)
+(provide 'ledger-texi)
diff --git a/lisp/ldg-xact.el b/lisp/ledger-xact.el
index 37667efa..25413e43 100644
--- a/lisp/ldg-xact.el
+++ b/lisp/ledger-xact.el
@@ -1,4 +1,4 @@
-;;; ldg-xact.el --- Helper code for use with the "ledger" command-line tool
+;;; ledger-xact.el --- Helper code for use with the "ledger" command-line tool
;; Copyright (C) 2003-2013 John Wiegley (johnw AT gnu DOT org)
@@ -195,6 +195,6 @@ correct chronological place in the buffer."
(end-of-line -1)))))
-(provide 'ldg-xact)
+(provide 'ledger-xact)
-;;; ldg-xact.el ends here
+;;; ledger-xact.el ends here