GNU bug report logs - #2057
23.0.60; delete key and deletechar

Previous Next

Package: emacs;

Reported by: Robert Brown <robert.brown <at> gmail.com>

Date: Sun, 25 Jan 2009 23:10:04 UTC

Severity: normal

Done: Dan Nicolaescu <dann <at> ics.uci.edu>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 2057 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Robert Brown <brown <at> google.com>
To: 2057 <at> debbugs.gnu.org
Cc: emacs-pretest-bug <at> gnu.org
Subject: bug#2057: 23.0.60; delete key and deletechar
Date: Thu, 16 Apr 2009 11:10:13 -0400
I believe the following patch may be the right fix for bug 2057.  When
looking at the key sequences generated by function keys, Emacs should only
register those that generate two or more ASCII characters.

My termcap entry, xterm-color, contains "kD=\177", which means that the
delete *function* key generates code 177.

The function key mapping code in term.c incorrectly creates a translation
that maps charcter code 177 to deletechar.  The translation is incorrect
because the normal backspace/delete key on my keyboard also generates code
177.  Once the translation is set up, hitting backspace/delete causes Emacs
to delete characters to the right instead of to the left, since Emacs thinks
I'm hitting the delete *function* key.

bob

====================


--- src/term.c.~1~      2009-04-13 14:57:19.000000000 -0400
+++ src/term.c  2009-04-16 10:59:32.000000000 -0400
@@ -1410,7 +1410,7 @@
   for (i = 0; i < (sizeof (keys)/sizeof (keys[0])); i++)
     {
       char *sequence = tgetstr (keys[i].cap, address);
-      if (sequence)
+      if (sequence && strlen(sequence) > 1)
        Fdefine_key (kboard->Vinput_decode_map, build_string (sequence),
                     Fmake_vector (make_number (1),
                                   intern (keys[i].name)));




This bug report was last modified 16 years and 40 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.