From 5717a03e3b23a98873e83b3f00b855cfb8201d3a Mon Sep 17 00:00:00 2001 From: Steve Purcell Date: Tue, 16 Dec 2014 08:41:53 +0000 Subject: [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. --- lisp/ledger-occur.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/ledger-occur.el') 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"))) -- cgit v1.2.3