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
commitbc806390fa0477e957456d020e5e27ad104520ed (patch)
treef4f50859df1a3eb67a71ef6144564fe8ef610631 /elisp/geiser-guile.el
parentcd2cfae323665c99f56528a9d67fd8c386fac541 (diff)
parenta77bf8bc32f6c795b4399699e5bdc56518d7c3ff (diff)
downloadgeiser-guile-bc806390fa0477e957456d020e5e27ad104520ed.tar.gz
geiser-guile-bc806390fa0477e957456d020e5e27ad104520ed.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