[Top][All Lists]

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

Re: [h-e-w] EOF in .emacs

From: Dr Francis J. Wright
Subject: Re: [h-e-w] EOF in .emacs
Date: Mon, 2 Sep 2002 13:44:57 +0100

From: "Jeff Rancier" <address@hidden>
To: "Jde-List" <address@hidden>; "Emacs Help (Windows)"
Sent: Wednesday, August 28, 2002 6:28 PM
Subject: [h-e-w] EOF in .emacs

> I customized (using customize) my JDEbug keys, assigning stepping methods
> my functions keys.  Here is what resulted in my .emacs file:
>  '(jde-bug-key-bindings (quote (("[f6]" . jde-bug-step-over) ("[? ? ?]"
> jde-bug-step-over) ("[f7]" . jde-bug-step-into) ("[? ? ?]" .
> jde-bug-step-into) ("[f8]" . jde-bug-step-into-all) ("[? ? ?]" .
> jde-bug-step-into-all) ("[f9]" . jde-bug-step-out) ("[? ? ?]" .
> jde-bug-step-out) ("[? ? ?]" . jde-bug-continue) ("[f10]" .
> jde-bug-toggle-breakpoint) ("[? ? ?]" . jde-bug-toggle-breakpoint)
> ("[f11]" . jbr-jde-bug-kill-debugger))))
> The unprintable characters, e.g. in jde-bug-step-over are:
>     ?^C?^Z?^S
> First of all I will assume that the question mark treats the next two
> characters as a single character, hence, the ^C is not a carrot and a
> capital 'C', but, control-C, or 0x03.  The ^Z is 0x1A, the ^S a 0x13, etc.
> The The only problem with the ^Z, embedded is that now I've placed an EOF
> marker in the text before the *real* EOF.  Is there a different
> representation I can use that will store the key binding in ASCII, not
> binary, so when I use other non-Emacs tools, e.g. CVS, the file won't end
> prematurely?

If it takes two presses of the cursor key to move over ^C then it is the two
characters ^ and C; if it takes only one press then it is a printable
representation of the single control character ^C.  (The ? is irrelevant to
this distinction, except that its presence only makes sense syntactically if
^C is a single character.)

You should be able to replace by hand any occurrence of the single control
character ^Z by an equivalent read syntax in your .emacs.  The only snag I
can think of in doing this is that it will probably get overwritten next
time you save that customization.  The most appropriate read syntax to use
is probably ?\^Z (four ASCII characters) instead of ?^Z (two ASCII
characters).  The read syntaxes are described in the section headed
"Character Type" in the Emacs Lisp Manual; here is probably the most
relevant paragraph:

   Control characters may be represented using yet another read syntax.
This consists of a question mark followed by a backslash, caret, and the
corresponding non-control character, in either upper or lower case.  For
example, both `?\^I' and `?\^i' are valid read syntax for the character
`C-i', the character whose value is 9.


reply via email to

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