"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "style/letter.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.

letter.el  (auctex-12.2):letter.el  (auctex-12.3)
;;; letter.el - Special code for letter style. ;;; letter.el - Special code for letter style.
;; Copyright (C) 1993, 2012, 2013, 2014, 2018 Free Software Foundation, Inc. ;; Copyright (C) 1993, 2012, 2013, 2014, 2018, 2020 Free Software Foundation, In c.
;; Author: Per Abrahamsen <abraham@dina.kvl.dk> ;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
;; 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 52 skipping to change at line 52
"Initial value when prompting for a sender address in the letter style.") "Initial value when prompting for a sender address in the letter style.")
(TeX-add-style-hook (TeX-add-style-hook
"letter" "letter"
(lambda () (lambda ()
(LaTeX-add-environments (LaTeX-add-environments
'("letter" LaTeX-env-recipient)) '("letter" LaTeX-env-recipient))
(LaTeX-add-pagestyles "headings" "firstpage") (LaTeX-add-pagestyles "headings" "firstpage")
(setq LaTeX-default-document-environment "letter") (setq LaTeX-default-document-environment "letter")
(TeX-add-symbols (TeX-add-symbols
'("name" "Sender: ") '("name" "Sender")
'("address" "Sender address: ") '("address" "Sender address")
'("signature" "Signature: ") '("signature" "Signature")
'("opening" "Opening: ") '("opening" "Opening")
'("closing" "Closing: ") '("closing" "Closing")
"location" "location"
"telephone" "telephone"
"makelabels" "makelabels"
"stopbreaks" "stopbreaks"
"startbreaks" "startbreaks"
"cc" "cc"
"encl" "encl"
"ps" "ps"
"stopletter" "stopletter"
"returnaddress" "returnaddress"
skipping to change at line 95 skipping to change at line 95
("cc" "{") ("cc" "{")
("encl" "{") ("encl" "{")
("ps" "{")) ("ps" "{"))
'function))) 'function)))
LaTeX-dialect) LaTeX-dialect)
(defun LaTeX-env-recipient (environment) (defun LaTeX-env-recipient (environment)
"Insert ENVIRONMENT and prompt for recipient and address." "Insert ENVIRONMENT and prompt for recipient and address."
(let ((sender (TeX-read-string "Sender: " (user-full-name))) (let ((sender (TeX-read-string "Sender: " (user-full-name)))
(sender-address (TeX-read-string "Sender address: " (sender-address (TeX-read-string "Sender address: "
LaTeX-letter-sender-address)) LaTeX-letter-sender-address))
(recipient (TeX-read-string "Recipient: ")) (recipient (TeX-read-string "Recipient: "))
(address (TeX-read-string "Recipient address: ")) (address (TeX-read-string "Recipient address: "))
(signature (TeX-read-string "Signature: ")) (signature (TeX-read-string "Signature: "))
(opening (TeX-read-string "Opening: ")) (opening (TeX-read-string "Opening: "))
(closing (TeX-read-string "Closing: ")) (closing (TeX-read-string "Closing: "))
(date (TeX-read-string "Date: " (LaTeX-today)))) (date (TeX-read-string "Date: " (LaTeX-today)))
(func (if (fboundp 'indent-relative-first-indent-point)
'indent-relative-first-indent-point
'indent-relative-maybe)))
(insert TeX-esc "name" TeX-grop sender TeX-grcl) (insert TeX-esc "name" TeX-grop sender TeX-grcl)
(newline-and-indent) (newline-and-indent)
(if (not (zerop (length sender-address))) (if (not (zerop (length sender-address)))
(progn (progn
(setq LaTeX-letter-sender-address sender-address) (setq LaTeX-letter-sender-address sender-address)
(insert TeX-esc "address" TeX-grop sender-address TeX-grcl) (insert TeX-esc "address" TeX-grop sender-address TeX-grcl)
(newline-and-indent))) (newline-and-indent)))
(if (not (zerop (length signature))) (if (not (zerop (length signature)))
(progn (progn
skipping to change at line 151 skipping to change at line 154
(indent-to addr-column)))))))) (indent-to addr-column))))))))
(insert "\n") (insert "\n")
(indent-to indentation)) (indent-to indentation))
(insert TeX-esc "opening" (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
(insert "\n" TeX-esc "closing" (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-today nil (defun LaTeX-today nil
"Return a string representing todays date according to flavor." "Return a string representing todays date according to flavor."
(interactive) (interactive)
(let ((ctime-string (current-time-string)) (let ((ctime-string (current-time-string))
(month-alist '(("Jan". "01") (month-alist '(("Jan". "01")
("Feb" . "02") ("Feb" . "02")
("Mar" . "03") ("Mar" . "03")
("Apr" . "04") ("Apr" . "04")
("May" . "05") ("May" . "05")
 End of changes. 6 change blocks. 
10 lines changed or deleted 13 lines changed or added

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