Commit 6ebbc2f6 authored by Glenn Morris's avatar Glenn Morris
Browse files

* 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.
parent c57b0e4b
...@@ -925,8 +925,9 @@ events for today, for the immediate future, or for any specified ...@@ -925,8 +925,9 @@ events for today, for the immediate future, or for any specified
date. date.
The name of the diary file is specified by the variable The name of the diary file is specified by the variable
@code{diary-file}; @file{~/diary} is the default. Here's an example @code{diary-file}. The default is @file{~/.emacs.d/diary}, though for
showing what that file looks like: compatibility with older versions Emacs will use @file{~/diary} if it
exists. Here's an example showing what the file looks like:
@example @example
12/22/2012 Twentieth wedding anniversary!! 12/22/2012 Twentieth wedding anniversary!!
...@@ -1068,11 +1069,10 @@ diary-mail-entries}. A prefix argument specifies how many days ...@@ -1068,11 +1069,10 @@ diary-mail-entries}. A prefix argument specifies how many days
@vindex diary-file @vindex diary-file
Your @dfn{diary file} is a file that records events associated with Your @dfn{diary file} is a file that records events associated with
particular dates. The name of the diary file is specified by the particular dates. The name of the diary file is specified by the
variable @code{diary-file}; @file{~/diary} is the default. The variable @code{diary-file}. The @code{calendar} utility program
@code{calendar} utility program supports a subset of the format allowed supports a subset of the format allowed by the Emacs diary facilities,
by the Emacs diary facilities, so you can use that utility to view the so you can use that utility to view the diary file, with reasonable
diary file, with reasonable results aside from the entries it cannot results aside from the entries it cannot understand.
understand.
Each entry in the diary file describes one event and consists of one Each entry in the diary file describes one event and consists of one
or more lines. An entry always begins with a date specification at the or more lines. An entry always begins with a date specification at the
......
...@@ -503,6 +503,9 @@ hash-table and arrays. All functions are prefixed with "map-". ...@@ -503,6 +503,9 @@ hash-table and arrays. All functions are prefixed with "map-".
** Calendar and diary ** Calendar and diary
+++
*** The default `diary-file' is now located in .emacs.d.
+++ +++
*** New commands to insert diary entries with Chinese dates: *** New commands to insert diary entries with Chinese dates:
`diary-chinese-insert-anniversary-entry' `diary-chinese-insert-entry' `diary-chinese-insert-anniversary-entry' `diary-chinese-insert-entry'
......
...@@ -566,7 +566,7 @@ See also `calendar-intermonth-header'." ...@@ -566,7 +566,7 @@ See also `calendar-intermonth-header'."
'font-lock-face 'font-lock-function-name-face))) 'font-lock-face 'font-lock-function-name-face)))
:version "23.1") :version "23.1")
(defcustom diary-file "~/diary" (defcustom diary-file (locate-user-emacs-file "diary" "diary")
"Name of the file in which one's personal diary of dates is kept. "Name of the file in which one's personal diary of dates is kept.
The file's entries are lines beginning with any of the forms The file's entries are lines beginning with any of the forms
...@@ -653,6 +653,7 @@ documentation of these hooks for details. ...@@ -653,6 +653,7 @@ documentation of these hooks for details.
Diary files can contain directives to include the contents of other files; for Diary files can contain directives to include the contents of other files; for
details, see the documentation for the variable `diary-list-entries-hook'." details, see the documentation for the variable `diary-list-entries-hook'."
:version "25.1" ; ~/diary -> locate-user-emacs-file
:type 'file :type 'file
:group 'diary) :group 'diary)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment