branch: elpa/gnuplot
commit 2442835959bec1dafa2456555b34e161850d022d
Author: joddie <[email protected]>
Commit: joddie <[email protected]>
Use completion-at-point in comint buffers in recent Emacs
---
gnuplot.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gnuplot.el b/gnuplot.el
index 7c6929a..f9ad17c 100644
--- a/gnuplot.el
+++ b/gnuplot.el
@@ -2226,7 +2226,12 @@ buffer."
'gnuplot-protect-prompt-fn
nil t)
- (add-hook 'comint-dynamic-complete-functions 'gnuplot-comint-complete)
+ ;; Set up completion, using completion-at-point in recent Emacs,
+ ;; comint-dynamic-complete in older Emacs
+ (if (and (>= emacs-major-version 24)
+ (>= emacs-minor-version 1))
+ (add-hook 'completion-at-point-functions #'gnuplot-completion-at-point
nil t)
+ (add-hook 'comint-dynamic-complete-functions 'gnuplot-comint-complete nil
t))
;; Set up menu (see below)
(easy-menu-define