]> code.delx.au - gnu-emacs/blobdiff - lisp/calendar/diary-lib.el
Dired recognize dirs when file size in human units
[gnu-emacs] / lisp / calendar / diary-lib.el
index b21fc6871447527a3388b33c74b87e52b4dd7d65..9ba4e358e38ba23faed6aaf77334b71c41393381 100644 (file)
@@ -1,6 +1,6 @@
 ;;; diary-lib.el --- diary functions
 
-;; Copyright (C) 1989-1990, 1992-1995, 2001-2015 Free Software
+;; Copyright (C) 1989-1990, 1992-1995, 2001-2016 Free Software
 ;; Foundation, Inc.
 
 ;; Author: Edward M. Reingold <reingold@cs.uiuc.edu>
@@ -296,11 +296,12 @@ Used by the function `diary-remind', a pseudo-pattern is a list of
 expressions that can involve the keywords `days' (a number), `date'
 \(a list of month, day, year), and `diary-entry' (a string)."
   :type 'sexp
+  :risky t
   :group 'diary)
 
 (defcustom diary-abbreviated-year-flag t
   "Interpret a two-digit year DD in a diary entry as either 19DD or 20DD.
-This applies to the Gregorian, Hebrew, Islamic, and Bahá'í calendars.
+This applies to the Gregorian, Hebrew, Islamic, and Baháí calendars.
 When the current century is added to a two-digit year, if the result
 is more than 50 years in the future, the previous century is assumed.
 If the result is more than 50 years in the past, the next century is assumed.
@@ -412,6 +413,7 @@ The format of the header is specified by `diary-header-line-format'."
 Only used if `diary-header-line-flag' is non-nil."
   :group 'diary
   :type 'sexp
+  :risky t
   :initialize 'custom-initialize-default
   :set 'diary-set-header
   :version "23.3")                      ; frame-width -> window-width
@@ -484,8 +486,8 @@ 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)))
+        (error "Diary file `%s' is not readable" diary-file))
+    (error "Diary file `%s' does not exist" diary-file)))
 
 ;;;###autoload
 (defun diary (&optional arg)
@@ -909,13 +911,15 @@ This is recursive; that is, included files may include other files."
                         (append diary-entries-list
                                 (diary-list-entries original-date number t)))))
             (display-warning
-             :error
+             'diary
              (format-message "Can't read included diary file %s\n"
-                            diary-file)))
+                            diary-file)
+             :error))
         (display-warning
-         :error
+         'diary
          (format-message "Can't find included diary file %s\n"
-                        diary-file)))))
+                        diary-file)
+         :error))))
   (goto-char (point-min)))
 
 (defun diary-include-other-diary-files ()
@@ -1190,7 +1194,7 @@ ensure that all relevant variables are set.
 
 \(setq diary-mail-days 3
       diary-file \"/path/to/diary.file\"
-      calendar-date-style 'european
+      calendar-date-style \\='european
       diary-mail-addr \"user@host.name\")
 
 \(diary-mail-entries)
@@ -1199,7 +1203,7 @@ ensure that all relevant variables are set.
 "
   (interactive "P")
   (if (string-equal diary-mail-addr "")
-      (user-error "You must set ‘diary-mail-addr’ to use this command")
+      (user-error "You must set `diary-mail-addr' to use this command")
     (let ((diary-display-function 'diary-fancy-display))
       (diary-list-entries (calendar-current-date) (or ndays diary-mail-days)))
     (compose-mail diary-mail-addr
@@ -1410,11 +1414,12 @@ marks.  This is intended to deal with deleted diary entries."
                         (eval (car (read-from-string sexp)))
                       (error
                        (display-warning
-                        :error
+                        'diary
                         (format "Bad diary sexp at line %d in %s:\n%s\n\
 Error: %s\n"
                                 (count-lines (point-min) (point))
-                                diary-file sexp err))
+                                diary-file sexp err)
+                        :error)
                        nil))))))
     (cond ((stringp result) result)
           ((and (consp result)
@@ -1531,7 +1536,7 @@ passed to `calendar-mark-visible-date' as MARK."
         (calendar-mark-month m y month day year color)
         (calendar-increment-month m y 1)))))
 
-;; Bahai, Hebrew, Islamic.
+;; Bahá’í, Hebrew, Islamic.
 (defun calendar-mark-complex (month day year fromabs &optional color)
   "Mark dates in the calendar conforming to MONTH DAY YEAR of some system.
 The function FROMABS converts absolute dates to the appropriate date system.
@@ -1561,7 +1566,7 @@ Optional argument COLOR is passed to `calendar-mark-visible-date' as MARK."
            (calendar-mark-visible-date
             (calendar-gregorian-from-absolute date) color)))))
 
-;; Bahai, Islamic.
+;; Bahá’í, Islamic.
 (defun calendar-mark-1 (month day year fromabs toabs &optional color)
   "Mark dates in the calendar conforming to MONTH DAY YEAR of some system.
 The function FROMABS converts absolute dates to the appropriate date system.
@@ -1659,8 +1664,8 @@ on a weekend:
       &%%(let ((dayname (calendar-day-of-week date))
                (day (calendar-extract-day date)))
            (or
-             (and (= day 21) (memq dayname '(1 2 3 4 5)))
-             (and (memq day '(19 20)) (= dayname 5)))
+             (and (= day 21) (memq dayname \\='(1 2 3 4 5)))
+             (and (memq day \\='(19 20)) (= dayname 5)))
          ) UIUC pay checks deposited
 
 A number of built-in functions are available for this type of
@@ -2529,13 +2534,9 @@ entry is found the user is asked to confirm its addition."
                 #'diary-from-outlook-rmail)
                ((memq major-mode '(gnus-summary-mode gnus-article-mode))
                 #'diary-from-outlook-gnus)
-               (t (error "Don't know how to snarf in ‘%s’" major-mode)))))
+               (t (error "Don't know how to snarf in `%s'" major-mode)))))
     (funcall func noconfirm)))
 
 (provide 'diary-lib)
 
-;; Local Variables:
-;; coding: utf-8
-;; End:
-
 ;;; diary-lib.el ends here