summaryrefslogtreecommitdiff
path: root/elisp/geiser-completion.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2011-01-23 21:12:29 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2011-01-23 21:12:29 +0100
commit9af0e2f94eaf277ad8f4e3e57b9c0fb76327da00 (patch)
treedb319b248979d8e9a7c409cac5acfa6681871dd4 /elisp/geiser-completion.el
parentba3fb44c64eac29fd0b322fb811f1983eaacf796 (diff)
downloadgeiser-chez-9af0e2f94eaf277ad8f4e3e57b9c0fb76327da00.tar.gz
geiser-chez-9af0e2f94eaf277ad8f4e3e57b9c0fb76327da00.tar.bz2
Fix for bug in module name completion (affecting Guile)
Diffstat (limited to 'elisp/geiser-completion.el')
-rw-r--r--elisp/geiser-completion.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/elisp/geiser-completion.el b/elisp/geiser-completion.el
index c63813d..0b39776 100644
--- a/elisp/geiser-completion.el
+++ b/elisp/geiser-completion.el
@@ -1,6 +1,6 @@
;;; geiser-completion.el -- tab completion
-;; Copyright (C) 2009, 2010 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2011 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
@@ -116,9 +116,10 @@ we're looking for a module name.")
(buffer-substring-no-properties (geiser-completion--symbol-begin module)
(point)))
-(defsubst geiser-completion--prefix-end (beg)
+(defsubst geiser-completion--prefix-end (beg mod)
(unless (or (eq beg (point-max))
- (member (char-syntax (char-after beg)) '(?\" ?\( ?\))))
+ (member (char-syntax (char-after beg))
+ (if mod '(?\" ?\)) '(?\" ?\( ?\)))))
(let ((pos (point)))
(condition-case nil
(save-excursion
@@ -131,7 +132,7 @@ we're looking for a module name.")
(defun geiser-completion--thing-at-point (module &optional predicate)
(with-syntax-table scheme-mode-syntax-table
(let* ((beg (geiser-completion--symbol-begin module))
- (end (or (geiser-completion--prefix-end beg) beg))
+ (end (or (geiser-completion--prefix-end beg module) beg))
(prefix (and (> end beg) (buffer-substring-no-properties beg end)))
(prefix (and prefix
(if (string-match "\\([^-]+\\)-" prefix)