From a8c3436c0e7a78f4a1f90af407c5f72ee6262b20 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Thu, 19 Apr 2018 07:29:57 -0700 Subject: [PATCH 1/2] docs typo --- pollen/private/ts.rktd | 2 +- pollen/scribblings/tutorial-first.scrbl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pollen/private/ts.rktd b/pollen/private/ts.rktd index 7059b9c..e426b70 100644 --- a/pollen/private/ts.rktd +++ b/pollen/private/ts.rktd @@ -1 +1 @@ -1522300233 +1524148197 diff --git a/pollen/scribblings/tutorial-first.scrbl b/pollen/scribblings/tutorial-first.scrbl index 77cd55a..6bcfccd 100644 --- a/pollen/scribblings/tutorial-first.scrbl +++ b/pollen/scribblings/tutorial-first.scrbl @@ -125,7 +125,7 @@ The border is too.} @repl-output{ The margin is 42em. -The border is blue. +The border is red. The padding is 15em. The border is too.} -- 2.25.1 From 3501ae5dfe5c5d6f5ea146fa1a552235e6bc4dc7 Mon Sep 17 00:00:00 2001 From: Leif Andersen Date: Fri, 20 Apr 2018 19:01:46 -0400 Subject: [PATCH 2/2] Set default file extensions for pollen in DrRacket. --- pollen/private/reader-base.rkt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/pollen/private/reader-base.rkt b/pollen/private/reader-base.rkt index aef316e..9211e78 100644 --- a/pollen/private/reader-base.rkt +++ b/pollen/private/reader-base.rkt @@ -63,7 +63,7 @@ (provide (all-from-out 'POLLEN-MOD-NAME)) (show DOC 'PARSER-MODE-FROM-READER HERE-PATH))))) ; HERE-PATH otherwise acts as "local" runtime config -(define (custom-get-info in mod line col pos) +(define ((custom-get-info mode) in mod line col pos) ;; DrRacket caches source file information per session, ;; so we can do the same to avoid multiple searches for the command char. (let ([command-char-cache (make-hash)]) @@ -89,11 +89,21 @@ (my-make-drracket-buttons my-command-char)])] [(drracket:indentation) (dynamic-require 'scribble/private/indentation 'determine-spaces)] + [(drracket:default-filters) + '(("Pollen Sources" "*.pp;*.pmd;*.pm;*.ptree;*.ptree;*.p"))] + [(drracket:default-extension) + (case mode + [(default-mode-auto) "pp"] + [(default-mode-preproc) "pp"] + [(default-mode-markdown) "pmd"] + [(default-mode-markup) "pm"] + [(default-mode-ptree) "ptree"] + [else "pm"])] [else default])))) (define-syntax-rule (reader-module-begin mode . _) (#%module-begin - (define cgi custom-get-info) ; stash hygienic references to local funcs with macro-introduced identifiers + (define cgi (custom-get-info mode)) ; stash hygienic references to local funcs with macro-introduced identifiers (define cr custom-read) ; so they can be provided out (define (crs ps p) (custom-read-syntax #:reader-mode mode ps p)) (provide (rename-out [cr read][crs read-syntax][cgi get-info])))) \ No newline at end of file -- 2.25.1