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
This commit is contained in:
Steve Purcell 2014-01-07 20:19:48 +00:00
parent af84005a52
commit 3b5f496536

View file

@ -336,7 +336,7 @@ With a prefix argument, remove the effective date. "
'ledger-parse-arguments) 'ledger-parse-arguments)
(set (make-local-variable 'pcomplete-command-completion-function) (set (make-local-variable 'pcomplete-command-completion-function)
'ledger-complete-at-point) '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 'post-command-hook 'ledger-highlight-xact-under-point nil t)
(add-hook 'before-revert-hook 'ledger-occur-remove-all-overlays nil t) (add-hook 'before-revert-hook 'ledger-occur-remove-all-overlays nil t)