From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: Sendmail/Mac: initialize correctly [patch] Date: Mon, 26 Dec 2005 18:00:14 -0600 (CST) Message-ID: <200512270000.jBR00Ex12402@raven.dms.auburn.edu> References: NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1135641803 32699 80.91.229.2 (27 Dec 2005 00:03:23 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 27 Dec 2005 00:03:23 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 27 01:03:21 2005 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Er2JE-0002WH-9p for ged-emacs-devel@m.gmane.org; Tue, 27 Dec 2005 01:03:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Er2KR-00057Y-Bt for ged-emacs-devel@m.gmane.org; Mon, 26 Dec 2005 19:04:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Er2Jh-000562-0K for emacs-devel@gnu.org; Mon, 26 Dec 2005 19:03:49 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Er2Jc-00053g-5h for emacs-devel@gnu.org; Mon, 26 Dec 2005 19:03:47 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Er2Jb-00053Z-P4 for emacs-devel@gnu.org; Mon, 26 Dec 2005 19:03:44 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Er2JV-0007Of-H7 for emacs-devel@gnu.org; Mon, 26 Dec 2005 19:03:37 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.13.3+Sun/8.13.3) with ESMTP id jBR02KQ2019879; Mon, 26 Dec 2005 18:02:21 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id jBR00Ex12402; Mon, 26 Dec 2005 18:00:14 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: david.reitter@gmail.com In-reply-to: (message from David Reitter on Mon, 26 Dec 2005 12:26:41 +0100) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.1 (manatee.dms.auburn.edu [131.204.53.104]); Mon, 26 Dec 2005 18:02:21 -0600 (CST) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:48397 Archived-At: I believe that the alternative solution given by the two patches below should work. It autoloads the standard-value property, which then becomes available for `custom-reevaluate-setting'. It has the advantage of not making the standard-value expression, which is user visible through "Show initial Lisp expression", more complex. It has the disadvantage of duplicating this expression in the source code, but the two occurrences are close together in the same file, so it would be easy to update both at once should it be changed. It would probably be possible to write a macro that writes the two autoloads at once, so that there would be only one expression to update. However, if send-mail-function is the only instance, that is probably not worth the trouble. Of course, if you try out the patch, you have to make sure to update your loaddefs properly. Note that tex-dvi-view-command solves the same problem by allowing the value to be any Lisp expression. Then it evaluates that expression at run time. But that seems to make things more complex for the user in the Custom buffer. Here are the patches: ===File ~/sendmail-diff===================================== *** sendmail.el 09 Dec 2005 17:35:30 -0600 1.299 --- sendmail.el 26 Dec 2005 17:08:01 -0600 *************** *** 123,128 **** --- 123,137 ---- :type 'regexp :group 'sendmail) + ;; Prevent problems with `window-system' not having the correct value + ;; when loaddefs.el is loaded. `custom-reevaluate-setting' needs the + ;; standard value. + ;;;###autoload + (put 'send-mail-function 'standard-value + '((if (and window-system (memq system-type '(darwin windows-nt))) + 'mailclient-send-it + 'sendmail-send-it))) + ;; Useful to set in site-init.el ;;;###autoload (defcustom send-mail-function ============================================================ ===File ~/startup-diff====================================== *** startup.el 12 Dec 2005 20:44:32 -0600 1.391 --- startup.el 26 Dec 2005 17:13:52 -0600 *************** *** 776,781 **** --- 776,782 ---- (custom-reevaluate-setting 'mouse-wheel-down-event) (custom-reevaluate-setting 'mouse-wheel-up-event) (custom-reevaluate-setting 'file-name-shadow-mode) + (custom-reevaluate-setting 'send-mail-function) ;; Register default TTY colors for the case the terminal hasn't a ;; terminal init file. ============================================================