"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "style/dinbrief.el" between
auctex-12.2.tar.gz and auctex-12.3.tar.gz

About: AUCTEX is an extensible package for writing and formatting TeX files in GNU Emacs and XEmacs.

dinbrief.el  (auctex-12.2):dinbrief.el  (auctex-12.3)
;;; dinbrief.el --- Special code for LaTeX-Style dinbrief. ;;; dinbrief.el --- Special code for LaTeX-Style dinbrief.
;; Copyright (C) 1994, 2013, 2014, 2018 Free Software Foundation, Inc. ;; Copyright (C) 1994, 2013, 2014, 2018, 2020 Free Software Foundation, Inc.
;; Author: Werner Fink <werner@suse.de> ;; Author: Werner Fink <werner@suse.de>
;; Maintainer: auctex-devel@gnu.org ;; Maintainer: auctex-devel@gnu.org
;; Keywords: tex ;; Keywords: tex
;; This file is part of AUCTeX. ;; This file is part of AUCTeX.
;; AUCTeX is free software; you can redistribute it and/or modify it ;; AUCTeX is free software; you can redistribute it and/or modify it
;; under the terms of the GNU General Public License as published by ;; under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option) ;; the Free Software Foundation; either version 3, or (at your option)
skipping to change at line 36 skipping to change at line 36
;;; dinbrief.el - Special code for LaTeX class dinbrief. ;;; dinbrief.el - Special code for LaTeX class dinbrief.
;;; Commentary: ;;; Commentary:
;; LaTeX Class: dinbrief.cls ;; LaTeX Class: dinbrief.cls
;;; Code: ;;; Code:
(require 'tex) (require 'tex)
(TeX-add-style-hook "dinbrief" (TeX-add-style-hook
(function "dinbrief"
(lambda () (lambda ()
(add-hook 'LaTeX-document-style-hook (add-hook 'LaTeX-document-style-hook
'LaTeX-dinbrief-style) 'LaTeX-dinbrief-style)
(LaTeX-add-environments (LaTeX-add-environments
'("letter" LaTeX-dinbrief-env-recipient) '("letter" LaTeX-dinbrief-env-recipient)
"dinquote") "dinquote")
(TeX-add-symbols (TeX-add-symbols
'("address" "Absender: ") '("address" "Absender")
'("postremark" "Postvermerk: ") '("postremark" "Postvermerk")
'("date" "Datum: ") '("date" "Datum")
'("subject" "Betreff: ") '("subject" "Betreff")
'("handling" "Behandlungsvermerk: ") '("handling" "Behandlungsvermerk")
'("cc" "Verteiler: ") '("cc" "Verteiler")
'("place" "Heutiger Ort: ") '("place" "Heutiger Ort")
"makelabels" "makelabels"
"nowindowrules" "nowindowrules"
"windowrules" "windowrules"
"nowindowtics" "nowindowtics"
"windowtics" "windowtics"
"disabledraftstandard" "disabledraftstandard"
"enabledraftstandard" "enabledraftstandard"
"centeraddress" "centeraddress"
"normaladdress" "normaladdress"
'("encl" "Anlagen: ") '("encl" "Anlagen: ")
'("backaddress" "Retouradresse: ") '("backaddress" "Retouradresse")
'("signature" "Unterschrift: ") '("signature" "Unterschrift")
'("opening" "Anrede: ") '("opening" "Anrede")
'("closing" "Schluss: ")))) '("closing" "Schluss")))
LaTeX-dialect) LaTeX-dialect)
(defmacro LaTeX-dinbrief-insert (&rest args) (defmacro LaTeX-dinbrief-insert (&rest args)
"Insert text ignoring active markers." "Insert text ignoring active markers."
`(progn (if mark-active (deactivate-mark)) `(progn (if mark-active (deactivate-mark))
(insert ,@args))) (insert ,@args)))
(defun LaTeX-dinbrief-style () (defun LaTeX-dinbrief-style ()
"Insert some useful packages for writing german letters." "Insert some useful packages for writing german letters."
(save-excursion (let ((func (if (fboundp 'indent-relative-first-indent-point)
(goto-char (point-min)) ; insert before \begin{document} 'indent-relative-first-indent-point
(if (re-search-forward ".begin.document." (point-max) t) 'indent-relative-maybe)))
(beginning-of-line 1)) (save-excursion
(open-line 2) (goto-char (point-min)) ; insert before \begin{document}
(indent-relative-maybe) (if (re-search-forward ".begin.document." (point-max) t)
(beginning-of-line 1))
(open-line 2)
(funcall func)
(LaTeX-dinbrief-insert TeX-esc "usepackage" (LaTeX-dinbrief-insert TeX-esc "usepackage"
LaTeX-optop "latin1,utf8" LaTeX-optcl LaTeX-optop "latin1,utf8" LaTeX-optcl
TeX-grop "inputenc" TeX-grcl) TeX-grop "inputenc" TeX-grcl)
(newline-and-indent) (newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "usepackage" (LaTeX-dinbrief-insert TeX-esc "usepackage"
LaTeX-optop "T1" LaTeX-optcl LaTeX-optop "T1" LaTeX-optcl
TeX-grop "fontenc" TeX-grcl) TeX-grop "fontenc" TeX-grcl)
(newline-and-indent) (funcall func)
(LaTeX-dinbrief-insert TeX-esc "usepackage" (LaTeX-dinbrief-insert TeX-esc "usepackage"
TeX-grop "ngerman" TeX-grcl) TeX-grop "ngerman" TeX-grcl))
(TeX-run-style-hooks "inputenc") (TeX-run-style-hooks "inputenc" "fontenc" "ngerman")))
(TeX-run-style-hooks "fontenc")
(TeX-run-style-hooks "ngerman")))
(defun LaTeX-dinbrief-env-recipient (environment) (defun LaTeX-dinbrief-env-recipient (environment)
"Insert ENVIRONMENT and prompt for recipient and address." "Insert ENVIRONMENT and prompt for recipient and address."
(let ( (let ((sender (LaTeX-dinbrief-sender))
(sender (LaTeX-dinbrief-sender))
(recipient (TeX-read-string "Empfänger: ")) (recipient (TeX-read-string "Empfänger: "))
(address (LaTeX-dinbrief-recipient)) (address (LaTeX-dinbrief-recipient))
(date (TeX-read-string "Datum: " (LaTeX-dinbrief-today))) (date (TeX-read-string "Datum: " (LaTeX-dinbrief-today)))
(postremark (TeX-read-string "Postvermerk: ")) (postremark (TeX-read-string "Postvermerk: "))
(fenster (TeX-read-string "Fenster \(ja/nein\): ")) (fenster (TeX-read-string "Fenster (ja/nein): "))
(vermerk (TeX-read-string "Behandlungsvermerk: ")) (vermerk (TeX-read-string "Behandlungsvermerk: "))
(verteil (TeX-read-string "Verteiler: ")) (verteil (TeX-read-string "Verteiler: "))
(betreff (TeX-read-string "Betreff: ")) (betreff (TeX-read-string "Betreff: "))
(opening (TeX-read-string "Anrede: ")) (opening (TeX-read-string "Anrede: "))
(closing (TeX-read-string "Schluss: ")) (closing (TeX-read-string "Schluss: "))
(signature (TeX-read-string "Unterschrift: ")) (signature (TeX-read-string "Unterschrift: "))
(anlage (TeX-read-string "Anlagen: "))) (anlage (TeX-read-string "Anlagen: "))
(func (if (fboundp 'indent-relative-first-indent-point)
'indent-relative-first-indent-point
'indent-relative-maybe)))
(if (string= fenster "ja") (if (string= fenster "ja")
(progn (progn
(LaTeX-dinbrief-insert TeX-esc "enabledraftstandard") (LaTeX-dinbrief-insert TeX-esc "enabledraftstandard")
(newline-and-indent) (newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "centeraddress") (LaTeX-dinbrief-insert TeX-esc "centeraddress")
(newline-and-indent) (newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "nowindowrules") (LaTeX-dinbrief-insert TeX-esc "nowindowrules")
(newline-and-indent) (newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "windowtics") (LaTeX-dinbrief-insert TeX-esc "windowtics")
(newline-and-indent) (newline-and-indent)
(let ((retouradr (TeX-read-string "Retouradresse: " sender))) (let ((retouradr (TeX-read-string "Retouradresse: " sender)))
(newline-and-indent) (newline-and-indent)
(if (not (zerop (length retouradr))) (if (not (zerop (length retouradr)))
(progn (progn
(if mark-active (deactivate-mark)) (if mark-active (deactivate-mark))
(LaTeX-dinbrief-insert TeX-esc "backaddress" TeX-grop retouradr T (LaTeX-dinbrief-insert TeX-esc "backaddress" TeX-grop retouradr
eX-grcl) TeX-grcl)
(newline-and-indent))))) (newline-and-indent)))))
(LaTeX-dinbrief-insert TeX-esc "enabledraftstandard") (LaTeX-dinbrief-insert TeX-esc "enabledraftstandard")
(newline-and-indent) (newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "centeraddress") (LaTeX-dinbrief-insert TeX-esc "centeraddress")
(newline-and-indent) (newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "nowindowrules") (LaTeX-dinbrief-insert TeX-esc "nowindowrules")
(newline-and-indent) (newline-and-indent)
(LaTeX-dinbrief-insert TeX-esc "windowtics")) (LaTeX-dinbrief-insert TeX-esc "windowtics"))
(newline-and-indent) (newline-and-indent)
(if (not (zerop (length signature))) (if (not (zerop (length signature)))
(progn (progn
(LaTeX-dinbrief-insert TeX-esc "signature" TeX-grop signature TeX-grcl) (LaTeX-dinbrief-insert TeX-esc "signature" TeX-grop signature TeX-grcl)
(newline-and-indent))) (newline-and-indent)))
(if (not (zerop (length date))) (if (not (zerop (length date)))
(progn (progn
(LaTeX-dinbrief-insert TeX-esc "date" TeX-grop date TeX-grcl) (LaTeX-dinbrief-insert TeX-esc "date" TeX-grop date TeX-grcl)
(newline-and-indent))) (newline-and-indent)))
(newline-and-indent) (newline-and-indent)
skipping to change at line 192 skipping to change at line 194
(newline-and-indent))) (newline-and-indent)))
(if (not (zerop (length verteil))) (if (not (zerop (length verteil)))
(progn (progn
(LaTeX-dinbrief-insert TeX-esc "cc" TeX-grop verteil TeX-grcl) (LaTeX-dinbrief-insert TeX-esc "cc" TeX-grop verteil TeX-grcl)
(newline-and-indent))) (newline-and-indent)))
(if (not (zerop (length anlage))) (if (not (zerop (length anlage)))
(progn (progn
(LaTeX-dinbrief-insert TeX-esc "encl" TeX-grop anlage TeX-grcl) (LaTeX-dinbrief-insert TeX-esc "encl" TeX-grop anlage TeX-grcl)
(newline-and-indent))) (newline-and-indent)))
(LaTeX-dinbrief-insert TeX-esc "opening" (LaTeX-dinbrief-insert TeX-esc "opening"
TeX-grop TeX-grop
(if (zerop (length opening)) (if (zerop (length opening))
(concat TeX-esc " ") (concat TeX-esc " ")
opening) opening)
TeX-grcl "\n") TeX-grcl "\n")
(indent-relative-maybe) (funcall func)
(save-excursion (save-excursion
(LaTeX-dinbrief-insert "\n" TeX-esc "closing" (LaTeX-dinbrief-insert "\n" TeX-esc "closing"
TeX-grop TeX-grop
(if (zerop (length closing)) (if (zerop (length closing))
(concat TeX-esc " ") (concat TeX-esc " ")
closing) closing)
TeX-grcl "\n") TeX-grcl "\n")
(indent-relative-maybe)))) (funcall func))))
(defun LaTeX-dinbrief-sender () (defun LaTeX-dinbrief-sender ()
"Read and write the senders address." "Read and write the senders address."
(interactive) (interactive)
(let ((name (TeX-read-string "Absender: " (user-full-name))) (let ((name (TeX-read-string "Absender: " (user-full-name)))
(str (TeX-read-string "Meine Strasse: ")) (str (TeX-read-string "Meine Strasse: "))
(ort (TeX-read-string "Mein Wohnort: "))) (ort (TeX-read-string "Mein Wohnort: ")))
(if (not (zerop (length name))) (if (not (zerop (length name)))
(progn (progn
(goto-char (point-min)) ; insert before \end{document} (goto-char (point-min)) ; insert before \end{document}
(if (re-search-forward ".end.document." (point-max) t) (if (re-search-forward ".end.document." (point-max) t)
(beginning-of-line 1)) (beginning-of-line 1))
(previous-line 1) ;FIXME: Use forward-line! (forward-line -1)
(LaTeX-dinbrief-insert TeX-esc "address" TeX-grop name) (LaTeX-dinbrief-insert TeX-esc "address" TeX-grop name)
(if (not (zerop (length str))) (if (not (zerop (length str)))
(progn (progn
(LaTeX-dinbrief-insert " " TeX-esc TeX-esc) (LaTeX-dinbrief-insert " " TeX-esc TeX-esc)
(newline-and-indent) (newline-and-indent)
(LaTeX-dinbrief-insert str))) (LaTeX-dinbrief-insert str)))
(if (not (zerop (length ort))) (if (not (zerop (length ort)))
(progn (progn
(LaTeX-dinbrief-insert " " TeX-esc "par") (LaTeX-dinbrief-insert " " TeX-esc "par")
(newline-and-indent) (newline-and-indent)
 End of changes. 15 change blocks. 
71 lines changed or deleted 73 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)