diff options
| author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-05-16 00:01:21 +0200 | 
|---|---|---|
| committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-05-16 00:01:21 +0200 | 
| commit | 91cb3fe32e5d2a93abb30c7f887e0a4c52ee6aae (patch) | |
| tree | e03e09a0a4450fe6e95f6e20d5ecdb89c9f193f7 /elisp | |
| parent | 3c3067218cd33d2686ef6d507f8a4a7ab44dc961 (diff) | |
| download | geiser-91cb3fe32e5d2a93abb30c7f887e0a4c52ee6aae.tar.gz geiser-91cb3fe32e5d2a93abb30c7f887e0a4c52ee6aae.tar.bz2 | |
PLT: Correct identification of explicit module definitions.
Diffstat (limited to 'elisp')
| -rw-r--r-- | elisp/geiser-plt.el | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/elisp/geiser-plt.el b/elisp/geiser-plt.el index 16c0b96..7c66682 100644 --- a/elisp/geiser-plt.el +++ b/elisp/geiser-plt.el @@ -95,9 +95,16 @@ This function uses `geiser-plt-init-file' if it exists."           (ignore-errors             (car (read-from-string (match-string-no-properties 1))))))) +(defsubst geiser-plt--implicit-module () +  (save-excursion +    (goto-char (point-min)) +    (if (re-search-forward "^#lang " nil t) +        (buffer-name) +      :f))) +  (defun geiser-plt-get-module (&optional module)    (cond ((and (null module) (geiser-plt--explicit-module))) -        ((null module) (buffer-file-name)) +        ((null module) (geiser-plt--implicit-module))          ((symbolp module) (list 'quote module))          ((and (stringp module) (file-name-absolute-p module)) module)          ((stringp module) (list 'quote (intern module))) | 
