unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Stephen J. Turnbull" <stephen@xemacs.org>
Subject: Portable key sequences [was: key sequences aren't specified...]
Date: Sun, 20 Nov 2005 00:48:31 +0900	[thread overview]
Message-ID: <87psowmyeo.fsf_-_@tleepslib.sk.tsukuba.ac.jp> (raw)
In-Reply-To: <m2ek5ej24n.fsf@roisin.local> (Edward O'Connor's message of "Thu, 17 Nov 2005 15:17:12 -0800")

Alan Mackenzie wrote:

    >> In fact, I figured out "[?\C-c \C-backspace]" by just such
    >> experimentation. Trouble is, this is rejected by XEmacs, and I
    >> want the specification to be portable.

As far as I know there is no portable way to express all key sequences
in all Emacsen, even of v21 or later vintage.  Even if XEmacs were
disposed to give up the regularity and readability of the vector of
lists of symbols representation, the fact remains that for at least 8
years that representation has been the one guaranteed to work for
arbitrary sequences of gestures, and only a minimum of effort has been
put into string representations.  Which string representations we
support has varied over the last few years, I believe.

>>>>> "Ted" == Edward O'Connor <hober0@gmail.com> writes:

    Ted> I should think (kbd "C-c C-DEL") would DTRT under both
    Ted> Emacsen.

Do you really mean "DEL"?  That's definitely wrong in XEmacs; `(kbd
"C-c C-<backspace>")' is the canonical way to express it (ie, that's
what would be generated by insert-kbd-macro).

Using `kbd' probably is fairly portable, but there's no guarantee that
symbols that are used in recording keyboard macros will be the same.
For example it happens to be the case that both `(kbd "C-BS")' and
`(kbd "C-backspace")' produce `[(control backspace)]' in XEmacs, but
it could easily be true that Emacs only handles "C-BS" while XEmacs
only recognizes "C-backspace".  And "C-<backspace>" is the only thing
guaranteed to work in XEmacs.

-- 
School of Systems and Information Engineering http://turnbull.sk.tsukuba.ac.jp
University of Tsukuba                    Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
               Ask not how you can "do" free software business;
              ask what your business can "do for" free software.

  reply	other threads:[~2005-11-19 15:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-17 22:29 Rant: key sequences aren't specified in the elisp manual Alan Mackenzie
2005-11-17 23:17 ` Edward O'Connor
2005-11-19 15:48   ` Stephen J. Turnbull [this message]
2005-11-20 17:07     ` Portable key sequences Stefan Monnier
2005-11-17 23:19 ` Rant: key sequences aren't specified in the elisp manual Lennart Borgman
2005-11-17 23:19 ` Kevin Rodgers
2005-11-17 23:30   ` Drew Adams
2005-11-19 23:26 ` Richard M. Stallman
2005-11-27  0:31 ` Richard Stallman
2005-12-11  5:03 ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87psowmyeo.fsf_-_@tleepslib.sk.tsukuba.ac.jp \
    --to=stephen@xemacs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).