From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pascal Bourguignon Newsgroups: gmane.emacs.help Subject: Re: How to bind keys in emacs? Date: Sat, 24 Dec 2005 08:11:05 +0100 Organization: Informatimago Message-ID: <87acerc6ly.fsf@thalassa.informatimago.com> References: <1135323536.675947.257490@o13g2000cwo.googlegroups.com> <87psnodxvh.fsf@thalassa.informatimago.com> <8764pfe6ku.fsf@thalassa.informatimago.com> <%I5rf.9205$3Z.4241@newsread1.news.atl.earthlink.net> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1135408418 7660 80.91.229.2 (24 Dec 2005 07:13:38 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 24 Dec 2005 07:13:38 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Dec 24 08:13:34 2005 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Eq3av-0004V3-LU for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Dec 2005 08:13:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Eq3c0-0002It-SF for geh-help-gnu-emacs@m.gmane.org; Sat, 24 Dec 2005 02:14:41 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!zen.net.uk!demorgan.zen.co.uk!195.40.4.120.MISMATCH!easynet-quince!easynet.net!easynet-post2!not-for-mail Original-Newsgroups: gnu.emacs.help Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:8IxIMVgSqZxRXxXgeCbFjqrMZM0= Original-Lines: 50 Original-NNTP-Posting-Host: 62.93.174.79 Original-X-Trace: DXC=ni]HjX@mj1X_0k@Ri<7S<_EY<>`XO4V7]>Uh List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:32200 Archived-At: "B. T. Raven" writes: >> > Or 'iconify-or-deiconify-frame for w32, apparently, instead of >> > 'suspend-emacs. I don't know why this is. Do both work under Linux? Both work under Linux. This is not the discrimant. >> Why do you think I wrote: The discriminant is: >> (if window-system >> (iconify-or-deiconify-frame) >> (suspend-emacs)) >> >> ? > > Why do you think I wrote "I don't know why this is": > ?? > In fact, when I read your code I really didn't understand it. Since the OP wrote f5 for both save-buffer and iconify or suspend, I playfully implemented the non deterministic choice: (random 2) returns 0 or 1 aleatorily, and oddp test for 1. (I could have used evenp to test for 0 as well). > All I did > was identify what was happening with C-z on my (w32) machine. Also I read > that suspend-emacs "makes no sense" in a window environment. Now I know > that window-system can take a value of 'x in addition to 'w32 or nil > (terminal?). > I suppose I was flummoxed by the (to my mind) infelicitous > (oddp (random... statement. I don't have oddp or evenp here. You should add (require 'cl) to your ~/.emacs > Would the op > have learned something if she had obediently added your code to her .emacs > or would he (!) just have seen "Debugger entered--Lisp error: > (void-function oddp)?" Anyway (as we all know) every tyro (randomly male > or female) has certain indeterminate needs. -- __Pascal Bourguignon__ http://www.informatimago.com/ In a World without Walls and Fences, who needs Windows and Gates?