From: bojohan+news@dd.chalmers.se (Johan Bockgård)
Subject: Re: An unusual problem?
Date: Sat, 28 May 2005 23:50:45 +0200 [thread overview]
Message-ID: <yoij64x3yq8a.fsf@linus002.dd.chalmers.se> (raw)
In-Reply-To: <m3y89z6c1v.fsf@jt319.kings.cam.ac.uk>
John Taylor <jt319@cam.ac.uk> writes:
> bojohan+news@dd.chalmers.se (Johan Bockgård) writes:
>> Use C-h v (describe-variable).
>>
>> The docstring says:
>>
>> Functions to call with no arguments to query about killing Emacs.
>> If any of these functions returns nil, killing Emacs is cancelled.
>> `save-buffers-kill-emacs' (C-x C-c) calls these functions, but
>> `kill-emacs', the low level primitive, does not. See also
>> `kill-emacs-hook'.
>>
>
> All I get is this:
> 'kill-emacs-query-functions's value is
> (timeclock-query-out)'
>
> What do I need to do - change the variable to 't' somewhere?!?
In the development version of emacs the function's definition is this:
(defun timeclock-query-out ()
"Ask the user whether to clock out.
This is a useful function for adding to `kill-emacs-query-functions'."
(and (equal (car timeclock-last-event) "i")
(y-or-n-p "You're currently clocking time, clock out? ")
(timeclock-out))
;; Unconditionally return t for `kill-emacs-query-functions'.
t)
In your version it may return nil.
You could patch the function or wrap it in a function that always
returns `t' and add that to kill-emacs-query-functions instead.
That is, replace
(add-hook 'kill-emacs-query-functions 'timeclock-query-out)
with
(add-hook 'kill-emacs-query-functions (lambda () (timeclock-query-out) t))
--
Johan Bockgård
prev parent reply other threads:[~2005-05-28 21:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-25 0:05 John Taylor
2005-05-25 5:45 ` Glyn Millington
2005-05-26 23:36 ` John Taylor
2005-05-27 0:24 ` Johan Bockgård
2005-05-28 0:23 ` John Taylor
2005-05-28 0:34 ` Johan Bockgård
2005-05-28 7:32 ` John Taylor
2005-05-28 21:50 ` Johan Bockgård [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=yoij64x3yq8a.fsf@linus002.dd.chalmers.se \
--to=bojohan+news@dd.chalmers.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).