aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Ingebrigtsen2019-06-19 23:10:04 +0200
committerLars Ingebrigtsen2019-06-19 23:10:04 +0200
commit2a6dca26ef5b4d992f4aac6fd3511036f393aa11 (patch)
treeaa74fe6002a668eaa6d92dbfea9d690da71596b7
parent20164ad93b48a72d57fbfc8a5acf7765a030f6a3 (diff)
downloademacs-2a6dca26ef5b4d992f4aac6fd3511036f393aa11.tar.gz
emacs-2a6dca26ef5b4d992f4aac6fd3511036f393aa11.zip
Remove XEmacs compat code from timeclock.el
* lisp/calendar/timeclock.el (timeclock-completing-read) (timeclock-ask-for-project, timeclock-ask-for-reason): Remove XEmacs compat code.
-rw-r--r--lisp/calendar/timeclock.el16
1 files changed, 6 insertions, 10 deletions
diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el
index a896df5e57c..825de487dcd 100644
--- a/lisp/calendar/timeclock.el
+++ b/lisp/calendar/timeclock.el
@@ -586,23 +586,20 @@ OLD-DEFAULT hours are set for every day that has no number indicated."
586(defvar timeclock-last-project nil) 586(defvar timeclock-last-project nil)
587 587
588(defun timeclock-completing-read (prompt alist &optional default) 588(defun timeclock-completing-read (prompt alist &optional default)
589 "A version of `completing-read' that works on both Emacs and XEmacs. 589 "A version of `completing-read.
590PROMPT, ALIST and DEFAULT are used for the PROMPT, COLLECTION and DEF 590PROMPT, ALIST and DEFAULT are used for the PROMPT, COLLECTION and DEF
591arguments of `completing-read'." 591arguments of `completing-read'."
592 (if (featurep 'xemacs) 592 (declare (obsolete completing-read "27.1"))
593 (let ((str (completing-read prompt alist))) 593 (completing-read prompt alist nil nil nil nil default))
594 (if (or (null str) (zerop (length str)))
595 default
596 str))
597 (completing-read prompt alist nil nil nil nil default)))
598 594
599(defun timeclock-ask-for-project () 595(defun timeclock-ask-for-project ()
600 "Ask the user for the project they are clocking into." 596 "Ask the user for the project they are clocking into."
601 (timeclock-completing-read 597 (completing-read
602 (format "Clock into which project (default %s): " 598 (format "Clock into which project (default %s): "
603 (or timeclock-last-project 599 (or timeclock-last-project
604 (car timeclock-project-list))) 600 (car timeclock-project-list)))
605 timeclock-project-list 601 timeclock-project-list
602 nil nil nil nil
606 (or timeclock-last-project 603 (or timeclock-last-project
607 (car timeclock-project-list)))) 604 (car timeclock-project-list))))
608 605
@@ -610,8 +607,7 @@ arguments of `completing-read'."
610 607
611(defun timeclock-ask-for-reason () 608(defun timeclock-ask-for-reason ()
612 "Ask the user for the reason they are clocking out." 609 "Ask the user for the reason they are clocking out."
613 (timeclock-completing-read "Reason for clocking out: " 610 (completing-read "Reason for clocking out: " timeclock-reason-list))
614 timeclock-reason-list))
615 611
616(define-obsolete-function-alias 'timeclock-update-modeline 612(define-obsolete-function-alias 'timeclock-update-modeline
617 'timeclock-update-mode-line "24.3") 613 'timeclock-update-mode-line "24.3")