Mercurial > emacs
comparison lisp/calendar/diary-lib.el @ 111656:f2bfd501f578
diary-lib comments.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 20 Nov 2010 14:29:35 -0800 |
parents | 76088ffbc653 |
children | b299531e6c80 |
comparison
equal
deleted
inserted
replaced
111655:36363a7ada1e | 111656:f2bfd501f578 |
---|---|
1 ;;; diary-lib.el --- diary functions | 1 ;;; diary-lib.el --- diary functions |
2 | 2 |
3 ;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1995, 2001, 2002, 2003, | 3 ;; Copyright (C) 1989, 1990, 1992, 1993, 1994, 1995, 2001, 2002, 2003, |
4 ;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. | 4 ;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
5 ;; Free Software Foundation, Inc. | |
5 | 6 |
6 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> | 7 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu> |
7 ;; Maintainer: Glenn Morris <rgm@gnu.org> | 8 ;; Maintainer: Glenn Morris <rgm@gnu.org> |
8 ;; Keywords: calendar | 9 ;; Keywords: calendar |
9 | 10 |
2329 (setq header-line-format diary-header-line-format))) | 2330 (setq header-line-format diary-header-line-format))) |
2330 | 2331 |
2331 | 2332 |
2332 ;;; Fancy Diary Mode. | 2333 ;;; Fancy Diary Mode. |
2333 | 2334 |
2335 ;; FIXME does not update upon changes to the name-arrays. | |
2334 (defvar diary-fancy-date-pattern | 2336 (defvar diary-fancy-date-pattern |
2335 (concat | 2337 (concat |
2336 (let ((dayname (diary-name-pattern calendar-day-name-array nil t)) | 2338 (let ((dayname (diary-name-pattern calendar-day-name-array nil t)) |
2337 (monthname (diary-name-pattern calendar-month-name-array nil t)) | 2339 (monthname (diary-name-pattern calendar-month-name-array nil t)) |
2338 (day "[0-9]+") | 2340 (day "[0-9]+") |
2431 body)) | 2433 body)) |
2432 (unless test-only | 2434 (unless test-only |
2433 (setq format-string (cdr (nth i diary-outlook-formats))) | 2435 (setq format-string (cdr (nth i diary-outlook-formats))) |
2434 (save-excursion | 2436 (save-excursion |
2435 (save-window-excursion | 2437 (save-window-excursion |
2436 ;; Fixme: References to optional fields in the format | |
2437 ;; are treated literally, not replaced by the empty | |
2438 ;; string. I think this is an Emacs bug. | |
2439 (diary-make-entry | 2438 (diary-make-entry |
2440 (format (replace-match (if (functionp format-string) | 2439 (format (replace-match (if (functionp format-string) |
2441 (funcall format-string body) | 2440 (funcall format-string body) |
2442 format-string) | 2441 format-string) |
2443 t nil (match-string 0 body)) | 2442 t nil (match-string 0 body)) |
2511 (t (error "Don't know how to snarf in `%s'" major-mode))))) | 2510 (t (error "Don't know how to snarf in `%s'" major-mode))))) |
2512 (funcall func noconfirm))) | 2511 (funcall func noconfirm))) |
2513 | 2512 |
2514 (provide 'diary-lib) | 2513 (provide 'diary-lib) |
2515 | 2514 |
2516 ;; arch-tag: 22dd506e-2e33-410d-9ae1-095a0c1b2010 | |
2517 ;;; diary-lib.el ends here | 2515 ;;; diary-lib.el ends here |