General refactor & cleanup, across the board
This commit is contained in:
parent
4ddc5c194b
commit
2d365619cd
35 changed files with 141 additions and 155 deletions
|
@ -1,14 +1,14 @@
|
|||
;;; lang/ledger/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; `ledger-mode'
|
||||
;;;###package ledger-mode
|
||||
(setq ledger-clear-whole-transactions 1)
|
||||
|
||||
(defun +ledger*check-version (orig-fn)
|
||||
(defadvice! +ledger--check-version-a (orig-fn)
|
||||
"Fail gracefully if ledger binary isn't available."
|
||||
:around #'ledger-check-version
|
||||
(if (executable-find ledger-binary-path)
|
||||
(funcall orig-fn)
|
||||
(message "Couldn't find '%s' executable" ledger-binary-path)))
|
||||
(advice-add #'ledger-check-version :around #'+ledger*check-version)
|
||||
|
||||
;; Restore leader key in ledger reports
|
||||
(map! :after ledger-mode
|
||||
|
@ -51,7 +51,8 @@
|
|||
(:prefix "g"
|
||||
"s" #'ledger-display-ledger-stats
|
||||
"b" #'ledger-display-balance-at-point))
|
||||
;; Fix inaccurate keybind message
|
||||
(defun +ledger*fix-key-help (&rest _)
|
||||
(message "q to quit; gr to redo; RET to edit; C-c C-s to save"))
|
||||
(advice-add #'ledger-report :after #'+ledger*fix-key-help))
|
||||
|
||||
(defadvice! +ledger--fix-key-help-a (&rest _)
|
||||
"Fix inaccurate keybind message."
|
||||
:after #'ledger-report
|
||||
(message "q to quit; gr to redo; RET to edit; C-c C-s to save")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue