summaryrefslogtreecommitdiff
path: root/elisp/geiser-completion.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2020-02-13 02:39:35 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2020-02-13 02:39:35 +0000
commit659d586f6f0695ada311c0f7ac8eb5796ab0e395 (patch)
treed09f13cc80e7eeccc74c29aec07de22ea9465327 /elisp/geiser-completion.el
parent8357c84af4eb05dece8aec6bbc53b9fd001c89d6 (diff)
downloadgeiser-659d586f6f0695ada311c0f7ac8eb5796ab0e395.tar.gz
geiser-659d586f6f0695ada311c0f7ac8eb5796ab0e395.tar.bz2
Compatibility with Helm completions in emacs-25 (fixes #271)
Diffstat (limited to 'elisp/geiser-completion.el')
-rw-r--r--elisp/geiser-completion.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/elisp/geiser-completion.el b/elisp/geiser-completion.el
index 765b456..9c979f1 100644
--- a/elisp/geiser-completion.el
+++ b/elisp/geiser-completion.el
@@ -1,6 +1,6 @@
;;; geiser-completion.el -- tab completion
-;; Copyright (C) 2009, 2010, 2011, 2012, 2018 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2011, 2012, 2018, 2020 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -61,10 +61,16 @@
(defsubst geiser-completion--module-list (prefix)
(geiser-eval--send/result `(:eval (:ge module-completions ,prefix))))
+(defvar geiser-completion--module-list-func
+ (cond ((< emacs-major-version 25)
+ (completion-table-dynamic 'geiser-completion--symbol-list))
+ ((= emacs-major-version 25)
+ (completion-table-dynamic 'geiser-completion--module-list t))
+ (t (completion-table-dynamic 'geiser-completion--module-list))))
+
(defvar geiser-completion-symbol-list-func
(if (< emacs-major-version 25)
- (completion-table-dynamic 'geiser-completion--symbol-list)
- (completion-table-dynamic 'geiser-completion--symbol-list t)))
+ (completion-table-dynamic 'geiser-completion--symbol-list t)))
(defvar geiser-completion-module-list-func
(if (< emacs-major-version 25)