|
From: | Jarek Czekalski |
Subject: | Re: using command-error-function in emacspeak |
Date: | Tue, 05 Nov 2013 15:45:30 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120824 Thunderbird/15.0 |
W dniu 2013-11-05 15:07, Stefan Monnier pisze:
add-function is the to modify the behavior of a function. It can't know what `nil' represents.This is what nil represents: (defun nil-fun () nil)No, it's not. Try to (setq command-error-function #'nil-fun) to see if it's really the same as nil.
Do you mean some subtle elisp difference (which I do not see) or the way command-error-function works? Or you just caught me that I didn't include "&rest args" in nil-fun definition?
I know that (setq command-error-function 'nil-fun) changes Emacs behaviour, but this is not the case. I think the case is that
(add-function command-error-function something) ;; forgive me wrong syntax here
should do the same as (setq command-error-function something) in case when command-error-function is nil beforehand. And the latter would be equivalent to: (setq command-error-function 'nil-fun) (add-function command-error-function something) which is what I propose as a simplification of what add-function should do.Please explain, what you had in mind. I still don't understand why add-function couldn't work on nils. Could you give one counter-example?
Thanks, Jarek
[Prev in Thread] | Current Thread | [Next in Thread] |