aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Blandy1993-06-22 03:23:14 +0000
committerJim Blandy1993-06-22 03:23:14 +0000
commit1bd410e56eff14bf5cd1a4d26bee6c9966f47e0f (patch)
tree8f137bd75b805447c8da7e424ea819b8d14518f4
parenta92ade89ed525d377e9bf2162e77a0b4bc2d1bef (diff)
downloademacs-1bd410e56eff14bf5cd1a4d26bee6c9966f47e0f.tar.gz
emacs-1bd410e56eff14bf5cd1a4d26bee6c9966f47e0f.zip
* diary.el (list-sexp-diary-entries,
hebrew-calendar-year-Saturday-incomplete-Sunday, hebrew-calendar-year-Monday-incomplete-Tuesday, hebrew-calendar-year-Tuesday-regular-Thursday, hebrew-calendar-year-Thursday-complete-Sunday, hebrew-calendar-year-Saturday-complete-Thursday, hebrew-calendar-year-Monday-complete-Saturday, hebrew-calendar-year-Thursday-incomplete-Sunday): Fix doc strings. (diary-sexp-entry): Use calendar-sexp-debug to turn off error catching.
-rw-r--r--lisp/diary-lib.el122
1 files changed, 63 insertions, 59 deletions
diff --git a/lisp/diary-lib.el b/lisp/diary-lib.el
index e0d9127dfa2..cd5ae3f9f72 100644
--- a/lisp/diary-lib.el
+++ b/lisp/diary-lib.el
@@ -1046,8 +1046,9 @@ A value of 0 in any position is a wild-card."
1046 (calendar-gregorian-from-absolute date))))))))) 1046 (calendar-gregorian-from-absolute date)))))))))
1047 1047
1048(defun list-sexp-diary-entries (date) 1048(defun list-sexp-diary-entries (date)
1049 "Add any sexp entries for DATE from the diary-file to diary-entries-list 1049 "Add sexp entries for DATE from the diary-file to diary-entries-list.
1050and make them visible in the diary file. Returns t if any entries were found. 1050Also, Make them visible in the diary file. Returns t if any entries were
1051found.
1051 1052
1052Sexp diary entries must be prefaced by a sexp-diary-entry-symbol (normally 1053Sexp diary entries must be prefaced by a sexp-diary-entry-symbol (normally
1053`%%'). The form of a sexp diary entry is 1054`%%'). The form of a sexp diary entry is
@@ -1222,21 +1223,24 @@ best if they are nonmarking."
1222 1223
1223(defun diary-sexp-entry (sexp entry date) 1224(defun diary-sexp-entry (sexp entry date)
1224 "Process a SEXP diary ENTRY for DATE." 1225 "Process a SEXP diary ENTRY for DATE."
1225 (let ((result (condition-case nil 1226 (let ((result (if calendar-debug-sexp
1226 (eval (car (read-from-string sexp))) 1227 (let ((stack-trace-on-error t))
1227 (error 1228 (eval (car (read-from-string sexp))))
1228 (beep) 1229 (condition-case nil
1229 (message "Bad sexp at line %d in %s: %s" 1230 (eval (car (read-from-string sexp)))
1230 (save-excursion 1231 (error
1231 (save-restriction 1232 (beep)
1232 (narrow-to-region 1 (point)) 1233 (message "Bad sexp at line %d in %s: %s"
1233 (goto-char (point-min)) 1234 (save-excursion
1234 (let ((lines 1)) 1235 (save-restriction
1235 (while (re-search-forward "\n\\|\^M" nil t) 1236 (narrow-to-region 1 (point))
1236 (setq lines (1+ lines))) 1237 (goto-char (point-min))
1237 lines))) 1238 (let ((lines 1))
1238 diary-file sexp) 1239 (while (re-search-forward "\n\\|\^M" nil t)
1239 (sleep-for 2))))) 1240 (setq lines (1+ lines)))
1241 lines)))
1242 diary-file sexp)
1243 (sleep-for 2))))))
1240 (if (stringp result) 1244 (if (stringp result)
1241 result 1245 result
1242 (if result 1246 (if result
@@ -1545,58 +1549,58 @@ Do nothing if DATE or STRING is nil."
1545 [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 1549 [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22]
1546 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] 1550 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42]
1547 43 44 45 46 47 48 49 50] 1551 43 44 45 46 47 48 49 50]
1548 "The structure of the parashiot in a Hebrew year that starts on Saturday, 1552 "The structure of the parashiot.
1549is `incomplete' (Heshvan and Kislev each have 29 days), and has Passover 1553Hebrew year starts on Saturday, is `incomplete' (Heshvan and Kislev each have
1550start on Sunday.") 155429 days), and has Passover start on Sunday.")
1551 1555
1552(defconst hebrew-calendar-year-Saturday-complete-Tuesday 1556(defconst hebrew-calendar-year-Saturday-complete-Tuesday
1553 [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 1557 [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22]
1554 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] 1558 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42]
1555 43 44 45 46 47 48 49 [50 51]] 1559 43 44 45 46 47 48 49 [50 51]]
1556 "The structure of the parashiot in a Hebrew year that starts on Saturday, 1560 "The structure of the parashiot.
1557is `complete' (Heshvan and Kislev each have 30 days), and has Passover 1561Hebrew year that starts on Saturday, is `complete' (Heshvan and Kislev each
1558start on Tuesday.") 1562have 30 days), and has Passover start on Tuesday.")
1559 1563
1560(defconst hebrew-calendar-year-Monday-incomplete-Tuesday 1564(defconst hebrew-calendar-year-Monday-incomplete-Tuesday
1561 [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 1565 [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22]
1562 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] 1566 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42]
1563 43 44 45 46 47 48 49 [50 51]] 1567 43 44 45 46 47 48 49 [50 51]]
1564 "The structure of the parashiot in a Hebrew year that starts on Monday, 1568 "The structure of the parashiot.
1565is `incomplete' (Heshvan and Kislev each have 29 days), and has Passover 1569Hebrew year that starts on Monday, is `incomplete' (Heshvan and Kislev each
1566start on Tuesday.") 1570have 29 days), and has Passover start on Tuesday.")
1567 1571
1568(defconst hebrew-calendar-year-Monday-complete-Thursday 1572(defconst hebrew-calendar-year-Monday-complete-Thursday
1569 [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 1573 [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22]
1570 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 (nil . 34) (34 . 35) (35 . 36) 1574 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 (nil . 34) (34 . 35) (35 . 36)
1571 (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] 1575 (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]]
1572 "The structure of the parashiot in a Hebrew year that starts on Monday, 1576 "The structure of the parashiot.
1573is `complete' (Heshvan and Kislev each have 30 days), and has Passover 1577Hebrew year that starts on Monday, is `complete' (Heshvan and Kislev each have
1574start on Thursday.") 157830 days), and has Passover start on Thursday.")
1575 1579
1576(defconst hebrew-calendar-year-Tuesday-regular-Thursday 1580(defconst hebrew-calendar-year-Tuesday-regular-Thursday
1577 [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 1581 [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22]
1578 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 (nil . 34) (34 . 35) (35 . 36) 1582 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 (nil . 34) (34 . 35) (35 . 36)
1579 (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] 1583 (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]]
1580 "The structure of the parashiot in a Hebrew year that starts on Tuesday, 1584 "The structure of the parashiot.
1581is `regular' (Heshvan has 29 days and Kislev has 30 days), and has Passover 1585Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29 days and
1582start on Thursday.") 1586Kislev has 30 days), and has Passover start on Thursday.")
1583 1587
1584(defconst hebrew-calendar-year-Thursday-regular-Saturday 1588(defconst hebrew-calendar-year-Thursday-regular-Saturday
1585 [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23 1589 [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 [21 22] 23
1586 24 nil (nil . 25) (25 . [26 27]) ([26 27] . [28 29]) ([28 29] . 30) 1590 24 nil (nil . 25) (25 . [26 27]) ([26 27] . [28 29]) ([28 29] . 30)
1587 (30 . 31) ([31 32] . 32) 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48 1591 (30 . 31) ([31 32] . 32) 33 34 35 36 37 38 39 40 [41 42] 43 44 45 46 47 48
1588 49 50] 1592 49 50]
1589 "The structure of the parashiot in a Hebrew year that starts on Thursday, 1593 "The structure of the parashiot.
1590is `regular' (Heshvan has 29 days and Kislev has 30 days), and has Passover 1594Hebrew year that starts on Thursday, is `regular' (Heshvan has 29 days and
1591start on Saturday.") 1595Kislev has 30 days), and has Passover start on Saturday.")
1592 1596
1593(defconst hebrew-calendar-year-Thursday-complete-Sunday 1597(defconst hebrew-calendar-year-Thursday-complete-Sunday
1594 [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1598 [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
1595 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42] 1599 23 24 nil 25 [26 27] [28 29] 30 [31 32] 33 34 35 36 37 38 39 40 [41 42]
1596 43 44 45 46 47 48 49 50] 1600 43 44 45 46 47 48 49 50]
1597 "The structure of the parashiot in a Hebrew year that starts on Thursday, 1601 "The structure of the parashiot.
1598is `complete' (Heshvan and Kislev each have 30 days), and has Passover 1602Hebrew year that starts on Thursday, is `complete' (Heshvan and Kislev each
1599start on Sunday.") 1603have 30 days), and has Passover start on Sunday.")
1600 1604
1601;; The seven leap year types (keviot) 1605;; The seven leap year types (keviot)
1602 1606
@@ -1604,59 +1608,59 @@ start on Sunday.")
1604 [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1608 [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
1605 23 24 25 26 27 nil 28 29 30 31 32 33 34 35 36 37 38 39 40 [41 42] 1609 23 24 25 26 27 nil 28 29 30 31 32 33 34 35 36 37 38 39 40 [41 42]
1606 43 44 45 46 47 48 49 [50 51]] 1610 43 44 45 46 47 48 49 [50 51]]
1607 "The structure of the parashiot in a Hebrew year that starts on Saturday, 1611 "The structure of the parashiot.
1608is `incomplete' (Heshvan and Kislev each have 29 days), and has Passover 1612Hebrew year that starts on Saturday, is `incomplete' (Heshvan and Kislev each
1609start on Tuesday.") 1613have 29 days), and has Passover start on Tuesday.")
1610 1614
1611(defconst hebrew-calendar-year-Saturday-complete-Thursday 1615(defconst hebrew-calendar-year-Saturday-complete-Thursday
1612 [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1616 [nil 52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
1613 23 24 25 26 27 nil 28 29 30 31 32 33 (nil . 34) (34 . 35) (35 . 36) 1617 23 24 25 26 27 nil 28 29 30 31 32 33 (nil . 34) (34 . 35) (35 . 36)
1614 (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] 1618 (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]]
1615 "The structure of the parashiot in a Hebrew year that starts on Saturday, 1619 "The structure of the parashiot.
1616is `complete' (Heshvan and Kislev each have 30 days), and has Passover 1620Hebrew year that starts on Saturday, is `complete' (Heshvan and Kislev each
1617start on Thursday.") 1621have 30 days), and has Passover start on Thursday.")
1618 1622
1619(defconst hebrew-calendar-year-Monday-incomplete-Thursday 1623(defconst hebrew-calendar-year-Monday-incomplete-Thursday
1620 [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1624 [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
1621 23 24 25 26 27 nil 28 29 30 31 32 33 (nil . 34) (34 . 35) (35 . 36) 1625 23 24 25 26 27 nil 28 29 30 31 32 33 (nil . 34) (34 . 35) (35 . 36)
1622 (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]] 1626 (36 . 37) (37 . 38) ([38 39] . 39) 40 [41 42] 43 44 45 46 47 48 49 [50 51]]
1623 "The structure of the parashiot in a Hebrew year that starts on Monday, 1627 "The structure of the parashiot.
1624is `incomplete' (Heshvan and Kislev each have 29 days), and has Passover 1628Hebrew year that starts on Monday, is `incomplete' (Heshvan and Kislev each
1625start on Thursday.") 1629have 29 days), and has Passover start on Thursday.")
1626 1630
1627(defconst hebrew-calendar-year-Monday-complete-Saturday 1631(defconst hebrew-calendar-year-Monday-complete-Saturday
1628 [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1632 [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
1629 23 24 25 26 27 nil (nil . 28) (28 . 29) (29 . 30) (30 . 31) (31 . 32) 1633 23 24 25 26 27 nil (nil . 28) (28 . 29) (29 . 30) (30 . 31) (31 . 32)
1630 (32 . 33) (33 . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) (38 . 39) 1634 (32 . 33) (33 . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) (38 . 39)
1631 (39 . 40) (40 . 41) ([41 42] . 42) 43 44 45 46 47 48 49 50] 1635 (39 . 40) (40 . 41) ([41 42] . 42) 43 44 45 46 47 48 49 50]
1632 "The structure of the parashiot in a Hebrew year that starts on Monday, 1636 "The structure of the parashiot.
1633is `complete' (Heshvan and Kislev each have 30 days), and has Passover 1637Hebrew year that starts on Monday, is `complete' (Heshvan and Kislev each have
1634start on Saturday.") 163830 days), and has Passover start on Saturday.")
1635 1639
1636(defconst hebrew-calendar-year-Tuesday-regular-Saturday 1640(defconst hebrew-calendar-year-Tuesday-regular-Saturday
1637 [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1641 [51 52 nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
1638 23 24 25 26 27 nil (nil . 28) (28 . 29) (29 . 30) (30 . 31) (31 . 32) 1642 23 24 25 26 27 nil (nil . 28) (28 . 29) (29 . 30) (30 . 31) (31 . 32)
1639 (32 . 33) (33 . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) (38 . 39) 1643 (32 . 33) (33 . 34) (34 . 35) (35 . 36) (36 . 37) (37 . 38) (38 . 39)
1640 (39 . 40) (40 . 41) ([41 42] . 42) 43 44 45 46 47 48 49 50] 1644 (39 . 40) (40 . 41) ([41 42] . 42) 43 44 45 46 47 48 49 50]
1641 "The structure of the parashiot in a Hebrew year that starts on Tuesday, 1645 "The structure of the parashiot.
1642is `regular' (Heshvan has 29 days and Kislev has 30 days), and has Passover 1646Hebrew year that starts on Tuesday, is `regular' (Heshvan has 29 days and
1643start on Saturday.") 1647Kislev has 30 days), and has Passover start on Saturday.")
1644 1648
1645(defconst hebrew-calendar-year-Thursday-incomplete-Sunday 1649(defconst hebrew-calendar-year-Thursday-incomplete-Sunday
1646 [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1650 [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
1647 23 24 25 26 27 28 nil 29 30 31 32 33 34 35 36 37 38 39 40 41 42 1651 23 24 25 26 27 28 nil 29 30 31 32 33 34 35 36 37 38 39 40 41 42
1648 43 44 45 46 47 48 49 50] 1652 43 44 45 46 47 48 49 50]
1649 "The structure of the parashiot in a Hebrew year that starts on Thursday, 1653 "The structure of the parashiot.
1650is `incomplete' (Heshvan and Kislev both have 29 days), and has Passover 1654Hebrew year that starts on Thursday, is `incomplete' (Heshvan and Kislev both
1651start on Sunday.") 1655have 29 days), and has Passover start on Sunday.")
1652 1656
1653(defconst hebrew-calendar-year-Thursday-complete-Tuesday 1657(defconst hebrew-calendar-year-Thursday-complete-Tuesday
1654 [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1658 [52 nil nil 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
1655 23 24 25 26 27 28 nil 29 30 31 32 33 34 35 36 37 38 39 40 41 42 1659 23 24 25 26 27 28 nil 29 30 31 32 33 34 35 36 37 38 39 40 41 42
1656 43 44 45 46 47 48 49 [50 51]] 1660 43 44 45 46 47 48 49 [50 51]]
1657 "The structure of the parashiot in a Hebrew year that starts on Thursday, 1661 "The structure of the parashiot.
1658is `complete' (Heshvan and Kislev both have 30 days), and has Passover 1662Hebrew year that starts on Thursday, is `complete' (Heshvan and Kislev both
1659start on Tuesday.") 1663have 30 days), and has Passover start on Tuesday.")
1660 1664
1661(defun hebrew-calendar-parasha-name (p) 1665(defun hebrew-calendar-parasha-name (p)
1662 "Name(s) corresponding to parasha P." 1666 "Name(s) corresponding to parasha P."