[emacs] Make ledger-occur-mode auto-disable when restored by desktop.el

The minor mode gets restored by desktop.el, and this has long caused
errors. While the ideal would be to restore the mode along with the
current narrowing regexp, this interim fix instead ensures that
ledger-occur-mode will disable itself if it finds no regexp set.
This commit is contained in:
Steve Purcell 2014-12-16 08:41:53 +00:00
parent 9ecf0cbadb
commit 5717a03e3b

View file

@ -55,7 +55,7 @@
nil
(:eval (format " Ledger-Narrow(%s)" ledger-occur-current-regex))
ledger-occur-mode-map
(if ledger-occur-mode
(if (and ledger-occur-current-regex ledger-occur-mode)
(ledger-occur-refresh)
(ledger-occur-remove-overlays)
(message "Showing all transactions")))