diff options
| author | Glenn Morris | 2015-06-15 20:46:01 -0400 |
|---|---|---|
| committer | Glenn Morris | 2015-06-15 20:46:01 -0400 |
| commit | 6ebbc2f69825e9fdc5a5658047469ad541cf3dce (patch) | |
| tree | 2b5c9c2626ad597ce8c8904f3026cfd4904ea976 | |
| parent | c57b0e4b243a7a4a92549e833c7266b0be39f906 (diff) | |
| download | emacs-6ebbc2f69825e9fdc5a5658047469ad541cf3dce.tar.gz emacs-6ebbc2f69825e9fdc5a5658047469ad541cf3dce.zip | |
* lisp/calendar/calendar.el (diary-file): Use locate-user-emacs-file.
* doc/emacs/calendar.texi (Diary, Format of Diary File):
Update for above diary-file change.
: * etc/NEWS: Mention this.
| -rw-r--r-- | doc/emacs/calendar.texi | 14 | ||||
| -rw-r--r-- | etc/NEWS | 3 | ||||
| -rw-r--r-- | lisp/calendar/calendar.el | 3 |
3 files changed, 12 insertions, 8 deletions
diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi index 03a484b338d..93671364a88 100644 --- a/doc/emacs/calendar.texi +++ b/doc/emacs/calendar.texi | |||
| @@ -925,8 +925,9 @@ events for today, for the immediate future, or for any specified | |||
| 925 | date. | 925 | date. |
| 926 | 926 | ||
| 927 | The name of the diary file is specified by the variable | 927 | The name of the diary file is specified by the variable |
| 928 | @code{diary-file}; @file{~/diary} is the default. Here's an example | 928 | @code{diary-file}. The default is @file{~/.emacs.d/diary}, though for |
| 929 | showing what that file looks like: | 929 | compatibility with older versions Emacs will use @file{~/diary} if it |
| 930 | exists. Here's an example showing what the file looks like: | ||
| 930 | 931 | ||
| 931 | @example | 932 | @example |
| 932 | 12/22/2012 Twentieth wedding anniversary!! | 933 | 12/22/2012 Twentieth wedding anniversary!! |
| @@ -1068,11 +1069,10 @@ diary-mail-entries}. A prefix argument specifies how many days | |||
| 1068 | @vindex diary-file | 1069 | @vindex diary-file |
| 1069 | Your @dfn{diary file} is a file that records events associated with | 1070 | Your @dfn{diary file} is a file that records events associated with |
| 1070 | particular dates. The name of the diary file is specified by the | 1071 | particular dates. The name of the diary file is specified by the |
| 1071 | variable @code{diary-file}; @file{~/diary} is the default. The | 1072 | variable @code{diary-file}. The @code{calendar} utility program |
| 1072 | @code{calendar} utility program supports a subset of the format allowed | 1073 | supports a subset of the format allowed by the Emacs diary facilities, |
| 1073 | by the Emacs diary facilities, so you can use that utility to view the | 1074 | so you can use that utility to view the diary file, with reasonable |
| 1074 | diary file, with reasonable results aside from the entries it cannot | 1075 | results aside from the entries it cannot understand. |
| 1075 | understand. | ||
| 1076 | 1076 | ||
| 1077 | Each entry in the diary file describes one event and consists of one | 1077 | Each entry in the diary file describes one event and consists of one |
| 1078 | or more lines. An entry always begins with a date specification at the | 1078 | or more lines. An entry always begins with a date specification at the |
| @@ -504,6 +504,9 @@ hash-table and arrays. All functions are prefixed with "map-". | |||
| 504 | ** Calendar and diary | 504 | ** Calendar and diary |
| 505 | 505 | ||
| 506 | +++ | 506 | +++ |
| 507 | *** The default `diary-file' is now located in .emacs.d. | ||
| 508 | |||
| 509 | +++ | ||
| 507 | *** New commands to insert diary entries with Chinese dates: | 510 | *** New commands to insert diary entries with Chinese dates: |
| 508 | `diary-chinese-insert-anniversary-entry' `diary-chinese-insert-entry' | 511 | `diary-chinese-insert-anniversary-entry' `diary-chinese-insert-entry' |
| 509 | `diary-chinese-insert-monthly-entry', `diary-chinese-insert-yearly-entry'. | 512 | `diary-chinese-insert-monthly-entry', `diary-chinese-insert-yearly-entry'. |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index 233d2cfcd22..fd2580e385e 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -566,7 +566,7 @@ See also `calendar-intermonth-header'." | |||
| 566 | 'font-lock-face 'font-lock-function-name-face))) | 566 | 'font-lock-face 'font-lock-function-name-face))) |
| 567 | :version "23.1") | 567 | :version "23.1") |
| 568 | 568 | ||
| 569 | (defcustom diary-file "~/diary" | 569 | (defcustom diary-file (locate-user-emacs-file "diary" "diary") |
| 570 | "Name of the file in which one's personal diary of dates is kept. | 570 | "Name of the file in which one's personal diary of dates is kept. |
| 571 | 571 | ||
| 572 | The file's entries are lines beginning with any of the forms | 572 | The file's entries are lines beginning with any of the forms |
| @@ -653,6 +653,7 @@ documentation of these hooks for details. | |||
| 653 | 653 | ||
| 654 | Diary files can contain directives to include the contents of other files; for | 654 | Diary files can contain directives to include the contents of other files; for |
| 655 | details, see the documentation for the variable `diary-list-entries-hook'." | 655 | details, see the documentation for the variable `diary-list-entries-hook'." |
| 656 | :version "25.1" ; ~/diary -> locate-user-emacs-file | ||
| 656 | :type 'file | 657 | :type 'file |
| 657 | :group 'diary) | 658 | :group 'diary) |
| 658 | 659 | ||