Function: diary-check-diary-file

diary-check-diary-file is a byte-compiled function defined in diary-lib.el.gz.

Signature

(diary-check-diary-file)

Documentation

Check that the file specified by diary-file exists and is readable.

If so, return the expanded file name, otherwise signal an error.

Source Code

;; Defined in /usr/src/emacs/lisp/calendar/diary-lib.el.gz
;;; More user options in calendar.el, holidays.el.


(defun diary-check-diary-file ()
  "Check that the file specified by `diary-file' exists and is readable.
If so, return the expanded file name, otherwise signal an error."
  (if (and diary-file (file-exists-p diary-file))
      (if (file-readable-p diary-file)
          diary-file
        (error "Diary file `%s' is not readable" diary-file))
    (error "Diary file `%s' does not exist" diary-file)))