summaryrefslogtreecommitdiff
path: root/scheme/guile/geiser/utils.scm
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-18 13:40:54 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2010-06-18 13:40:54 +0200
commitf7b672621bc80c93c3788bc99ce850f4edc50aaa (patch)
treefc2c87172e02e0f1ad69ad43a9b03365013e11b8 /scheme/guile/geiser/utils.scm
parentce3ef41414442b345e5e8d9f064f0d7531addea5 (diff)
downloadgeiser-guile-f7b672621bc80c93c3788bc99ce850f4edc50aaa.tar.gz
geiser-guile-f7b672621bc80c93c3788bc99ce850f4edc50aaa.tar.bz2
Guile: filtering gensym names in autodoc display.
Diffstat (limited to 'scheme/guile/geiser/utils.scm')
-rw-r--r--scheme/guile/geiser/utils.scm12
1 files changed, 10 insertions, 2 deletions
diff --git a/scheme/guile/geiser/utils.scm b/scheme/guile/geiser/utils.scm
index b047e6c..01dfaa0 100644
--- a/scheme/guile/geiser/utils.scm
+++ b/scheme/guile/geiser/utils.scm
@@ -1,6 +1,6 @@
;;; utils.scm -- utility functions
-;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010 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
@@ -13,7 +13,9 @@
#:export (make-location
symbol->object
pair->list
- sort-symbols!))
+ sort-symbols!
+ gensym?)
+ #:use-module (ice-9 regex))
(define (symbol->object sym)
(and (symbol? sym)
@@ -35,4 +37,10 @@
(string<? (symbol->string l) (symbol->string r)))))
(sort! syms cmp)))
+(define (gensym? sym)
+ (and (symbol? sym) (gensym-name? (format "~A" sym))))
+
+(define (gensym-name? name)
+ (and (string-match "^#[{]" name) #t))
+
;;; utils.scm ends here