diff options
author | Craig Earls <enderw88@gmail.com> | 2015-02-10 14:27:48 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2015-02-10 14:27:48 -0700 |
commit | 6b668974a48daa9982470295adb7fe3c1c7dd990 (patch) | |
tree | 83876c89786efc8bca50c0cfa404e60ebb94cb8d /contrib/raw/dotemacs.el | |
parent | b822f4ea3df56e5227c898aaffacdb3a9c0e9471 (diff) | |
parent | 8162cc783da82b5383e6403c80930034582bb366 (diff) | |
download | fork-ledger-6b668974a48daa9982470295adb7fe3c1c7dd990.tar.gz fork-ledger-6b668974a48daa9982470295adb7fe3c1c7dd990.tar.bz2 fork-ledger-6b668974a48daa9982470295adb7fe3c1c7dd990.zip |
Merge pull request #389 from thdox/untabify-emacs-lisp2
[emacs] Untabify emacs lisp
Diffstat (limited to 'contrib/raw/dotemacs.el')
-rw-r--r-- | contrib/raw/dotemacs.el | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/contrib/raw/dotemacs.el b/contrib/raw/dotemacs.el index b270042e..a4babed7 100644 --- a/contrib/raw/dotemacs.el +++ b/contrib/raw/dotemacs.el @@ -1,5 +1,5 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -; Ledger +;; Ledger ;; Maybe later add this to the expense repo once it settles (add-to-list 'load-path "/home/adamsrl/.emacs.d/addons/ledger") @@ -104,19 +104,19 @@ (defun ledger-expense-shortcut () "Updates the ER and Project metadata with the current values of the shortcut variables." - (interactive) - (when (eq major-mode 'ledger-mode) - (if (or (eql *ledger-expense-shortcut-ER* "") - (eql *ledger-expense-shortcut-Proj* "")) - (message "Run ledger-expense-shortcut-setup first.") - (save-excursion - (search-forward "; ER:") - (kill-line nil) - (insert " " *ledger-expense-shortcut-ER*)) - (save-excursion - (search-forward "; PROJECT:") - (kill-line nil) - (insert " " *ledger-expense-shortcut-Proj*))))) + (interactive) + (when (eq major-mode 'ledger-mode) + (if (or (eql *ledger-expense-shortcut-ER* "") + (eql *ledger-expense-shortcut-Proj* "")) + (message "Run ledger-expense-shortcut-setup first.") + (save-excursion + (search-forward "; ER:") + (kill-line nil) + (insert " " *ledger-expense-shortcut-ER*)) + (save-excursion + (search-forward "; PROJECT:") + (kill-line nil) + (insert " " *ledger-expense-shortcut-Proj*))))) (defun ledger-expense-split () "Splits the current transaction between internal and projects." @@ -158,33 +158,33 @@ (defun ledger-expense-personal () "Makes the expense an personal one, eliminating metadata and receipts." - (interactive) - (when (eq major-mode 'ledger-mode) ; I made this local now, should only trigger in ldg-mode - (save-excursion - (end-of-line) - (re-search-backward "^[0-9]\\{4\\}/") - (let ((begin (point)) - (end (save-excursion (re-search-forward "^$")))) - (when (re-search-forward "^ Dest:Projects" end t) - (replace-match " Other:Personal")) - (goto-char begin) - (save-excursion - (when (re-search-forward "^ +; ER:" end t) - (beginning-of-line) - (kill-line 1))) - (save-excursion - (when (re-search-forward "^ +; PROJECT:" end t) - (beginning-of-line) - (kill-line 1))) - (save-excursion - (when (re-search-forward "^ +; CATEGORY:" end t) - (beginning-of-line) - (kill-line 1))) - (save-excursion - (when (re-search-forward "^ +; RECEIPT:" end t) - (beginning-of-line) - (kill-line 1))) - (ledger-toggle-current-entry))))) + (interactive) + (when (eq major-mode 'ledger-mode) ; I made this local now, should only trigger in ldg-mode + (save-excursion + (end-of-line) + (re-search-backward "^[0-9]\\{4\\}/") + (let ((begin (point)) + (end (save-excursion (re-search-forward "^$")))) + (when (re-search-forward "^ Dest:Projects" end t) + (replace-match " Other:Personal")) + (goto-char begin) + (save-excursion + (when (re-search-forward "^ +; ER:" end t) + (beginning-of-line) + (kill-line 1))) + (save-excursion + (when (re-search-forward "^ +; PROJECT:" end t) + (beginning-of-line) + (kill-line 1))) + (save-excursion + (when (re-search-forward "^ +; CATEGORY:" end t) + (beginning-of-line) + (kill-line 1))) + (save-excursion + (when (re-search-forward "^ +; RECEIPT:" end t) + (beginning-of-line) + (kill-line 1))) + (ledger-toggle-current-entry))))) (defun ledger-expense-show-receipt () "Uses the Receipt buffer to show the receipt of the txn we're on." |