aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/calendar/diary-lib.el28
1 files changed, 16 insertions, 12 deletions
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el
index ad95c7fd060..17b198c7f93 100644
--- a/lisp/calendar/diary-lib.el
+++ b/lisp/calendar/diary-lib.el
@@ -307,7 +307,9 @@ These hooks have the following distinct roles:
307 (subst-char-in-region date-start 307 (subst-char-in-region date-start
308 (point) ?\^M ?\n t) 308 (point) ?\^M ?\n t)
309 (add-to-diary-list 309 (add-to-diary-list
310 date (buffer-substring entry-start (point))))))) 310 date
311 (buffer-substring-no-properties
312 entry-start (point)))))))
311 (setq d (cdr d))) 313 (setq d (cdr d)))
312 (or entry-found 314 (or entry-found
313 (not diary-list-include-blanks) 315 (not diary-list-include-blanks)
@@ -346,7 +348,8 @@ changing the variable `diary-include-string'."
346 " \"\\([^\"]*\\)\"") 348 " \"\\([^\"]*\\)\"")
347 nil t) 349 nil t)
348 (let ((diary-file (substitute-in-file-name 350 (let ((diary-file (substitute-in-file-name
349 (buffer-substring (match-beginning 2) (match-end 2)))) 351 (buffer-substring-no-properties
352 (match-beginning 2) (match-end 2))))
350 (diary-list-include-blanks nil) 353 (diary-list-include-blanks nil)
351 (list-diary-entries-hook 'include-other-diary-files) 354 (list-diary-entries-hook 'include-other-diary-files)
352 (diary-display-hook 'ignore) 355 (diary-display-hook 'ignore)
@@ -639,28 +642,28 @@ After the entries are marked, the hooks `nongregorian-diary-marking-hook' and
639 (while (re-search-forward regexp nil t) 642 (while (re-search-forward regexp nil t)
640 (let* ((dd-name 643 (let* ((dd-name
641 (if d-name-pos 644 (if d-name-pos
642 (buffer-substring 645 (buffer-substring-no-properties
643 (match-beginning d-name-pos) 646 (match-beginning d-name-pos)
644 (match-end d-name-pos)))) 647 (match-end d-name-pos))))
645 (mm-name 648 (mm-name
646 (if m-name-pos 649 (if m-name-pos
647 (buffer-substring 650 (buffer-substring-no-properties
648 (match-beginning m-name-pos) 651 (match-beginning m-name-pos)
649 (match-end m-name-pos)))) 652 (match-end m-name-pos))))
650 (mm (string-to-int 653 (mm (string-to-int
651 (if m-pos 654 (if m-pos
652 (buffer-substring 655 (buffer-substring-no-properties
653 (match-beginning m-pos) 656 (match-beginning m-pos)
654 (match-end m-pos)) 657 (match-end m-pos))
655 ""))) 658 "")))
656 (dd (string-to-int 659 (dd (string-to-int
657 (if d-pos 660 (if d-pos
658 (buffer-substring 661 (buffer-substring-no-properties
659 (match-beginning d-pos) 662 (match-beginning d-pos)
660 (match-end d-pos)) 663 (match-end d-pos))
661 ""))) 664 "")))
662 (y-str (if y-pos 665 (y-str (if y-pos
663 (buffer-substring 666 (buffer-substring-no-properties
664 (match-beginning y-pos) 667 (match-beginning y-pos)
665 (match-end y-pos)))) 668 (match-end y-pos))))
666 (yy (if (not y-str) 669 (yy (if (not y-str)
@@ -744,7 +747,7 @@ is marked. See the documentation for the function `list-sexp-diary-entries'."
744 (entry-start) 747 (entry-start)
745 (line-start)) 748 (line-start))
746 (forward-sexp) 749 (forward-sexp)
747 (setq sexp (buffer-substring sexp-start (point))) 750 (setq sexp (buffer-substring-no-properties sexp-start (point)))
748 (save-excursion 751 (save-excursion
749 (re-search-backward "\^M\\|\n\\|\\`") 752 (re-search-backward "\^M\\|\n\\|\\`")
750 (setq line-start (point))) 753 (setq line-start (point)))
@@ -760,7 +763,7 @@ is marked. See the documentation for the function `list-sexp-diary-entries'."
760 (while (looking-at " \\|\^I") 763 (while (looking-at " \\|\^I")
761 (re-search-forward "\^M\\|\n" nil t)) 764 (re-search-forward "\^M\\|\n" nil t))
762 (backward-char 1) 765 (backward-char 1)
763 (setq entry (buffer-substring entry-start (point))) 766 (setq entry (buffer-substring-no-properties entry-start (point)))
764 (while (string-match "[\^M]" entry) 767 (while (string-match "[\^M]" entry)
765 (aset entry (match-beginning 0) ?\n ))) 768 (aset entry (match-beginning 0) ?\n )))
766 (calendar-for-loop date from first-date to last-date do 769 (calendar-for-loop date from first-date to last-date do
@@ -786,7 +789,8 @@ changing the variable `diary-include-string'."
786 " \"\\([^\"]*\\)\"") 789 " \"\\([^\"]*\\)\"")
787 nil t) 790 nil t)
788 (let ((diary-file (substitute-in-file-name 791 (let ((diary-file (substitute-in-file-name
789 (buffer-substring (match-beginning 2) (match-end 2)))) 792 (buffer-substring-no-properties
793 (match-beginning 2) (match-end 2))))
790 (mark-diary-entries-hook 'mark-included-diary-files)) 794 (mark-diary-entries-hook 'mark-included-diary-files))
791 (if (file-exists-p diary-file) 795 (if (file-exists-p diary-file)
792 (if (file-readable-p diary-file) 796 (if (file-readable-p diary-file)
@@ -1051,7 +1055,7 @@ best if they are nonmarking."
1051 (entry-start) 1055 (entry-start)
1052 (line-start)) 1056 (line-start))
1053 (forward-sexp) 1057 (forward-sexp)
1054 (setq sexp (buffer-substring sexp-start (point))) 1058 (setq sexp (buffer-substring-no-properties sexp-start (point)))
1055 (save-excursion 1059 (save-excursion
1056 (re-search-backward "\^M\\|\n\\|\\`") 1060 (re-search-backward "\^M\\|\n\\|\\`")
1057 (setq line-start (point))) 1061 (setq line-start (point)))
@@ -1067,7 +1071,7 @@ best if they are nonmarking."
1067 (while (looking-at " \\|\^I") 1071 (while (looking-at " \\|\^I")
1068 (re-search-forward "\^M\\|\n" nil t)) 1072 (re-search-forward "\^M\\|\n" nil t))
1069 (backward-char 1) 1073 (backward-char 1)
1070 (setq entry (buffer-substring entry-start (point))) 1074 (setq entry (buffer-substring-no-properties entry-start (point)))
1071 (while (string-match "[\^M]" entry) 1075 (while (string-match "[\^M]" entry)
1072 (aset entry (match-beginning 0) ?\n ))) 1076 (aset entry (match-beginning 0) ?\n )))
1073 (let ((diary-entry (diary-sexp-entry sexp entry date))) 1077 (let ((diary-entry (diary-sexp-entry sexp entry date)))