[Top][All Lists]

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

Re: An unusual problem?

From: Johan Bockgård
Subject: Re: An unusual problem?
Date: Sat, 28 May 2005 23:50:45 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

John Taylor <address@hidden> writes:

> address@hidden (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? ")
  ;; Unconditionally return t for `kill-emacs-query-functions'.

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)


(add-hook 'kill-emacs-query-functions (lambda () (timeclock-query-out) t))

Johan Bockgård

reply via email to

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