aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-03-15 02:56:30 +0000
committerGlenn Morris2008-03-15 02:56:30 +0000
commita078051c4aa530f410a545187ffe8cc72e71a136 (patch)
treedd9c1fdc221b630bcc6f3bebc2c1b24d92aa1ae9
parent125001e94b712dd9534af562eb1128f4fc18968a (diff)
downloademacs-a078051c4aa530f410a545187ffe8cc72e71a136.tar.gz
emacs-a078051c4aa530f410a545187ffe8cc72e71a136.zip
(cal-tex-hook, cal-tex-insert-preamble, cal-tex-month-name): Doc fix.
(cal-tex-last-blank-p): Use zerop.
-rw-r--r--lisp/calendar/cal-tex.el21
1 files changed, 10 insertions, 11 deletions
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el
index b8d0dcb1634..8fe6eb23deb 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -4,7 +4,7 @@
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Steve Fisk <fisk@bowdoin.edu> 6;; Author: Steve Fisk <fisk@bowdoin.edu>
7;; Edward M. Reingold <reingold@cs.uiuc.edu> 7;; Edward M. Reingold <reingold@cs.uiuc.edu>
8;; Maintainer: Glenn Morris <rgm@gnu.org> 8;; Maintainer: Glenn Morris <rgm@gnu.org>
9;; Keywords: calendar 9;; Keywords: calendar
10;; Human-Keywords: Calendar, LaTeX 10;; Human-Keywords: Calendar, LaTeX
@@ -150,7 +150,7 @@ For example, to include extra packages:
150 150
151(defcustom cal-tex-hook nil 151(defcustom cal-tex-hook nil
152 "List of functions called after any LaTeX calendar buffer is generated. 152 "List of functions called after any LaTeX calendar buffer is generated.
153You can use this to do postprocessing on the buffer. For example, to change 153You can use this to do post-processing on the buffer. For example, to change
154characters with diacritical marks to their LaTeX equivalents, use 154characters with diacritical marks to their LaTeX equivalents, use
155 (add-hook 'cal-tex-hook 155 (add-hook 'cal-tex-hook
156 (lambda () (iso-iso2tex (point-min) (point-max))))" 156 (lambda () (iso-iso2tex (point-min) (point-max))))"
@@ -523,12 +523,11 @@ It shows holiday and diary entries if `cal-tex-holidays' and
523 (setq other-month month 523 (setq other-month month
524 other-year year) 524 other-year year)
525 (cal-tex-insert-days month year diary-list holidays cal-tex-day-prefix) 525 (cal-tex-insert-days month year diary-list holidays cal-tex-day-prefix)
526 (when (= (mod (calendar-absolute-from-gregorian 526 (when (= 6 (mod (calendar-absolute-from-gregorian
527 (list month 527 (list month
528 (calendar-last-day-of-month month year) 528 (calendar-last-day-of-month month year)
529 year)) 529 year))
530 7) 530 7)) ; last day of month was Saturday
531 6) ; last day of month was Saturday
532 (cal-tex-hfill) 531 (cal-tex-hfill)
533 (cal-tex-nl)) 532 (cal-tex-nl))
534 (increment-calendar-month month year 1)) 533 (increment-calendar-month month year 1))
@@ -637,7 +636,7 @@ in the calendar starting in MONTH YEAR."
637 (let ((last-day (calendar-last-day-of-month month year)) 636 (let ((last-day (calendar-last-day-of-month month year))
638 any-days the-sunday) ; the day of week of last Sunday 637 any-days the-sunday) ; the day of week of last Sunday
639 (calendar-for-loop i from (- last-day 6) to last-day do 638 (calendar-for-loop i from (- last-day 6) to last-day do
640 (if (= 0 (calendar-day-of-week (list month i year))) 639 (if (zerop (calendar-day-of-week (list month i year)))
641 (setq the-sunday i))) 640 (setq the-sunday i)))
642 (calendar-for-loop i from the-sunday to last-day do 641 (calendar-for-loop i from the-sunday to last-day do
643 (if (memq (calendar-day-of-week (list month i year)) 642 (if (memq (calendar-day-of-week (list month i year))
@@ -1579,7 +1578,7 @@ informative header, and run HOOK."
1579 "Initialize the output LaTeX calendar buffer, `cal-tex-buffer'. 1578 "Initialize the output LaTeX calendar buffer, `cal-tex-buffer'.
1580Select the output buffer, and insert the preamble for a calendar 1579Select the output buffer, and insert the preamble for a calendar
1581of WEEKS weeks. Insert code for landscape mode if LANDSCAPE is 1580of WEEKS weeks. Insert code for landscape mode if LANDSCAPE is
1582non-nil. Use pointsize SIZE. Optional argument APPEND, if 1581non-nil. Use point-size SIZE. Optional argument APPEND, if
1583non-nil, means add to end of buffer without erasing current contents." 1582non-nil, means add to end of buffer without erasing current contents."
1584 (let ((width "18cm") 1583 (let ((width "18cm")
1585 (height "24cm")) 1584 (height "24cm"))
@@ -1645,7 +1644,7 @@ non-nil, means add to end of buffer without erasing current contents."
1645 head))) 1644 head)))
1646 1645
1647(defun cal-tex-month-name (month) 1646(defun cal-tex-month-name (month)
1648 "The name of MONTH, LaTeXified." 1647 "The name of MONTH, LaTeX-ified."
1649 (cal-tex-LaTeXify-string (calendar-month-name month))) 1648 (cal-tex-LaTeXify-string (calendar-month-name month)))
1650 1649
1651(defun cal-tex-hfill () 1650(defun cal-tex-hfill ()