Overview
Comment:Fixed s:if-{param,session-var} calls to return null list for safe processing of stml pages.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | stml2
Files: files | file ages | folders
SHA1: 30a1c2e2d252c3717829d9c23040bdd0fdef121e
User & Date: matt on 2018-09-09 16:44:02
Other Links: branch diff | manifest | tags
Context
2018-09-12
06:21
Corrected default for page-dir-style, change directory to sroot check-in: d5508f1e3b user: matt tags: stml2
2018-09-09
16:44
Fixed s:if-{param,session-var} calls to return null list for safe processing of stml pages. check-in: 30a1c2e2d2 user: matt tags: stml2
16:35
Fixed bad return from formdat initialization when there is no form. check-in: 60c715f8f7 user: matt tags: stml2
Changes

Modified stml2.scm from [34b13cb01a] to [fd2fc4f492].

2650
2651
2652
2653
2654
2655
2656

2657
2658



2659
2660
2661

2662
2663



2664
2665
2666
2667
2668
2669
2670
2650
2651
2652
2653
2654
2655
2656
2657


2658
2659
2660
2661
2662
2663
2664


2665
2666
2667
2668
2669
2670
2671
2672
2673
2674







+
-
-
+
+
+



+
-
-
+
+
+







;;   v ; => 16
;;   (+= v)
;;   v ; => 16
;; 

(define-simple-syntax (s:if-param varname first ...)
  (if (s:get varname)
      (begin
      first
      ...))
	first
	...)
      '()))

(define-simple-syntax (s:if-sessionvar varname first ...)
  (if (s:session-var-get varname)
      (begin
      first
      ...))
	first
	...)
      '()))

;; (define-macro (s:if-param varname ...)
;;   (match dat
;; 	 (()    '())
;; 	 ((a)    `(if (s:get ,varname) ,a '()))
;; 	 ((a b)  `(if (s:get ,varname) ,a ,b))))
;;