1
2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3;;
4;; MODULE      : init-buffer.scm
5;; DESCRIPTION : This file is executed when creating a new buffer
6;; COPYRIGHT   : (C) 1999  Joris van der Hoeven
7;;
8;; This software falls under the GNU general public license version 3 or later.
9;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
10;; in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
11;;
12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
13
14(when (buffer-newly-created? (current-buffer))
15  (use-modules (generic document-edit) (texmacs texmacs tm-print))
16  (init-style "generic")
17  (with lan (get-preference "language")
18    (if (!= lan "english") (set-document-language lan)))
19  (with psz (get-printer-paper-type)
20    (if (!= psz "a4") (init-page-type psz)))
21  (when (!= (get-preference "scripting language") "none")
22    (lazy-plugin-force)
23    (init-env "prog-scripts" (get-preference "scripting language")))
24  (buffer-pretend-saved (current-buffer)))
25