* bug#66320: 30.0.50; timeclock.el missing choices in defcustoms
@ 2023-10-03 11:01 Mauro Aranda
2023-10-03 11:05 ` Mauro Aranda
0 siblings, 1 reply; 3+ messages in thread
From: Mauro Aranda @ 2023-10-03 11:01 UTC (permalink / raw)
To: 66320
Docstrings of timeclock-get-project-function and
timeclock-get-reason-function say their value might be nil, but
:type is just function.
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#66320: 30.0.50; timeclock.el missing choices in defcustoms
2023-10-03 11:01 bug#66320: 30.0.50; timeclock.el missing choices in defcustoms Mauro Aranda
@ 2023-10-03 11:05 ` Mauro Aranda
2023-10-03 12:37 ` Stefan Kangas
0 siblings, 1 reply; 3+ messages in thread
From: Mauro Aranda @ 2023-10-03 11:05 UTC (permalink / raw)
To: 66320
[-- Attachment #1: Type: text/plain, Size: 39 bytes --]
tags 66320 patch
quit
Patch attached.
[-- Attachment #2: 0001-Fix-defcustoms-in-timeclock.el-Bug-66320.patch --]
[-- Type: text/x-patch, Size: 1444 bytes --]
From c30194ac08b45d1d352c5078db0668fed29289d8 Mon Sep 17 00:00:00 2001
From: Mauro Aranda <maurooaranda@gmail.com>
Date: Tue, 3 Oct 2023 08:03:47 -0300
Subject: [PATCH] Fix defcustoms in timeclock.el (Bug#66320)
* lisp/calendar/timeclock.el (timeclock-get-project-function)
(timeclock-get-reason-function): Allow nil.
---
lisp/calendar/timeclock.el | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/lisp/calendar/timeclock.el b/lisp/calendar/timeclock.el
index 0cd03c15881..56f2caa3509 100644
--- a/lisp/calendar/timeclock.el
+++ b/lisp/calendar/timeclock.el
@@ -105,14 +105,16 @@ timeclock-get-project-function
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
"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.
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* bug#66320: 30.0.50; timeclock.el missing choices in defcustoms
2023-10-03 11:05 ` Mauro Aranda
@ 2023-10-03 12:37 ` Stefan Kangas
0 siblings, 0 replies; 3+ messages in thread
From: Stefan Kangas @ 2023-10-03 12:37 UTC (permalink / raw)
To: Mauro Aranda; +Cc: 66320-done
Version: 29.2
Mauro Aranda <maurooaranda@gmail.com> writes:
> Patch attached.
Thanks, installed on emacs-29 with some minor changes.
[1: 2065ab5562e]: 2023-10-03 14:36:30 +0200
Fix defcustoms in timeclock.el
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=2065ab5562e87bc5f4900f60459597356afe22df
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-10-03 12:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-03 11:01 bug#66320: 30.0.50; timeclock.el missing choices in defcustoms Mauro Aranda
2023-10-03 11:05 ` Mauro Aranda
2023-10-03 12:37 ` Stefan Kangas
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).