summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorSteve Purcell <steve@sanityinc.com>2014-01-07 20:19:48 +0000
committerSteve Purcell <steve@sanityinc.com>2014-01-07 20:33:08 +0000
commit3b5f4965369afb94dfbfcdb2325f2d329fcffaf5 (patch)
tree16f680239e40bee35a667bbe57a4dc9a8bc91093 /lisp
parentaf84005a529b49f39927f0174b41bc31d2d04be0 (diff)
downloadfork-ledger-3b5f4965369afb94dfbfcdb2325f2d329fcffaf5.tar.gz
fork-ledger-3b5f4965369afb94dfbfcdb2325f2d329fcffaf5.tar.bz2
fork-ledger-3b5f4965369afb94dfbfcdb2325f2d329fcffaf5.zip
ledger-mode: only modify completion-at-point-functions locally
Without this patch, the addition of pcomplete-completions-at-point leaks into the global value of completion-at-point-functions. See #227
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ledger-mode.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/ledger-mode.el b/lisp/ledger-mode.el
index 27f8893b..6eb0aaa5 100644
--- a/lisp/ledger-mode.el
+++ b/lisp/ledger-mode.el
@@ -336,7 +336,7 @@ With a prefix argument, remove the effective date. "
'ledger-parse-arguments)
(set (make-local-variable 'pcomplete-command-completion-function)
'ledger-complete-at-point)
- (add-to-list 'completion-at-point-functions 'pcomplete-completions-at-point)
+ (add-hook 'completion-at-point-functions 'pcomplete-completions-at-point nil t)
(add-hook 'post-command-hook 'ledger-highlight-xact-under-point nil t)
(add-hook 'before-revert-hook 'ledger-occur-remove-all-overlays nil t)