emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 2065ab5562e: Fix defcustoms in timeclock.el


From: Stefan Kangas
Subject: emacs-29 2065ab5562e: Fix defcustoms in timeclock.el
Date: Tue, 3 Oct 2023 08:36:45 -0400 (EDT)

branch: emacs-29
commit 2065ab5562e87bc5f4900f60459597356afe22df
Author: Mauro Aranda <maurooaranda@gmail.com>
Commit: Stefan Kangas <stefankangas@gmail.com>

    Fix defcustoms in timeclock.el
    
    * lisp/calendar/timeclock.el (timeclock-get-project-function)
    (timeclock-get-reason-function): Fix :type to allow nil.  (Bug#66320)
---
 lisp/calendar/timeclock.el | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el
index 0cd03c15881..7606805a99b 100644
--- a/lisp/calendar/timeclock.el
+++ b/lisp/calendar/timeclock.el
@@ -100,19 +100,21 @@ into account any discrepancy of time under-worked or 
over-worked on
 previous days.  This only affects the timeclock mode line display."
   :type 'boolean)
 
-(defcustom timeclock-get-project-function 'timeclock-ask-for-project
+(defcustom timeclock-get-project-function #'timeclock-ask-for-project
   "The function used to determine the name of the current project.
 When clocking in, and no project is specified, this function will be
 called to determine what is the current project to be worked on.
 If this variable is nil, no questions will be asked."
-  :type 'function)
+  :type '(choice (const :tag "Don't ask" nil)
+                 function))
 
-(defcustom timeclock-get-reason-function 'timeclock-ask-for-reason
+(defcustom timeclock-get-reason-function #'timeclock-ask-for-reason
   "A function used to determine the reason for clocking out.
 When clocking out, and no reason is specified, this function will be
 called to determine what is the reason.
 If this variable is nil, no questions will be asked."
-  :type 'function)
+  :type '(choice (const :tag "Don't ask" nil)
+                 function))
 
 (defcustom timeclock-get-workday-function nil
   "A function used to determine the length of today's workday.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]