aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-08-21 20:39:44 -0400
committerGlenn Morris2012-08-21 20:39:44 -0400
commitda485f5e6b5fd38d202a0f6682f6fec28963cf1e (patch)
tree6a09f0be0dbdaeaafbbad6471b96f511ef63a964
parentfce31d69dc4d6ff8810d499deebe568437fbf38b (diff)
downloademacs-da485f5e6b5fd38d202a0f6682f6fec28963cf1e.tar.gz
emacs-da485f5e6b5fd38d202a0f6682f6fec28963cf1e.zip
Combine two cal-tex functions
* lisp/calendar/cal-tex.el (cal-tex-longday): New function, replacing... (cal-tex-leftday, cal-tex-rightday): Remove functions. (cal-tex-weekly-common, cal-tex-cursor-filofax-2week): Update for above change.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/calendar/cal-tex.el46
2 files changed, 27 insertions, 26 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index c3e1ae374a0..748fab9dbe0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
12012-08-22 Glenn Morris <rgm@gnu.org>
2
3 * calendar/cal-tex.el (cal-tex-longday): New function, replacing...
4 (cal-tex-leftday, cal-tex-rightday): Remove functions.
5 (cal-tex-weekly-common, cal-tex-cursor-filofax-2week):
6 Update for above change.
7
12012-08-21 Andreas Schwab <schwab@linux-m68k.org> 82012-08-21 Andreas Schwab <schwab@linux-m68k.org>
2 9
3 * cus-face.el (custom-face-attributes): Fix customize type for the 10 * cus-face.el (custom-face-attributes): Fix customize type for the
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el
index 5891693282f..d8d2a09c871 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -371,27 +371,21 @@ landscape mode with three rows of four months each."
371\\footskip 0.125in 371\\footskip 0.125in
372"))) 372")))
373 373
374(defun cal-tex-leftday (height) 374(defun cal-tex-longday (funcname height)
375 "Insert LaTeX code for leftday function." 375 "Insert LaTeX code for a long day function."
376 (insert "\\long\\def\\leftday#1#2#3#4#5{% 376 (insert "\\long\\def\\" funcname "#1#2#3#4#5{%
377 \\rule{\\textwidth}{0.3pt}\\\\% 377 \\rule{\\textwidth}{0.3pt}\\\\%
378 \\hbox to \\textwidth{% 378 \\hbox to \\textwidth{%
379 \\vbox to " height "{% 379 \\vbox to " height "{%
380 \\vspace*{2pt}% 380 \\vspace*{2pt}%
381 \\hbox to \\textwidth{\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}% 381 \\hbox to \\textwidth{"
382 \\hbox to \\textwidth{\\vbox {\\noindent \\footnotesize \\em #4}}% 382 (if (string-equal funcname "leftday")
383 \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}\n")) 383 "\\noindent {\\normalsize \\bf #2} \\small #1 \\hfill #5}%\n"
384 384 "\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%\n")
385(defun cal-tex-rightday (height &optional funcname) 385 " \\hbox to \\textwidth{\\vbox {\\"
386 "Insert LaTeX code for rightday function." 386 (if (string-equal funcname "leftday") "noindent" "raggedleft")
387 (insert "\\long\\def\\" (or funcname "rightday") "#1#2#3#4#5{% 387 " \\footnotesize \\em #4}}%
388 \\rule{\\textwidth}{0.3pt}\\\\% 388 \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}\n"))
389 \\hbox to \\textwidth{%
390 \\vbox to " height "{%
391 \\vspace*{2pt}%
392 \\hbox to \\textwidth{\\small #5 \\hfill #1 {\\normalsize \\bf #2}}%
393 \\hbox to \\textwidth{\\vbox {\\raggedleft \\footnotesize \\em #4}}%
394 \\hbox to \\textwidth{\\vbox to 0pt {\\noindent \\footnotesize #3}}}}\\\\}\n"))
395 389
396(defun cal-tex-shortday (funcname) 390(defun cal-tex-shortday (funcname)
397 "Insert LaTeX code for a short day function." 391 "Insert LaTeX code for a short day function."
@@ -1082,10 +1076,10 @@ shown are hard-coded to 8-12, 13-17."
1082 (cal-tex-preamble "twoside") 1076 (cal-tex-preamble "twoside")
1083 (cal-tex-filofax-paper) 1077 (cal-tex-filofax-paper)
1084 (insert cal-tex-righthead) 1078 (insert cal-tex-righthead)
1085 (cal-tex-rightday "1.85in") 1079 (cal-tex-longday "rightday" "1.85in")
1086 (cal-tex-rightday "0.8in" "weekend") 1080 (cal-tex-longday "weekend" "0.8in")
1087 (insert cal-tex-lefthead) 1081 (insert cal-tex-lefthead)
1088 (cal-tex-leftday "1.85in")) 1082 (cal-tex-longday "leftday" "1.85in"))
1089 (cal-tex-preamble "twoside,12pt") 1083 (cal-tex-preamble "twoside,12pt")
1090 (insert "\\textwidth 7in 1084 (insert "\\textwidth 7in
1091\\textheight 10.5in 1085\\textheight 10.5in
@@ -1097,10 +1091,10 @@ shown are hard-coded to 8-12, 13-17."
1097\\footskip .125in 1091\\footskip .125in
1098") 1092")
1099 (insert cal-tex-righthead) 1093 (insert cal-tex-righthead)
1100 (cal-tex-rightday "2.75in") 1094 (cal-tex-longday "rightday" "2.75in")
1101 (cal-tex-rightday "1.8in" "weekend") 1095 (cal-tex-longday "weekend" "1.8in")
1102 (insert cal-tex-lefthead) 1096 (insert cal-tex-lefthead)
1103 (cal-tex-leftday "2.75in")) 1097 (cal-tex-longday "leftday" "2.75in"))
1104 (cal-tex-b-document) 1098 (cal-tex-b-document)
1105 (cal-tex-cmd "\\pagestyle" "empty") 1099 (cal-tex-cmd "\\pagestyle" "empty")
1106 (dotimes (i n) 1100 (dotimes (i n)
@@ -1241,9 +1235,9 @@ Optional EVENT indicates a buffer position to use instead of point."
1241 (cal-tex-preamble "twoside") 1235 (cal-tex-preamble "twoside")
1242 (cal-tex-filofax-paper) 1236 (cal-tex-filofax-paper)
1243 (insert cal-tex-righthead) 1237 (insert cal-tex-righthead)
1244 (cal-tex-rightday "0.7in") 1238 (cal-tex-longday "rightday" "0.7in")
1245 (insert cal-tex-lefthead) 1239 (insert cal-tex-lefthead)
1246 (cal-tex-leftday "0.7in") 1240 (cal-tex-longday "leftday" "0.7in")
1247 (cal-tex-b-document) 1241 (cal-tex-b-document)
1248 (cal-tex-cmd "\\pagestyle" "empty") 1242 (cal-tex-cmd "\\pagestyle" "empty")
1249 (dotimes (i n) 1243 (dotimes (i n)