Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Backports:SLE-15-SP6
emacs-auctex
dinbrief.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File dinbrief.patch of Package emacs-auctex
Update dinbrief class Nowadays UTF-8 is standard, also port the features of the letter class to dinbrief class. --- style/dinbrief.el | 79 ++++++++++++++++++++++++++++++------------------------ 1 file changed, 44 insertions(+), 35 deletions(-) --- style/dinbrief.el +++ style/dinbrief.el 2024-05-08 06:26:44.205919807 +0000 @@ -1,6 +1,6 @@ ;;; dinbrief.el --- Special code for LaTeX-Style dinbrief. -*- lexical-binding: t; -*- -;; Copyright (C) 1994-2021 Free Software Foundation, Inc. +;; Copyright (C) 1994-2023 Free Software Foundation, Inc. ;; Author: Werner Fink <werner@suse.de> ;; Maintainer: auctex-devel@gnu.org @@ -32,14 +32,26 @@ (require 'tex) (require 'latex) +;; Silence the compiler: +(declare-function font-latex-add-keywords + "font-latex" + (keywords class)) + +(defvar LaTeX-dinbrief-class-options + '("10pt" "11pt" "12pt" "norm" "a4paper" "a5paper" "b5paper" + "letterpaper" "legalpaper" "executivepaper" "twoside" + "addresshigh" "addressstd" "onecolumn" "twocolumn") + "Package options for the letter class.") + (TeX-add-style-hook "dinbrief" (lambda () - (add-hook 'LaTeX-document-style-hook - #'LaTeX-dinbrief-style) (LaTeX-add-environments '("letter" LaTeX-dinbrief-env-recipient) "dinquote") + (add-hook 'LaTeX-document-style-hook + #'LaTeX-dinbrief-style) + (setq LaTeX-default-document-environment "letter") (TeX-add-symbols '("address" "Absender") '("postremark" "Postvermerk") @@ -61,7 +73,22 @@ '("backaddress" "Retouradresse") '("signature" "Unterschrift") '("opening" "Anrede") - '("closing" "Schluss"))) + '("closing" "Schluss")) + + ;; Fontification + (when (and (featurep 'font-latex) + (eq TeX-install-font-lock 'font-latex-setup)) + (font-latex-add-keywords '(("subject" "{") + ("address" "{") + ("signature" "{") + ("opening" "{") + ("closing" "{") + ("location" "{") + ("handling" "{") + ("cc" "{") + ("encl" "{") + ("ps" "{")) + 'function))) TeX-dialect) (defmacro LaTeX-dinbrief-insert (&rest args) @@ -71,28 +98,15 @@ (defun LaTeX-dinbrief-style () "Insert some useful packages for writing german letters." - ;; COMPATIBILITY for EMACS<26 - (let ((func (if (fboundp 'indent-relative-first-indent-point) - #'indent-relative-first-indent-point - ;; Stay away from using #' to avoid compiler warning. - 'indent-relative-maybe))) - (save-excursion - (goto-char (point-min)) ; insert before \begin{document} - (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-optop "latin1,utf8" LaTeX-optcl - TeX-grop "inputenc" TeX-grcl) - (newline-and-indent) - (LaTeX-dinbrief-insert TeX-esc "usepackage" - LaTeX-optop "T1" LaTeX-optcl - TeX-grop "fontenc" TeX-grcl) - (funcall func) - (LaTeX-dinbrief-insert TeX-esc "usepackage" - TeX-grop "ngerman" TeX-grcl)) - (TeX-run-style-hooks "inputenc" "fontenc" "ngerman"))) + (save-excursion + (goto-char (point-min)) ; insert before \begin{document} + (if (re-search-forward ".begin.document." (point-max) t) + (beginning-of-line 1)) + (open-line 2) + (indent-relative-first-indent-point) + (LaTeX-dinbrief-insert TeX-esc "usepackage" + TeX-grop "ngerman" TeX-grcl)) + (TeX-run-style-hooks "ngerman")) (defun LaTeX-dinbrief-env-recipient (environment) "Insert ENVIRONMENT and prompt for recipient and address." @@ -108,12 +122,7 @@ (opening (TeX-read-string "Anrede: ")) (closing (TeX-read-string "Schluss: ")) (signature (TeX-read-string "Unterschrift: ")) - (anlage (TeX-read-string "Anlagen: ")) - ;; COMPATIBILITY for EMACS<26 - (func (if (fboundp 'indent-relative-first-indent-point) - #'indent-relative-first-indent-point - ;; Stay away from using #' to avoid compiler warning. - 'indent-relative-maybe))) + (anlage (TeX-read-string "Anlagen: "))) (if (string= fenster "ja") (progn (LaTeX-dinbrief-insert TeX-esc "enabledraftstandard") @@ -201,7 +210,7 @@ opening) TeX-grcl "\n") - (funcall func) + (indent-relative-first-indent-point) (save-excursion (LaTeX-dinbrief-insert "\n" TeX-esc "closing" TeX-grop @@ -209,7 +218,7 @@ (concat TeX-esc " ") closing) TeX-grcl "\n") - (funcall func)))) + (indent-relative-first-indent-point)))) (defun LaTeX-dinbrief-sender () "Read and write the senders address." @@ -256,7 +265,7 @@ (let ((ctime-string (current-time-string)) (month-alist '(("Jan" . "Januar") ("Feb" . "Februar") - ("Mar" . "M\\\"arz") + ("Mar" . "März") ("Apr" . "April") ("May" . "Mai") ("Jun" . "Juni")
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor