summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Purcell <steve@sanityinc.com>2014-12-16 08:41:53 +0000
committerSteve Purcell <steve@sanityinc.com>2014-12-16 08:41:53 +0000
commit5717a03e3b23a98873e83b3f00b855cfb8201d3a (patch)
tree8a62569955c9f937d46418644b3de9562cf4a426
parent9ecf0cbadb3de7129ed1c7aea2a32d404c0e8c2c (diff)
downloadfork-ledger-5717a03e3b23a98873e83b3f00b855cfb8201d3a.tar.gz
fork-ledger-5717a03e3b23a98873e83b3f00b855cfb8201d3a.tar.bz2
fork-ledger-5717a03e3b23a98873e83b3f00b855cfb8201d3a.zip
[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.
-rw-r--r--lisp/ledger-occur.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/ledger-occur.el b/lisp/ledger-occur.el
index 0c1a07d7..4c2b0643 100644
--- a/lisp/ledger-occur.el
+++ b/lisp/ledger-occur.el
@@ -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")))