diff options
author | Rémi Vanicat <vanicat@debian.org> | 2013-02-09 11:16:52 +0100 |
---|---|---|
committer | Rémi Vanicat <vanicat@debian.org> | 2013-02-09 11:20:30 +0100 |
commit | cf6a23b2fe27e67536bd389737ed0e3379c2ae14 (patch) | |
tree | e86779476b73fdc592a5f7d84c320a9865c3b35b /lisp | |
parent | 9a411e898acdd52e432ea84914467233e740c67e (diff) | |
download | fork-ledger-cf6a23b2fe27e67536bd389737ed0e3379c2ae14.tar.gz fork-ledger-cf6a23b2fe27e67536bd389737ed0e3379c2ae14.tar.bz2 fork-ledger-cf6a23b2fe27e67536bd389737ed0e3379c2ae14.zip |
Unconditionally activate the occur stuff in ledger-occur-mode
Well, we still deactivate it when regex is nil, but the function
should not look at previous value of ledger-occur-mode:
- the interactive function (ledger-occur) already do it, we don't need
to do it there,
- caller that want to deactivate the occur stuff only have to call
ledger-occur with a nil regex
- the old behavior make ledger-reconcile to turn off occur stuff if it
was already turn on, when what we do want is that the occur stuff
change to the new account.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ldg-occur.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/ldg-occur.el b/lisp/ldg-occur.el index 2958c94c..5a7c8ed7 100644 --- a/lisp/ldg-occur.el +++ b/lisp/ldg-occur.el @@ -69,13 +69,14 @@ "A list of currently active overlays to the ledger buffer.") (make-variable-buffer-local 'ledger-occur-overlay-list) - (defun ledger-occur-mode (regex buffer) + "Higlight transaction that match REGEX, hiding others + +When REGEX is nil, unhide everything, and remove higlight" (progn (set-buffer buffer) (setq ledger-occur-mode - (if (or ledger-occur-mode - (null regex) + (if (or (null regex) (zerop (length regex))) nil (concat " Ledger-Folded: " regex))) |