aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2010-09-14 01:02:28 -0700
committerGlenn Morris2010-09-14 01:02:28 -0700
commit67ae97667d185e23a24a98f295bcf1cd9c788cb5 (patch)
tree3f2c2603b25bd63e2cdcf4581720afea76961d06 /lisp
parent0ab9cff33d60e035ff437639f62cf763610641b1 (diff)
downloademacs-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/ChangeLog3
-rw-r--r--lisp/calendar/diary-lib.el10
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 @@
12010-09-14 Glenn Morris <rgm@gnu.org> 12010-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
192in your `.emacs' file to cause the fancy diary buffer to be displayed with 192in your `.emacs' file to cause the fancy diary buffer to be displayed with
193diary entries from various included files, each day's entries sorted into 193diary entries from various included files, each day's entries sorted into
194lexicographic order." 194lexicographic order. Note how the sort function is placed last,
195so 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.
1589If you add this function to `diary-list-entries-hook', it should
1590be the last item in the hook, in case earlier items add diary
1591entries, 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")