[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: system-gschemrc.in
User: cnieves
Date: 06/12/26 10:56:23
Modified: . system-gschemrc.in
Log:
* lib/system-gschemrc.in: Don't place the titleblock automatically
if editing a symbol file (page filename ending in ".sym").
Revision Changes Path
1.113 +15 -1 eda/geda/gaf/gschem/lib/system-gschemrc.in
(In the diff below, changes in quantity of whitespace are not shown.)
Index: system-gschemrc.in
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gschem/lib/system-gschemrc.in,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -b -r1.112 -r1.113
--- system-gschemrc.in 23 Dec 2006 20:00:06 -0000 1.112
+++ system-gschemrc.in 26 Dec 2006 15:56:23 -0000 1.113
@@ -945,8 +945,22 @@
; (define default-titleblock #f)
;
(define default-titleblock "title-B.sym")
+
+; Load the regular expressions module
+(if (provided? 'regex)
+ (use-modules (ice-9 regex))
+ (display "Your Guile installation doesn't provide the regex module.\n"))
+
(add-hook! new-page-hook (lambda (page)
- (if (null? (get-objects-in-page page))
+ ; Only place the titleblock if there are no objects in the page
+ ; and the page filename ends in ".sym".
+ (if (and (null? (get-objects-in-page page))
+ ; If the guile installation doesn't provide the regex module,
+ ; don't care about the page filename.
+ (if (provided? 'regex)
+ (not (string-match ".*\\.[sS][yY][mM]"
+ (get-page-filename page)))
+ #t))
; Syntax Symbol name X Y angle selectable mirrored
(add-component-at-xy page default-titleblock 40000 40000 0 #f #f)))
#t)
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs