summaryrefslogtreecommitdiff
path: root/elisp/geiser-guile.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-09 21:52:56 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-11-09 21:52:56 +0100
commit27916d2da2e43f231daff12249b19701f5a27b4f (patch)
tree8425627764ba5a195a25665da5a2c62ce2f221bd /elisp/geiser-guile.el
parentd830e14a4010284b4085d9942bfd856b0360d793 (diff)
parentf2bf4b2cda05fe8c32ee74ce3b5cce743d81de61 (diff)
downloadgeiser-guile-27916d2da2e43f231daff12249b19701f5a27b4f.tar.gz
geiser-guile-27916d2da2e43f231daff12249b19701f5a27b4f.tar.bz2
Merge branch 'master' into guile-meta
Conflicts: elisp/geiser-guile.el
Diffstat (limited to 'elisp/geiser-guile.el')
-rw-r--r--elisp/geiser-guile.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/elisp/geiser-guile.el b/elisp/geiser-guile.el
index 93d1237..f410674 100644
--- a/elisp/geiser-guile.el
+++ b/elisp/geiser-guile.el
@@ -144,8 +144,9 @@ This function uses `geiser-guile-init-file' if it exists."
:f)))
((listp module) module)
((stringp module)
- (or (ignore-errors (car (geiser-syntax--read-from-string module)))
- :f))
+ (condition-case nil
+ (car (geiser-syntax--read-from-string module))
+ (error :f)))
(t :f)))
(defun geiser-guile--module-cmd (module fmt &optional def)
@@ -198,10 +199,14 @@ This function uses `geiser-guile-init-file' if it exists."
;;; Trying to ascertain whether a buffer is Guile Scheme:
+(defconst geiser-guile--guess-re
+ (format "\\(%s\\|#! *.+\\(/\\| \\)guile\\( *\\\\\\)?\\)"
+ geiser-guile--module-re))
+
(defun geiser-guile--guess ()
(save-excursion
(goto-char (point-min))
- (re-search-forward geiser-guile--module-re nil t)))
+ (re-search-forward geiser-guile--guess-re nil t)))
;;; Compilation shell regexps