summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Branham <alex.branham@gmail.com>2019-09-24 14:54:28 -0500
committerAlex Branham <alex.branham@gmail.com>2019-09-24 14:54:28 -0500
commitb5749af83a60dfa0cb6db05a39dd41d99666c62a (patch)
tree9a7747957980b06e4e29c5c049e8b20da9f2a278
parent47a186ecc3f7e270c2eb93cbe659e5fa07caeff6 (diff)
Simplify conditional statement
* ledger-post.el (ledger-indent-line): Prefer 'and' to 'prog + when'
-rw-r--r--ledger-post.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/ledger-post.el b/ledger-post.el
index 982863d..66c97e9 100644
--- a/ledger-post.el
+++ b/ledger-post.el
@@ -129,8 +129,8 @@ Looks only as far as END, if supplied, otherwise `point-max'."
(defun ledger-indent-line ()
"Indent the current line."
;; Ensure indent if the previous line was indented
- (let ((indent-level (save-excursion (if (progn (when (zerop (forward-line -1))
- (memq (ledger-thing-at-point) '(transaction posting))))
+ (let ((indent-level (save-excursion (if (and (zerop (forward-line -1))
+ (memq (ledger-thing-at-point) '(transaction posting)))
ledger-post-account-alignment-column
0))))
(unless (= (current-indentation) indent-level)