summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-10-12 00:28:00 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-10-12 00:28:00 +0200
commit443b3399a1efbea581694e856b67095e9dbaad51 (patch)
tree99be66c038fb11b5b74887c60c0188b454e37847 /elisp
parent4322100bb18d2b00f409730dcd3985e56f8d4124 (diff)
downloadgeiser-chez-443b3399a1efbea581694e856b67095e9dbaad51.tar.gz
geiser-chez-443b3399a1efbea581694e856b67095e9dbaad51.tar.bz2
Menus: callers/callees active only if available
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-eval.el3
-rw-r--r--elisp/geiser-mode.el6
2 files changed, 7 insertions, 2 deletions
diff --git a/elisp/geiser-eval.el b/elisp/geiser-eval.el
index b37b7ed..fd769db 100644
--- a/elisp/geiser-eval.el
+++ b/elisp/geiser-eval.el
@@ -52,6 +52,9 @@ include macroexpand, completions, module-completions, find-file,
symbol-location, module-location, symbol-documentation,
module-exports, autodoc, callers, callees and generic-methods.")
+(defun geiser-eval--supported-p (feat)
+ (not (memq feat geiser-eval--unsupported)))
+
(defsubst geiser-eval--form (proc)
(when (and geiser-eval--unsupported (memq proc geiser-eval--unsupported))
(error "Sorry, the %s scheme implementation does not support Geiser's %s"
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index dc154bc..e9e5563 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -259,8 +259,10 @@ interacting with the Geiser REPL is at your disposal.
geiser-completion--complete-module)
("Edit module" ("\C-c\C-e\C-m" "\C-c\C-em") geiser-edit-module)
--
- ("Callers" ((kbd "C-c <")) geiser-xref-callers)
- ("Callees" ((kbd "C-c >")) geiser-xref-callees)
+ ("Callers" ((kbd "C-c <")) geiser-xref-callers
+ :enable (and (geiser-eval--supported-p 'callers) (symbol-at-point)))
+ ("Callees" ((kbd "C-c >")) geiser-xref-callees
+ :enable (and (geiser-eval--supported-p 'callees) (symbol-at-point)))
--
(mode "Smart TAB mode" nil geiser-smart-tab-mode)
--