From c425acc5528bd24ca90fa7b5b3c3edba12b8f4fb Mon Sep 17 00:00:00 2001 From: Dan Leslie Date: Mon, 15 Feb 2016 17:32:08 -0800 Subject: Fix for #127 --- scheme/chicken/geiser/emacs.scm | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'scheme/chicken/geiser') diff --git a/scheme/chicken/geiser/emacs.scm b/scheme/chicken/geiser/emacs.scm index b4274cf..313155c 100644 --- a/scheme/chicken/geiser/emacs.scm +++ b/scheme/chicken/geiser/emacs.scm @@ -1,3 +1,5 @@ +;; -*- geiser-scheme-implementation: 'chicken + ;; Copyright (C) 2015 Daniel J Leslie ;; This program is free software; you can redistribute it and/or @@ -547,7 +549,7 @@ (define (geiser-load-file file) (let* ((file (if (symbol? file) (symbol->string file) file)) - (found-file (geiser-find-file #f file))) + (found-file (geiser-find-file file))) (call-with-result #f (lambda () (when found-file @@ -638,14 +640,15 @@ (define geiser-load-paths (make-parameter '("" "."))) (define (geiser-find-file file . rest) - (let ((paths (geiser-load-paths))) - (define (try-find file paths) - (cond - ((null? paths) #f) - ((file-exists? (string-append (car paths) file)) - (string-append (car paths) file)) - (else (try-find file (cdr paths))))) - (try-find file paths))) + (when file + (let ((paths (geiser-load-paths))) + (define (try-find file paths) + (cond + ((null? paths) #f) + ((file-exists? (string-append (car paths) file)) + (string-append (car paths) file)) + (else (try-find file (cdr paths))))) + (try-find file paths)))) (define (geiser-add-to-load-path directory . rest) (let* ((directory (if (symbol? directory) -- cgit v1.2.3