[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to bind keys in emacs?
From: |
Pascal Bourguignon |
Subject: |
Re: How to bind keys in emacs? |
Date: |
Sat, 24 Dec 2005 08:11:05 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
"B. T. Raven" <ecinmn@peoplepc.com> 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?