aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-08-20 23:50:55 -0700
committerGlenn Morris2012-08-20 23:50:55 -0700
commitb2403709bbae878659c5ddf321862a734bfb0953 (patch)
tree3ce6cc4f6ca039bc8721aba45a9ac57c15141137
parent1cebb5c0e43f3d279d4050ecfd00e885de015f4d (diff)
downloademacs-b2403709bbae878659c5ddf321862a734bfb0953.tar.gz
emacs-b2403709bbae878659c5ddf321862a734bfb0953.zip
Use cal-tex-* functions more
* lisp/calendar/cal-tex.el (cal-tex-cursor-filofax-year): Use cal-tex-vspace. (cal-tex-vspace, cal-tex-hspace, cal-tex-em, cal-tex-bf) (cal-tex-Huge-bf, cal-tex-large-bf): Use cal-tex-cmd.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/calendar/cal-tex.el18
2 files changed, 13 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6c158945705..d0595f108cf 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
12012-08-21 Glenn Morris <rgm@gnu.org> 12012-08-21 Glenn Morris <rgm@gnu.org>
2 2
3 * calendar/cal-tex.el (cal-tex-cursor-filofax-year):
4 Use cal-tex-vspace.
5 (cal-tex-vspace, cal-tex-hspace, cal-tex-em, cal-tex-bf)
6 (cal-tex-Huge-bf, cal-tex-large-bf): Use cal-tex-cmd.
7
3 * calendar/cal-tex.el (cal-tex-cursor-filofax-year) 8 * calendar/cal-tex.el (cal-tex-cursor-filofax-year)
4 (cal-tex-cursor-week, cal-tex-cursor-week2) 9 (cal-tex-cursor-week, cal-tex-cursor-week2)
5 (cal-tex-cursor-week-iso, cal-tex-cursor-week-at-a-glance) 10 (cal-tex-cursor-week-iso, cal-tex-cursor-week-at-a-glance)
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el
index b0facb07d4e..326deef69ba 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -377,7 +377,7 @@ Optional EVENT indicates a buffer position to use instead of point."
377 (cal-tex-cmd "\\fboxsep 0.5mm") 377 (cal-tex-cmd "\\fboxsep 0.5mm")
378 (cal-tex-cmd "\\pagestyle" "empty") 378 (cal-tex-cmd "\\pagestyle" "empty")
379 (cal-tex-b-document) 379 (cal-tex-b-document)
380 (cal-tex-cmd "\\vspace*" "0.25in") 380 (cal-tex-vspace "0.25in")
381 (dotimes (j n) 381 (dotimes (j n)
382 (insert (format "\\hfil \\textbf{\\Large %s} \\hfil\\\\\n" year)) 382 (insert (format "\\hfil \\textbf{\\Large %s} \\hfil\\\\\n" year))
383 (cal-tex-b-center) 383 (cal-tex-b-center)
@@ -405,7 +405,7 @@ Optional EVENT indicates a buffer position to use instead of point."
405 (if (= j (1- n)) 405 (if (= j (1- n))
406 (cal-tex-end-document) 406 (cal-tex-end-document)
407 (cal-tex-newpage) 407 (cal-tex-newpage)
408 (cal-tex-cmd "\\vspace*" "0.25in")) 408 (cal-tex-vspace "0.25in"))
409 (run-hooks 'cal-tex-year-hook)) 409 (run-hooks 'cal-tex-year-hook))
410 (run-hooks 'cal-tex-hook))) 410 (run-hooks 'cal-tex-hook)))
411 411
@@ -1809,13 +1809,11 @@ non-nil, means add to end of buffer without erasing current contents."
1809 1809
1810(defun cal-tex-vspace (space) 1810(defun cal-tex-vspace (space)
1811 "Insert vspace command to move SPACE vertically." 1811 "Insert vspace command to move SPACE vertically."
1812 (insert "\\vspace*{" space "}") 1812 (cal-tex-cmd "\\vspace*" space))
1813 (cal-tex-comment))
1814 1813
1815(defun cal-tex-hspace (space) 1814(defun cal-tex-hspace (space)
1816 "Insert hspace command to move SPACE horizontally." 1815 "Insert hspace command to move SPACE horizontally."
1817 (insert "\\hspace*{" space "}") 1816 (cal-tex-cmd "\\hspace*" space))
1818 (cal-tex-comment))
1819 1817
1820(defun cal-tex-comment (&optional comment) 1818(defun cal-tex-comment (&optional comment)
1821 "Insert `% ', followed by optional string COMMENT, followed by newline. 1819 "Insert `% ', followed by optional string COMMENT, followed by newline.
@@ -1922,11 +1920,11 @@ Add trailing COMMENT if present."
1922 1920
1923(defun cal-tex-em (string) 1921(defun cal-tex-em (string)
1924 "Insert STRING in italic font." 1922 "Insert STRING in italic font."
1925 (insert "\\textit{" string "}")) 1923 (cal-tex-cmd "\\textit" string))
1926 1924
1927(defun cal-tex-bf (string) 1925(defun cal-tex-bf (string)
1928 "Insert STRING in bf font." 1926 "Insert STRING in bf font."
1929 (insert "\\textbf{ " string "}")) 1927 (cal-tex-cmd "\\textbf" string))
1930 1928
1931(defun cal-tex-scriptsize (string) 1929(defun cal-tex-scriptsize (string)
1932 "Insert STRING in scriptsize font." 1930 "Insert STRING in scriptsize font."
@@ -1942,7 +1940,7 @@ Add trailing COMMENT if present."
1942 1940
1943(defun cal-tex-Huge-bf (string) 1941(defun cal-tex-Huge-bf (string)
1944 "Insert STRING in Huge bf font." 1942 "Insert STRING in Huge bf font."
1945 (insert "\\textbf{\\Huge " string "}")) 1943 (cal-tex-cmd "\\textbf" (concat "\\Huge " string)))
1946 1944
1947(defun cal-tex-large (string) 1945(defun cal-tex-large (string)
1948 "Insert STRING in large font." 1946 "Insert STRING in large font."
@@ -1950,7 +1948,7 @@ Add trailing COMMENT if present."
1950 1948
1951(defun cal-tex-large-bf (string) 1949(defun cal-tex-large-bf (string)
1952 "Insert STRING in large bf font." 1950 "Insert STRING in large bf font."
1953 (insert "\\textbf{\\large " string "}")) 1951 (cal-tex-cmd "\\textbf" (concat "\\large " string)))
1954 1952
1955 1953
1956(provide 'cal-tex) 1954(provide 'cal-tex)