Dr. Werner Fink 2013-06-07 07:26:02 +00:00 committed by Git OBS Bridge
parent 98e5ed1198
commit bedf6700cf
2 changed files with 37 additions and 14 deletions

View File

@ -1,5 +1,22 @@
--- style/dinbrief.el
+++ style/dinbrief.el 2013-02-22 17:00:33.501443992 +0000
From 0d7a93744a93e155188e592aad8bcd644da02688 Mon Sep 17 00:00:00 2001
From: Tassilo Horn <tsdh@gnu.org>
Date: Mon, 25 Feb 2013 14:28:34 +0000
Subject: * style/dinbrief.el ("dinbrief"): Update dinbrief style.
(LaTeX-dinbrief-insert): New macro.
(LaTeX-dinbrief-style): New function.
(LaTeX-dinbrief-env-recipient): Rename from
`LaTeX-recipient-hook'.
(LaTeX-dinbrief-sender): New function.
(LaTeX-dinbrief-recipient): New function.
(LaTeX-dinbrief-today): Rename from `LaTeX-today'.
---
(limited to 'style/dinbrief.el')
diff --git a/style/dinbrief.el b/style/dinbrief.el
index 6049434..8a20519 100644
--- a/style/dinbrief.el
+++ b/style/dinbrief.el
@@ -1,93 +1,143 @@
-;;; dinbrief.el - Special code for LaTeX-Style dinbrief.
+;; Copyright (C) 1994, 2013 Free Software Foundation, Inc.
@ -87,7 +104,8 @@
+ "Insert text ignoring active markers."
+ `(progn (if (TeX-mark-active) (TeX-deactivate-mark))
+ (insert ,@args)))
+
-(defun LaTeX-recipient-hook (environment)
+(defun LaTeX-dinbrief-style ()
+ "Insert some useful packages for writing german letters."
+ (save-excursion
@ -109,8 +127,7 @@
+ (TeX-run-style-hooks "inputenc")
+ (TeX-run-style-hooks "fontenc")
+ (TeX-run-style-hooks "ngerman")))
-(defun LaTeX-recipient-hook (environment)
+
+(defun LaTeX-dinbrief-env-recipient (environment)
"Insert ENVIRONMENT and prompt for recipient and address."
- (let ((sender (read-string "Absender: " (user-full-name)))
@ -245,13 +262,13 @@
TeX-grop
(if (zerop (length closing))
(concat TeX-esc " ")
@@ -131,7 +202,47 @@
@@ -131,7 +202,46 @@
TeX-grcl "\n")
(indent-relative-maybe))))
-(defun LaTeX-today nil
+(defun LaTeX-dinbrief-sender nil
+ "Read and writes the senders address"
+(defun LaTeX-dinbrief-sender ()
+ "Read and write the senders address."
+ (interactive)
+ (let ((name (read-string "Absender: " (user-full-name)))
+ (str (read-string "Meine Strasse: "))
@ -277,8 +294,8 @@
+ (newline-and-indent)
+ (concat name ", " str ", " ort)))))
+
+(defun LaTeX-dinbrief-recipient nil
+ "Read and returns the recipient address"
+(defun LaTeX-dinbrief-recipient ()
+ "Read and return the recipient address."
+ (interactive)
+ (let ((str (read-string "Wohnhaft in Strasse: "))
+ (ort (read-string "Aus der Ortschaft: ")))
@ -287,14 +304,13 @@
+ (concat str " " TeX-esc TeX-esc " " ort)
+ str)
+ (if (not (zerop (length ort)))
+ ort))
+ ))
+ ort))))
+
+(defun LaTeX-dinbrief-today nil
+(defun LaTeX-dinbrief-today ()
"Return a string representing todays date according to flavor."
(interactive)
(let ((ctime-string (current-time-string))
@@ -152,12 +263,13 @@
@@ -152,12 +262,13 @@
ctime-string)
(let ((year (substring ctime-string (match-beginning 3) (match-end 3)))
(month (substring ctime-string (match-beginning 1) (match-end 1)))
@ -310,3 +326,5 @@
+ (format "%s, den %s. %s %s" place day month year))))
;;; dinbrief.el ends here
--
cgit v0.9.0.2

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Jun 7 07:25:10 UTC 2013 - werner@suse.de
- Use latest upstream update of dinbrief.el
-------------------------------------------------------------------
Thu Jun 6 10:50:17 UTC 2013 - werner@suse.de