From 2896240921784f0b7f6b9bcf1c658024c9d9dc25 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Mon, 2 Mar 2009 01:06:14 +0100 Subject: Fix (again!) completion for symbols outside enclosing forms. --- elisp/geiser-autodoc.el | 2 +- elisp/geiser-syntax.el | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el index 63eb3b9..4e8a5bf 100644 --- a/elisp/geiser-autodoc.el +++ b/elisp/geiser-autodoc.el @@ -126,7 +126,7 @@ when `geiser-autodoc-display-module-p' is on." (defun geiser-autodoc--eldoc-function () (condition-case e - (or (geiser-autodoc--function-args (geiser-syntax--get-partial-sexp)) "") + (geiser-autodoc--function-args (geiser-syntax--get-partial-sexp)) (error (format "Autodoc not available (%s)" (error-message-string e))))) diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el index dcc8359..9cb38c0 100644 --- a/elisp/geiser-syntax.el +++ b/elisp/geiser-syntax.el @@ -95,7 +95,8 @@ (insert "XXXpointXX")) (let ((depth (nth 0 (parse-partial-sexp (point-min) (point))))) (unless (zerop depth) (insert (make-string depth ?\))))) - (buffer-substring-no-properties (point-min) (point)))) + (let ((res (buffer-substring-no-properties (point-min) (point)))) + (and (not (zerop (length res))) res)))) (defsubst geiser-syntax--get-partial-sexp () (unless (zerop (nth 0 (syntax-ppss))) -- cgit v1.2.3