diff options
| author | Glenn Morris | 2010-09-14 01:02:28 -0700 |
|---|---|---|
| committer | Glenn Morris | 2010-09-14 01:02:28 -0700 |
| commit | 67ae97667d185e23a24a98f295bcf1cd9c788cb5 (patch) | |
| tree | 3f2c2603b25bd63e2cdcf4581720afea76961d06 /lisp | |
| parent | 0ab9cff33d60e035ff437639f62cf763610641b1 (diff) | |
| download | emacs-67ae97667d185e23a24a98f295bcf1cd9c788cb5.tar.gz emacs-67ae97667d185e23a24a98f295bcf1cd9c788cb5.zip | |
Doc fixes related to diary-sort-entries.
* lisp/calendar/diary-lib.el (diary-list-entries-hook, diary-sort-entries):
Doc fixes.
* doc/emacs/cal-xtra.texi (Fancy Diary Display): Emphasize that sort
should be the last hook item.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/calendar/diary-lib.el | 10 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 66be118bf7e..6098dad51de 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2010-09-14 Glenn Morris <rgm@gnu.org> | 1 | 2010-09-14 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * calendar/diary-lib.el (diary-list-entries-hook, diary-sort-entries): | ||
| 4 | Doc fixes. | ||
| 5 | |||
| 3 | * calendar/diary-lib.el (diary-included-files): New variable. | 6 | * calendar/diary-lib.el (diary-included-files): New variable. |
| 4 | (diary-list-entries): Maybe initialize diary-included-files. | 7 | (diary-list-entries): Maybe initialize diary-included-files. |
| 5 | (diary-include-other-diary-files): Append to diary-included-files. | 8 | (diary-include-other-diary-files): Append to diary-included-files. |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 83b49e91e76..46926050362 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -187,11 +187,12 @@ you will probably also want to add `diary-mark-included-diary-files' to | |||
| 187 | 187 | ||
| 188 | (setq diary-display-function 'diary-fancy-display) | 188 | (setq diary-display-function 'diary-fancy-display) |
| 189 | (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files) | 189 | (add-hook 'diary-list-entries-hook 'diary-include-other-diary-files) |
| 190 | (add-hook 'diary-list-entries-hook 'diary-sort-entries) | 190 | (add-hook 'diary-list-entries-hook 'diary-sort-entries t) |
| 191 | 191 | ||
| 192 | in your `.emacs' file to cause the fancy diary buffer to be displayed with | 192 | in your `.emacs' file to cause the fancy diary buffer to be displayed with |
| 193 | diary entries from various included files, each day's entries sorted into | 193 | diary entries from various included files, each day's entries sorted into |
| 194 | lexicographic order." | 194 | lexicographic order. Note how the sort function is placed last, |
| 195 | so that it can sort the entries included from other files." | ||
| 195 | :type 'hook | 196 | :type 'hook |
| 196 | :options '(diary-include-other-diary-files diary-sort-entries) | 197 | :options '(diary-include-other-diary-files diary-sort-entries) |
| 197 | :group 'diary) | 198 | :group 'diary) |
| @@ -1584,7 +1585,10 @@ be used instead of a colon (:) to separate the hour and minute parts." | |||
| 1584 | (string-lessp ts1 ts2))))))) | 1585 | (string-lessp ts1 ts2))))))) |
| 1585 | 1586 | ||
| 1586 | (defun diary-sort-entries () | 1587 | (defun diary-sort-entries () |
| 1587 | "Sort the list of diary entries by time of day." | 1588 | "Sort the list of diary entries by time of day. |
| 1589 | If you add this function to `diary-list-entries-hook', it should | ||
| 1590 | be the last item in the hook, in case earlier items add diary | ||
| 1591 | entries, or change the order." | ||
| 1588 | (setq diary-entries-list (sort diary-entries-list 'diary-entry-compare))) | 1592 | (setq diary-entries-list (sort diary-entries-list 'diary-entry-compare))) |
| 1589 | 1593 | ||
| 1590 | (define-obsolete-function-alias 'sort-diary-entries 'diary-sort-entries "23.1") | 1594 | (define-obsolete-function-alias 'sort-diary-entries 'diary-sort-entries "23.1") |