Skip to content

Commit

Permalink
Simplify conditional statement
Browse files Browse the repository at this point in the history
* ledger-post.el (ledger-indent-line): Prefer 'and' to 'prog + when'
  • Loading branch information
jabranham committed Sep 24, 2019
1 parent 47a186e commit b5749af
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ledger-post.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b5749af

Please sign in to comment.