diff options
| author | Glenn Morris | 2008-03-13 06:40:31 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-03-13 06:40:31 +0000 |
| commit | f6ca63d779f1726bb66461dc230d43c7ed3740b0 (patch) | |
| tree | 2dde5a111461b891c66aee7090e002851f6a1b49 | |
| parent | c62a71df933a00ec227f89dccbfd6aafc4ec4f88 (diff) | |
| download | emacs-f6ca63d779f1726bb66461dc230d43c7ed3740b0.tar.gz emacs-f6ca63d779f1726bb66461dc230d43c7ed3740b0.zip | |
Whitespace only.
| -rw-r--r-- | lisp/calendar/diary-lib.el | 150 |
1 files changed, 77 insertions, 73 deletions
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index dbba1ce7d26..138d54c2c3c 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -611,50 +611,50 @@ If LIST-ONLY is non-nil don't modify or display the buffer, only return a list." | |||
| 611 | (entry-found (list-sexp-diary-entries date))) | 611 | (entry-found (list-sexp-diary-entries date))) |
| 612 | (dolist (date-form diary-date-forms) | 612 | (dolist (date-form diary-date-forms) |
| 613 | (let* ((backup (when (eq (car date-form) 'backup) | 613 | (let* ((backup (when (eq (car date-form) 'backup) |
| 614 | (setq date-form (cdr date-form)) | 614 | (setq date-form (cdr date-form)) |
| 615 | t)) | 615 | t)) |
| 616 | (dayname | 616 | (dayname |
| 617 | (format "%s\\|%s\\.?" | 617 | (format "%s\\|%s\\.?" |
| 618 | (calendar-day-name date) | 618 | (calendar-day-name date) |
| 619 | (calendar-day-name date 'abbrev))) | 619 | (calendar-day-name date 'abbrev))) |
| 620 | (monthname | 620 | (monthname |
| 621 | (format "\\*\\|%s\\|%s\\.?" | 621 | (format "\\*\\|%s\\|%s\\.?" |
| 622 | (calendar-month-name month) | 622 | (calendar-month-name month) |
| 623 | (calendar-month-name month 'abbrev))) | 623 | (calendar-month-name month 'abbrev))) |
| 624 | (month (concat "\\*\\|0*" (int-to-string month))) | 624 | (month (concat "\\*\\|0*" (int-to-string month))) |
| 625 | (day (concat "\\*\\|0*" (int-to-string day))) | 625 | (day (concat "\\*\\|0*" (int-to-string day))) |
| 626 | (year | 626 | (year |
| 627 | (concat | 627 | (concat |
| 628 | "\\*\\|0*" (int-to-string year) | 628 | "\\*\\|0*" (int-to-string year) |
| 629 | (if abbreviated-calendar-year | 629 | (if abbreviated-calendar-year |
| 630 | (concat "\\|" (format "%02d" (% year 100))) | 630 | (concat "\\|" (format "%02d" (% year 100))) |
| 631 | ""))) | 631 | ""))) |
| 632 | (regexp | 632 | (regexp |
| 633 | (concat | 633 | (concat |
| 634 | "^" mark "?\\(" | 634 | "^" mark "?\\(" |
| 635 | ;; This must be let* so that date-form | 635 | ;; This must be let* so that date-form |
| 636 | ;; can use day etc. | 636 | ;; can use day etc. |
| 637 | (mapconcat 'eval date-form "\\)\\(?:") | 637 | (mapconcat 'eval date-form "\\)\\(?:") |
| 638 | "\\)")) | 638 | "\\)")) |
| 639 | (case-fold-search t)) | 639 | (case-fold-search t)) |
| 640 | (goto-char (point-min)) | 640 | (goto-char (point-min)) |
| 641 | (while (re-search-forward regexp nil t) | 641 | (while (re-search-forward regexp nil t) |
| 642 | (if backup (re-search-backward "\\<" nil t)) | 642 | (if backup (re-search-backward "\\<" nil t)) |
| 643 | (if (and (bolp) (not (looking-at "[ \t]"))) | 643 | (if (and (bolp) (not (looking-at "[ \t]"))) |
| 644 | ;; Diary entry that consists only of date. | 644 | ;; Diary entry that consists only of date. |
| 645 | (backward-char 1) | 645 | (backward-char 1) |
| 646 | ;; Found a nonempty diary entry--make it | 646 | ;; Found a nonempty diary entry--make it |
| 647 | ;; visible and add it to the list. | 647 | ;; visible and add it to the list. |
| 648 | (setq entry-found t) | 648 | (setq entry-found t) |
| 649 | (if (looking-at "[ \t]*\n[ \t]") (forward-line 1)) | 649 | (if (looking-at "[ \t]*\n[ \t]") (forward-line 1)) |
| 650 | (let ((entry-start (point)) | 650 | (let ((entry-start (point)) |
| 651 | date-start temp) | 651 | date-start temp) |
| 652 | (setq date-start | 652 | (setq date-start |
| 653 | (line-end-position | 653 | (line-end-position |
| 654 | (if (and (bolp) (> number 1)) -1 0))) | 654 | (if (and (bolp) (> number 1)) -1 0))) |
| 655 | (forward-line 1) | 655 | (forward-line 1) |
| 656 | (while (looking-at "[ \t]") | 656 | (while (looking-at "[ \t]") |
| 657 | (forward-line 1)) | 657 | (forward-line 1)) |
| 658 | (unless (and (eobp) (not (bolp))) | 658 | (unless (and (eobp) (not (bolp))) |
| 659 | (backward-char 1)) | 659 | (backward-char 1)) |
| 660 | (unless list-only | 660 | (unless list-only |
| @@ -681,8 +681,8 @@ If LIST-ONLY is non-nil don't modify or display the buffer, only return a list." | |||
| 681 | 'list-diary-entries-hook) | 681 | 'list-diary-entries-hook) |
| 682 | (unless list-only | 682 | (unless list-only |
| 683 | (if diary-display-hook | 683 | (if diary-display-hook |
| 684 | (run-hooks 'diary-display-hook) | 684 | (run-hooks 'diary-display-hook) |
| 685 | (simple-diary-display))) | 685 | (simple-diary-display))) |
| 686 | (run-hooks 'diary-hook) | 686 | (run-hooks 'diary-hook) |
| 687 | diary-entries-list)))))) | 687 | diary-entries-list)))))) |
| 688 | 688 | ||
| @@ -1238,17 +1238,21 @@ is marked. See the documentation for the function `list-sexp-diary-entries'." | |||
| 1238 | (if (bolp) (backward-char 1)) | 1238 | (if (bolp) (backward-char 1)) |
| 1239 | (setq entry (buffer-substring-no-properties entry-start (point)))) | 1239 | (setq entry (buffer-substring-no-properties entry-start (point)))) |
| 1240 | (calendar-for-loop date from first-date to last-date do | 1240 | (calendar-for-loop date from first-date to last-date do |
| 1241 | (if (setq mark (diary-sexp-entry sexp entry | 1241 | (if (setq mark |
| 1242 | (calendar-gregorian-from-absolute date))) | 1242 | (diary-sexp-entry sexp entry |
| 1243 | (progn | 1243 | (calendar-gregorian-from-absolute date))) |
| 1244 | (setq marks (diary-pull-attrs entry file-glob-attrs) | 1244 | (progn |
| 1245 | marks (nth 1 (diary-pull-attrs entry file-glob-attrs))) | 1245 | ;; FIXME what? |
| 1246 | (mark-visible-calendar-date | 1246 | (setq marks (diary-pull-attrs |
| 1247 | (calendar-gregorian-from-absolute date) | 1247 | entry file-glob-attrs) |
| 1248 | (if (< 0 (length marks)) | 1248 | marks (nth 1 (diary-pull-attrs |
| 1249 | marks | 1249 | entry file-glob-attrs))) |
| 1250 | (if (consp mark) | 1250 | (mark-visible-calendar-date |
| 1251 | (car mark))))))))))) | 1251 | (calendar-gregorian-from-absolute date) |
| 1252 | (if (< 0 (length marks)) | ||
| 1253 | marks | ||
| 1254 | (if (consp mark) | ||
| 1255 | (car mark))))))))))) | ||
| 1252 | 1256 | ||
| 1253 | (defun mark-included-diary-files () | 1257 | (defun mark-included-diary-files () |
| 1254 | "Mark the diary entries from other diary files with those of the diary file. | 1258 | "Mark the diary entries from other diary files with those of the diary file. |
| @@ -1300,7 +1304,7 @@ Optional argument COLOR is passed to `mark-visible-calendar-date' as MARK." | |||
| 1300 | (setq day (calendar-absolute-from-gregorian | 1304 | (setq day (calendar-absolute-from-gregorian |
| 1301 | (calendar-nth-named-day 1 dayname prev-month prev-year)) | 1305 | (calendar-nth-named-day 1 dayname prev-month prev-year)) |
| 1302 | last-day (calendar-absolute-from-gregorian | 1306 | last-day (calendar-absolute-from-gregorian |
| 1303 | (calendar-nth-named-day -1 dayname succ-month succ-year))) | 1307 | (calendar-nth-named-day -1 dayname succ-month succ-year))) |
| 1304 | (while (<= day last-day) | 1308 | (while (<= day last-day) |
| 1305 | (mark-visible-calendar-date (calendar-gregorian-from-absolute day) | 1309 | (mark-visible-calendar-date (calendar-gregorian-from-absolute day) |
| 1306 | color) | 1310 | color) |
| @@ -1328,8 +1332,8 @@ Optional argument COLOR is passed to `mark-visible-calendar-date' as MARK." | |||
| 1328 | (or (zerop p-year) (= year p-year)))) | 1332 | (or (zerop p-year) (= year p-year)))) |
| 1329 | (if (zerop p-day) | 1333 | (if (zerop p-day) |
| 1330 | (calendar-for-loop | 1334 | (calendar-for-loop |
| 1331 | i from 1 to (calendar-last-day-of-month month year) do | 1335 | i from 1 to (calendar-last-day-of-month month year) do |
| 1332 | (mark-visible-calendar-date (list month i year) color)) | 1336 | (mark-visible-calendar-date (list month i year) color)) |
| 1333 | (mark-visible-calendar-date (list month p-day year) color)))) | 1337 | (mark-visible-calendar-date (list month p-day year) color)))) |
| 1334 | 1338 | ||
| 1335 | (defun sort-diary-entries () | 1339 | (defun sort-diary-entries () |
| @@ -1365,7 +1369,7 @@ be used instead of a colon (:) to separate the hour and minute parts." | |||
| 1365 | (+ (* 100 (% (string-to-number (match-string 1 s)) 12)) | 1369 | (+ (* 100 (% (string-to-number (match-string 1 s)) 12)) |
| 1366 | (if (equal ?a (downcase (aref s (match-beginning 2)))) | 1370 | (if (equal ?a (downcase (aref s (match-beginning 2)))) |
| 1367 | 0 1200))) | 1371 | 0 1200))) |
| 1368 | ((string-match ; hour and minute (XX:XXam or XX:XXpm) | 1372 | ((string-match ; hour and minute (XX:XXam or XX:XXpm) |
| 1369 | "\\`[ \t\n]*\\([0-9]?[0-9]\\)[:.]\\([0-9][0-9]\\)\\([ap]\\)m\\>" s) | 1373 | "\\`[ \t\n]*\\([0-9]?[0-9]\\)[:.]\\([0-9][0-9]\\)\\([ap]\\)m\\>" s) |
| 1370 | (+ (* 100 (% (string-to-number (match-string 1 s)) 12)) | 1374 | (+ (* 100 (% (string-to-number (match-string 1 s)) 12)) |
| 1371 | (string-to-number (match-string 2 s)) | 1375 | (string-to-number (match-string 2 s)) |
| @@ -1926,21 +1930,21 @@ Prefix argument ARG makes the entry nonmarking." | |||
| 1926 | (if european-calendar-style | 1930 | (if european-calendar-style |
| 1927 | '(day " " month " " year) | 1931 | '(day " " month " " year) |
| 1928 | '(month " " day " " year))) | 1932 | '(month " " day " " year))) |
| 1929 | (cursor (calendar-cursor-to-date t)) | 1933 | (cursor (calendar-cursor-to-date t)) |
| 1930 | (mark (or (car calendar-mark-ring) | 1934 | (mark (or (car calendar-mark-ring) |
| 1931 | (error "No mark set in this buffer"))) | 1935 | (error "No mark set in this buffer"))) |
| 1932 | start end) | 1936 | start end) |
| 1933 | (if (< (calendar-absolute-from-gregorian mark) | 1937 | (if (< (calendar-absolute-from-gregorian mark) |
| 1934 | (calendar-absolute-from-gregorian cursor)) | 1938 | (calendar-absolute-from-gregorian cursor)) |
| 1935 | (setq start mark | 1939 | (setq start mark |
| 1936 | end cursor) | 1940 | end cursor) |
| 1937 | (setq start cursor | 1941 | (setq start cursor |
| 1938 | end mark)) | 1942 | end mark)) |
| 1939 | (make-diary-entry | 1943 | (make-diary-entry |
| 1940 | (format "%s(diary-block %s %s)" | 1944 | (format "%s(diary-block %s %s)" |
| 1941 | sexp-diary-entry-symbol | 1945 | sexp-diary-entry-symbol |
| 1942 | (calendar-date-string start nil t) | 1946 | (calendar-date-string start nil t) |
| 1943 | (calendar-date-string end nil t)) | 1947 | (calendar-date-string end nil t)) |
| 1944 | arg))) | 1948 | arg))) |
| 1945 | 1949 | ||
| 1946 | ;;;###cal-autoload | 1950 | ;;;###cal-autoload |
| @@ -2088,21 +2092,21 @@ names." | |||
| 2088 | (day "\\([0-9]+\\|\\*\\)") | 2092 | (day "\\([0-9]+\\|\\*\\)") |
| 2089 | (year "-?\\([0-9]+\\|\\*\\)")) | 2093 | (year "-?\\([0-9]+\\|\\*\\)")) |
| 2090 | (mapcar (lambda (x) | 2094 | (mapcar (lambda (x) |
| 2091 | (cons | 2095 | (cons |
| 2092 | (concat "^" (regexp-quote diary-nonmarking-symbol) "?" | 2096 | (concat "^" (regexp-quote diary-nonmarking-symbol) "?" |
| 2093 | (if symbol (regexp-quote symbol) "") "\\(" | 2097 | (if symbol (regexp-quote symbol) "") "\\(" |
| 2094 | (mapconcat 'eval | 2098 | (mapconcat 'eval |
| 2095 | ;; If backup, omit first item (backup) | 2099 | ;; If backup, omit first item (backup) |
| 2096 | ;; and last item (not part of date). | 2100 | ;; and last item (not part of date). |
| 2097 | (if (equal (car x) 'backup) | 2101 | (if (equal (car x) 'backup) |
| 2098 | (nreverse (cdr (reverse (cdr x)))) | 2102 | (nreverse (cdr (reverse (cdr x)))) |
| 2099 | x) | 2103 | x) |
| 2100 | "") | 2104 | "") |
| 2101 | ;; With backup, last item is not part of date. | 2105 | ;; With backup, last item is not part of date. |
| 2102 | (if (equal (car x) 'backup) | 2106 | (if (equal (car x) 'backup) |
| 2103 | (concat "\\)" (eval (car (reverse x)))) | 2107 | (concat "\\)" (eval (car (reverse x)))) |
| 2104 | "\\)")) | 2108 | "\\)")) |
| 2105 | '(1 diary-face))) | 2109 | '(1 diary-face))) |
| 2106 | diary-date-forms))) | 2110 | diary-date-forms))) |
| 2107 | 2111 | ||
| 2108 | (defvar calendar-hebrew-month-name-array-leap-year) | 2112 | (defvar calendar-hebrew-month-name-array-leap-year) |