"Fossies" - the Fresh Open Source Software Archive

Member "TeXmacs-2.1.2-src/TeXmacs/progs/prog/prog-format.scm" (5 May 2022, 1493 Bytes) of package /linux/misc/TeXmacs-2.1.2-src.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Lisp source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 
    2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    3 ;;
    4 ;; MODULE      : prog-format.scm
    5 ;; COPYRIGHT   : (C) 2003-2019  Joris van der Hoeven, Darcy Shen
    6 ;;
    7 ;; This software falls under the GNU general public license version 3 or later.
    8 ;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
    9 ;; in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
   10 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   11 
   12 (texmacs-module (prog prog-format)
   13   (:use (convert rewrite init-rewrite)))
   14 
   15 
   16 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   17 ;; Scheme source files
   18 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   19 
   20 (define-format scheme
   21   (:name "Scheme Source Code")
   22   (:suffix "scm"))
   23 
   24 (define (texmacs->scheme x . opts)
   25   (texmacs->verbatim x (acons "texmacs->verbatim:encoding" "SourceCode" '())))
   26 
   27 (define (scheme->texmacs x . opts)
   28   (verbatim->texmacs x (acons "verbatim->texmacs:encoding" "SourceCode" '())))
   29 
   30 (define (scheme-snippet->texmacs x . opts)
   31   (verbatim-snippet->texmacs x 
   32     (acons "verbatim->texmacs:encoding" "SourceCode" '())))
   33 
   34 (converter texmacs-tree scheme-document
   35   (:function texmacs->scheme))
   36 
   37 (converter scheme-document texmacs-tree
   38   (:function scheme->texmacs))
   39   
   40 (converter texmacs-tree scheme-snippet
   41   (:function texmacs->scheme))
   42 
   43 (converter scheme-snippet texmacs-tree
   44   (:function scheme-snippet->texmacs))