unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* return key in keyboard macros
@ 2003-10-05 12:18 Roland Winkler
  2003-10-05 20:29 ` Stefan Monnier
  2003-10-06 11:21 ` Joakim Hove
  0 siblings, 2 replies; 3+ messages in thread
From: Roland Winkler @ 2003-10-05 12:18 UTC (permalink / raw)


I am having some problems with the return key when I am defining and
storing keyboard macros.

When emacs runs in its own X window, the return key is translated
into `[return]'. For example,

;; emacs in its own X window
(fset 'foo
   [return])

On the other hand "emacs -nw" translates the return
key into "\C-m". For example

;; "emacs -nw"
(fset 'bar
   "\C-m")

The problem is: "emacs -nw" cannot make use of the keyboard macro
foo because here [return] is not bound to anything. (There is no
such compatibility problem with the keyboard macro bar.)

Can I enforce emacs to generate keyboard macros that will work both
with "emacs -nw" and with emacs in its own X window?

Thanks a lot,

Roland


PS  I am using GNU emacs 21.2.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: return key in keyboard macros
  2003-10-05 12:18 return key in keyboard macros Roland Winkler
@ 2003-10-05 20:29 ` Stefan Monnier
  2003-10-06 11:21 ` Joakim Hove
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2003-10-05 20:29 UTC (permalink / raw)


> I am having some problems with the return key when I am defining and
> storing keyboard macros.

Hmm...indeed Emacs uses untranslated events when saving such kbd-macros,
so you get [return] rather than ?\C-m under X and you get
some strange escape sequence rather than [down] when using
cursor keys in a text terminal.

You might want to report this as a bug, although it's probably going to be
difficult to fix (although an "easy" fix would be to manually pass the
macro through function-key-map and key-translation-map, but doing it
right is difficult).


        Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: return key in keyboard macros
  2003-10-05 12:18 return key in keyboard macros Roland Winkler
  2003-10-05 20:29 ` Stefan Monnier
@ 2003-10-06 11:21 ` Joakim Hove
  1 sibling, 0 replies; 3+ messages in thread
From: Joakim Hove @ 2003-10-06 11:21 UTC (permalink / raw)



Roland Winkler <Roland.Winkler@physik.uni-erlangen.de> writes:

> I am having some problems with the return key when I am defining and
> storing keyboard macros.

When your macros are worthy of reuse between sessions I would
recommend writing proper lisp functions instead.

Regards

Joakim

-- 
  /--------------------------------------------------------------------\
 / Joakim Hove  / hove@bccs.no  /  (55 5) 84076       |                 \
 | Unifob AS, Avdeling for Beregningsvitenskap (BCCS) | Stabburveien 18 |
 | CMU                                                | 5231 Paradis    |
 \ Thormøhlensgt.55, 5020 Bergen.                     | 55 91 28 18     /
  \--------------------------------------------------------------------/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-10-06 11:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-05 12:18 return key in keyboard macros Roland Winkler
2003-10-05 20:29 ` Stefan Monnier
2003-10-06 11:21 ` Joakim Hove

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).