]> git.eshelyaron.com Git - emacs.git/commitdiff
Drop support for deprecated (since 23.1) forms of diary-display-function
authorGlenn Morris <rgm@gnu.org>
Sat, 11 Oct 2014 02:54:11 +0000 (19:54 -0700)
committerGlenn Morris <rgm@gnu.org>
Sat, 11 Oct 2014 02:54:11 +0000 (19:54 -0700)
* lisp/calendar/diary-lib.el (diary-display-function):
Drop support for deprecated nil and list forms.
(diary-list-entries): Update for the above.

* lisp/calendar/cal-x.el (calendar-dedicate-diary): Simplify accordingly.

etc/NEWS
lisp/ChangeLog
lisp/calendar/cal-x.el
lisp/calendar/diary-lib.el

index 04de67e9365251d073df69e1ba7727568f7e81c6..1d1dd98993b2ad22d98bdd5c58dd1f636084c5e0 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -169,6 +169,8 @@ The remainder were:
 
 **** Variables `european-calendar-style', `diary-face', `hebrew-holidays-{1,4}'.
 
+**** The nil and list forms of `diary-display-function'.
+
 ** New ERT function `ert-summarize-tests-batch-and-exit'.
 
 ---
index 3a30a87b59592bcab7e9fafc9e38eb77634f873b..f3ea27c9642e1ac4b250ee836188476b60be762b 100644 (file)
@@ -1,3 +1,10 @@
+2014-10-11  Glenn Morris  <rgm@gnu.org>
+
+       * calendar/diary-lib.el (diary-display-function):
+       Drop support for deprecated nil and list forms.
+       (diary-list-entries): Update for the above.
+       * calendar/cal-x.el (calendar-dedicate-diary): Simplify accordingly.
+
 2014-10-10  Leo Liu  <sdl.web@gmail.com>
 
        * window.el (temp-buffer-window-show): Make BUFFER a required arg.
index e510a513dcd65e6b2ff60f942c88a3822d369abd..1ed2fa4bbb06eb31e79a2fb2b78b8382a6d287f4 100644 (file)
@@ -93,9 +93,7 @@ Runs `calendar-after-frame-setup-hook', selects frame, iconifies if needed."
   "Display and dedicate the window associated with the diary buffer."
   (set-window-dedicated-p
    (display-buffer
-    (if (if (listp diary-display-function)
-            (memq 'diary-fancy-display diary-display-function)
-          (eq diary-display-function 'diary-fancy-display))
+    (if (eq diary-display-function 'diary-fancy-display)
         (progn
           ;; If there are no diary entries, there won't be a buffer
           ;; to dedicate, so make a basic one.
index 954cb5102bfce0d2c33d155225c789fffe0b82f3..39ba6f4617e4c4ae52e34302153c63812f7f6cc1 100644 (file)
@@ -159,11 +159,6 @@ Used for example by the appointment package - see `appt-activate'."
   "Function used to display the diary.
 The two standard options are `diary-fancy-display' and `diary-simple-display'.
 
-For historical reasons, `nil' is the same as `diary-simple-display'
-\(so you must use `ignore' for no display).  Also for historical
-reasons, this variable can be a list of functions to run.  These
-uses are not recommended and may be removed at some point.
-
 When this function is called, the variable `diary-entries-list'
 is a list, in order by date, of all relevant diary entries in the
 form of ((MONTH DAY YEAR) STRING), where string is the diary
@@ -172,9 +167,8 @@ produce a different buffer for display (perhaps combined with
 holidays), or hard copy output."
   :type '(choice (const diary-fancy-display :tag "Fancy display")
                  (const diary-simple-display :tag "Basic display")
-                 (const ignore :tag "No display")
-                 (const nil :tag "Obsolete way to choose basic display")
-                 (hook :tag "Obsolete form with list of display functions"))
+                 (const :tag "No display" ignore)
+                 (function :tag "User-specified function"))
   :initialize 'custom-initialize-default
   :set 'diary-set-maybe-redraw
   :version "23.2"                       ; simple->fancy
@@ -867,12 +861,7 @@ LIST-ONLY is non-nil, in which case it just returns the list."
                                   'display-buffer-in-previous-window
                                   (copy-sequence
                                    (car display-buffer-fallback-action))))))
-                      (if (and diary-display-function
-                               (listp diary-display-function))
-                          ;; Backwards compatibility.
-                          (run-hooks 'diary-display-function)
-                        (funcall (or diary-display-function
-                                     'diary-simple-display)))))
+                      (funcall diary-display-function)))
                   (run-hooks 'diary-hook)))))
         (and temp-buff (buffer-name temp-buff) (kill-buffer temp-buff)))
       (or d-incp (message "Preparing diary...done"))