aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-10-06 11:34:23 -0700
committerGlenn Morris2012-10-06 11:34:23 -0700
commitf1f4dba09f9c42fc61c5bb3bf4f1e7214a2513ca (patch)
tree139f505f3ca04d24e8bc20759aaa0ced748e366f
parent685f87b00f477c8072bcd15818d9564e7b7d8808 (diff)
downloademacs-f1f4dba09f9c42fc61c5bb3bf4f1e7214a2513ca.tar.gz
emacs-f1f4dba09f9c42fc61c5bb3bf4f1e7214a2513ca.zip
Rename a new cal-tex function, document it
* lisp/calendar/cal-tex.el (cal-tex-diary, cal-tex-cursor-week) (cal-tex-cursor-week2, cal-tex-cursor-week-iso) (cal-tex-cursor-week-monday): Doc fixes. (cal-tex-cursor-week2-summary): Doc fix. Rename from cal-tex-cursor-week-at-a-glance. * lisp/calendar/calendar.el (calendar-mode-map): Add cal-tex-cursor-week2-summary. * lisp/calendar/cal-menu.el (cal-menu-context-mouse-menu): Tweak week descriptions. Add cal-tex-cursor-week2-summary. * doc/emacs/calendar.texi (Writing Calendar Files): Tweak week descriptions. Mention cal-tex-cursor-week2-summary.
-rw-r--r--doc/emacs/ChangeLog5
-rw-r--r--doc/emacs/calendar.texi11
-rw-r--r--etc/NEWS3
-rw-r--r--lisp/ChangeLog14
-rw-r--r--lisp/calendar/cal-menu.el9
-rw-r--r--lisp/calendar/cal-tex.el81
-rw-r--r--lisp/calendar/calendar.el5
7 files changed, 85 insertions, 43 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 60b3bf234f7..067574b9a0d 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,8 @@
12012-10-06 Glenn Morris <rgm@gnu.org>
2
3 * calendar.texi (Writing Calendar Files): Tweak week descriptions.
4 Mention cal-tex-cursor-week2-summary.
5
12012-10-06 Chong Yidong <cyd@gnu.org> 62012-10-06 Chong Yidong <cyd@gnu.org>
2 7
3 * mini.texi (Passwords): Fix typo. 8 * mini.texi (Passwords): Fix typo.
diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi
index fdf1c65fcd6..d46e26cddcf 100644
--- a/doc/emacs/calendar.texi
+++ b/doc/emacs/calendar.texi
@@ -396,17 +396,20 @@ Generate a sideways-printing one-month calendar
396Generate a one-day calendar 396Generate a one-day calendar
397(@code{cal-tex-cursor-day}). 397(@code{cal-tex-cursor-day}).
398@item t w 1 398@item t w 1
399Generate a one-page calendar for one week 399Generate a one-page calendar for one week, with hours
400(@code{cal-tex-cursor-week}). 400(@code{cal-tex-cursor-week}).
401@item t w 2 401@item t w 2
402Generate a two-page calendar for one week 402Generate a two-page calendar for one week, with hours
403(@code{cal-tex-cursor-week2}). 403(@code{cal-tex-cursor-week2}).
404@item t w 3 404@item t w 3
405Generate an ISO-style calendar for one week 405Generate an ISO-style calendar for one week, without hours
406(@code{cal-tex-cursor-week-iso}). 406(@code{cal-tex-cursor-week-iso}).
407@item t w 4 407@item t w 4
408Generate a calendar for one Monday-starting week 408Generate a calendar for one Monday-starting week, with hours
409(@code{cal-tex-cursor-week-monday}). 409(@code{cal-tex-cursor-week-monday}).
410@item t w W
411Generate a two-page calendar for one week, without hours
412(@code{cal-tex-cursor-week2-summary}).
410@item t f w 413@item t f w
411Generate a Filofax-style two-weeks-at-a-glance calendar 414Generate a Filofax-style two-weeks-at-a-glance calendar
412(@code{cal-tex-cursor-filofax-2week}). 415(@code{cal-tex-cursor-filofax-2week}).
diff --git a/etc/NEWS b/etc/NEWS
index be75b665c1d..e4086bf038e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -281,6 +281,9 @@ Use `Buffer-menu-name-width' and `Buffer-menu-size-width' instead.
281*** You can customize the header text that appears above each calendar month. 281*** You can customize the header text that appears above each calendar month.
282See the variable `calendar-month-header'. 282See the variable `calendar-month-header'.
283 283
284+++
285*** New LaTeX calendar style, produced by `cal-tex-cursor-week2-summary'.
286
284*** The calendars produced by cal-html include holidays. 287*** The calendars produced by cal-html include holidays.
285Customize cal-html-holidays to change this. 288Customize cal-html-holidays to change this.
286 289
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e4597b072fb..42835b59a26 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,17 @@
12012-10-06 Glenn Morris <rgm@gnu.org>
2
3 * calendar/cal-tex.el (cal-tex-diary, cal-tex-cursor-week)
4 (cal-tex-cursor-week2, cal-tex-cursor-week-iso)
5 (cal-tex-cursor-week-monday): Doc fixes.
6 (cal-tex-cursor-week2-summary): Doc fix.
7 Rename from cal-tex-cursor-week-at-a-glance.
8
9 * calendar/cal-menu.el (cal-menu-context-mouse-menu):
10 Tweak week descriptions. Add cal-tex-cursor-week2-summary.
11
12 * calendar/calendar.el (calendar-mode-map):
13 Add cal-tex-cursor-week2-summary.
14
12012-10-06 Stefan Monnier <monnier@iro.umontreal.ca> 152012-10-06 Stefan Monnier <monnier@iro.umontreal.ca>
2 16
3 * emacs-lisp/cl-macs.el (cl-defstruct): Improve docstring. 17 * emacs-lisp/cl-macs.el (cl-defstruct): Improve docstring.
diff --git a/lisp/calendar/cal-menu.el b/lisp/calendar/cal-menu.el
index d4546125f3e..52c82b661e8 100644
--- a/lisp/calendar/cal-menu.el
+++ b/lisp/calendar/cal-menu.el
@@ -237,10 +237,11 @@ is non-nil."
237 ;; These did not work if called without calendar window selected. 237 ;; These did not work if called without calendar window selected.
238 ("Prepare LaTeX buffer" 238 ("Prepare LaTeX buffer"
239 ["Daily (1 page)" cal-tex-cursor-day] 239 ["Daily (1 page)" cal-tex-cursor-day]
240 ["Weekly (1 page)" cal-tex-cursor-week] 240 ["Weekly (1 page, with hours)" cal-tex-cursor-week]
241 ["Weekly (2 pages)" cal-tex-cursor-week2] 241 ["Weekly (2 pages, with hours)" cal-tex-cursor-week2]
242 ["Weekly (other style; 1 page)" cal-tex-cursor-week-iso] 242 ["Weekly (1 page, no hours)" cal-tex-cursor-week-iso]
243 ["Weekly (yet another style; 1 page)" cal-tex-cursor-week-monday] 243 ["Weekly (1 page, with hours, different style)" cal-tex-cursor-week-monday]
244 ["Weekly (2 pages, no hours)" cal-tex-cursor-week2-summary]
244 ["Monthly" cal-tex-cursor-month] 245 ["Monthly" cal-tex-cursor-month]
245 ["Monthly (landscape)" cal-tex-cursor-month-landscape] 246 ["Monthly (landscape)" cal-tex-cursor-month-landscape]
246 ["Yearly" cal-tex-cursor-year] 247 ["Yearly" cal-tex-cursor-year]
diff --git a/lisp/calendar/cal-tex.el b/lisp/calendar/cal-tex.el
index 325ac3e8146..e4c2765940a 100644
--- a/lisp/calendar/cal-tex.el
+++ b/lisp/calendar/cal-tex.el
@@ -37,6 +37,7 @@
37;; cal-tex-cursor-month 37;; cal-tex-cursor-month
38;; cal-tex-cursor-week 38;; cal-tex-cursor-week
39;; cal-tex-cursor-week2 39;; cal-tex-cursor-week2
40;; cal-tex-cursor-week2-summary
40;; cal-tex-cursor-week-iso 41;; cal-tex-cursor-week-iso
41;; cal-tex-cursor-week-monday 42;; cal-tex-cursor-week-monday
42;; cal-tex-cursor-filofax-2week 43;; cal-tex-cursor-filofax-2week
@@ -82,8 +83,6 @@ Setting this to nil may speed up calendar generation."
82 83
83(defcustom cal-tex-diary nil 84(defcustom cal-tex-diary nil
84 "Non-nil means diary entries are printed in LaTeX calendars that support it. 85 "Non-nil means diary entries are printed in LaTeX calendars that support it.
85At present, this only affects the monthly, filofax, and iso-week
86calendars (i.e. not the yearly, plain weekly, or daily calendars).
87Setting this to nil may speed up calendar generation." 86Setting this to nil may speed up calendar generation."
88 :type 'boolean 87 :type 'boolean
89 :group 'calendar-tex) 88 :group 'calendar-tex)
@@ -717,11 +716,15 @@ this is only an upper bound."
717;; TODO respect cal-tex-daily-start,end (see cal-tex-week-hours). 716;; TODO respect cal-tex-daily-start,end (see cal-tex-week-hours).
718;;;###cal-autoload 717;;;###cal-autoload
719(defun cal-tex-cursor-week (&optional n event) 718(defun cal-tex-cursor-week (&optional n event)
720 "Make a LaTeX calendar buffer for a two-page one-week calendar. 719 "Make a one page LaTeX calendar for one week, showing hours of the day.
721It applies to the week that point is in. The optional prefix 720There are two columns; with 8-12am in the first and 1-5pm in the second.
722argument N specifies number of weeks (default 1). The calendar 721It shows holidays if `cal-tex-holidays' is non-nil.
723shows holidays if `cal-tex-holidays' is non-nil (note that diary 722It does not show diary entries.
724entries are not shown). The calendar shows the hours 8-12am, 1-5pm." 723
724The optional prefix argument N specifies a number of weeks (default 1).
725
726By default, the calendar is for the week at point; the optional
727argument EVENT specifies a different buffer position."
725 (interactive (list (prefix-numeric-value current-prefix-arg) 728 (interactive (list (prefix-numeric-value current-prefix-arg)
726 last-nonmenu-event)) 729 last-nonmenu-event))
727 (or n (setq n 1)) 730 (or n (setq n 1))
@@ -768,12 +771,15 @@ entries are not shown). The calendar shows the hours 8-12am, 1-5pm."
768;; TODO respect cal-tex-daily-start,end (see cal-tex-week-hours). 771;; TODO respect cal-tex-daily-start,end (see cal-tex-week-hours).
769;;;###cal-autoload 772;;;###cal-autoload
770(defun cal-tex-cursor-week2 (&optional n event) 773(defun cal-tex-cursor-week2 (&optional n event)
771 "Make a LaTeX calendar buffer for a two-page one-week calendar. 774 "Make a two page LaTeX calendar for one week, showing hours of the day.
772It applies to the week that point is in. Optional prefix 775There are two columns; with 8-12am in the first and 1-5pm in the second.
773argument N specifies number of weeks (default 1). The calendar 776It shows holidays if `cal-tex-holidays' is non-nil.
774shows holidays if `cal-tex-holidays' is non-nil (note that diary 777It does not show diary entries.
775entries are not shown). The calendar shows the hours 8-12am, 1-5pm. 778
776Optional EVENT indicates a buffer position to use instead of point." 779The optional prefix argument N specifies a number of weeks (default 1).
780
781By default, the calendar is for the week at point; the optional
782argument EVENT specifies a different buffer position."
777 (interactive (list (prefix-numeric-value current-prefix-arg) 783 (interactive (list (prefix-numeric-value current-prefix-arg)
778 last-nonmenu-event)) 784 last-nonmenu-event))
779 (or n (setq n 1)) 785 (or n (setq n 1))
@@ -848,12 +854,15 @@ Optional EVENT indicates a buffer position to use instead of point."
848 854
849;;;###cal-autoload 855;;;###cal-autoload
850(defun cal-tex-cursor-week-iso (&optional n event) 856(defun cal-tex-cursor-week-iso (&optional n event)
851 "Make a LaTeX calendar buffer for a one page ISO-style weekly calendar. 857 "Make a one page LaTeX calendar for one week, in the ISO-style.
852Optional prefix argument N specifies number of weeks (default 1). 858It does not show hours of the day.
853The calendar shows holiday and diary entries if 859It shows holidays if `cal-tex-holidays' is non-nil.
854`cal-tex-holidays' and `cal-tex-diary', respectively, are non-nil. 860It shows diary entries if `cal-tex-diary' is non-nil.
855It does not show hours of the day. Optional EVENT indicates a buffer 861
856position to use instead of point." 862The optional prefix argument N specifies a number of weeks (default 1).
863
864By default, the calendar is for the week at point; the optional
865argument EVENT specifies a different buffer position."
857 (interactive (list (prefix-numeric-value current-prefix-arg) 866 (interactive (list (prefix-numeric-value current-prefix-arg)
858 last-nonmenu-event)) 867 last-nonmenu-event))
859 (or n (setq n 1)) 868 (or n (setq n 1))
@@ -976,13 +985,16 @@ shown are hard-coded to 8-12, 13-17."
976;; TODO respect cal-tex-daily-start,end (see cal-tex-weekly4-box). 985;; TODO respect cal-tex-daily-start,end (see cal-tex-weekly4-box).
977;;;###cal-autoload 986;;;###cal-autoload
978(defun cal-tex-cursor-week-monday (&optional n event) 987(defun cal-tex-cursor-week-monday (&optional n event)
979 "Make a LaTeX calendar buffer for a two-page one-week calendar. 988 "Make a one page LaTeX calendar for one week, showing hours of the day.
980It applies to the week that point is in, and starts on Monday. 989There are two columns; with M-W in the first and T-S in the second.
981Optional prefix argument N specifies number of weeks (default 1). 990It shows the hours 8-12am and 1-5pm.
982The calendar shows holidays if `cal-tex-holidays' is 991It shows holidays if `cal-tex-holidays' is non-nil.
983non-nil (note that diary entries are not shown). The calendar shows 992It does not show diary entries.
984the hours 8-12am, 1-5pm. Optional EVENT indicates a buffer position 993
985to use instead of point." 994The optional prefix argument N specifies a number of weeks (default 1).
995
996By default, the calendar is for the week at point; the optional
997argument EVENT specifies a different buffer position."
986 (interactive (list (prefix-numeric-value current-prefix-arg) 998 (interactive (list (prefix-numeric-value current-prefix-arg)
987 last-nonmenu-event)) 999 last-nonmenu-event))
988 (or n (setq n 1)) 1000 (or n (setq n 1))
@@ -1203,13 +1215,16 @@ shown are hard-coded to 8-12, 13-17."
1203 (run-hooks 'cal-tex-hook))) 1215 (run-hooks 'cal-tex-hook)))
1204 1216
1205;;;###cal-autoload 1217;;;###cal-autoload
1206(defun cal-tex-cursor-week-at-a-glance (&optional n event) 1218(defun cal-tex-cursor-week2-summary (&optional n event)
1207 "One-week-at-a-glance full page calendar for week indicated by cursor. 1219 "Make a two page LaTeX calendar for one week, with optional diary entries.
1208Optional prefix argument N specifies number of weeks (default 1), 1220It does not show hours of the day.
1209starting on Mondays. The calendar shows holiday and diary entries 1221It shows holidays if `cal-tex-holidays' is non-nil.
1210if `cal-tex-holidays' and `cal-tex-diary', respectively, are non-nil. 1222It shows diary entries if `cal-tex-diary' is non-nil.
1211It does not show hours of the day. Optional EVENT indicates a buffer 1223
1212position to use instead of point." 1224The optional prefix argument N specifies a number of weeks (default 1).
1225
1226By default, the calendar is for the week at point; the optional
1227argument EVENT specifies a different buffer position."
1213 (interactive (list (prefix-numeric-value current-prefix-arg) 1228 (interactive (list (prefix-numeric-value current-prefix-arg)
1214 last-nonmenu-event)) 1229 last-nonmenu-event))
1215 (cal-tex-weekly-common n event)) 1230 (cal-tex-weekly-common n event))
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el
index 6f8311f4c55..96a5725ef69 100644
--- a/lisp/calendar/calendar.el
+++ b/lisp/calendar/calendar.el
@@ -1683,8 +1683,9 @@ line."
1683 (define-key map "td" 'cal-tex-cursor-day) 1683 (define-key map "td" 'cal-tex-cursor-day)
1684 (define-key map "tw1" 'cal-tex-cursor-week) 1684 (define-key map "tw1" 'cal-tex-cursor-week)
1685 (define-key map "tw2" 'cal-tex-cursor-week2) 1685 (define-key map "tw2" 'cal-tex-cursor-week2)
1686 (define-key map "tw3" 'cal-tex-cursor-week-iso) 1686 (define-key map "tw3" 'cal-tex-cursor-week-iso) ; FIXME twi ?
1687 (define-key map "tw4" 'cal-tex-cursor-week-monday) 1687 (define-key map "tw4" 'cal-tex-cursor-week-monday) ; twm ?
1688 (define-key map "twW" 'cal-tex-cursor-week2-summary)
1688 (define-key map "tfd" 'cal-tex-cursor-filofax-daily) 1689 (define-key map "tfd" 'cal-tex-cursor-filofax-daily)
1689 (define-key map "tfw" 'cal-tex-cursor-filofax-2week) 1690 (define-key map "tfw" 'cal-tex-cursor-filofax-2week)
1690 (define-key map "tfW" 'cal-tex-cursor-filofax-week) 1691 (define-key map "tfW" 'cal-tex-cursor-filofax-week)