From bdd1870b47e351dadc32b6e9d7dd64a49f653944 Mon Sep 17 00:00:00 2001 From: Chong Yidong Date: Wed, 20 Jan 2010 12:14:37 -0500 Subject: [PATCH] * lisp/term.el (term-send-raw-meta): Revert 2009-12-04 change (Bug#5330). --- lisp/ChangeLog | 4 ++++ lisp/term.el | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 13445189a10..88e77852020 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2010-01-20 Chong Yidong + + * term.el (term-send-raw-meta): Revert 2009-12-04 change (Bug#5330). + 2010-01-20 Glenn Morris * indent.el (tab-always-indent): Fix custom-type. diff --git a/lisp/term.el b/lisp/term.el index a619ed6ad66..7cb364af622 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -1208,8 +1208,17 @@ without any interpretation." (defun term-send-raw-meta () (interactive) - (let* ((keys (this-command-keys)) - (char (aref keys (1- (length keys))))) + (let ((char last-input-event)) + (when (symbolp last-input-event) + ;; Convert `return' to C-m, etc. + (let ((tmp (get char 'event-symbol-elements))) + (when tmp + (setq char (car tmp))) + (when (symbolp char) + (setq tmp (get char 'ascii-character)) + (when tmp + (setq char tmp))))) + (setq char (event-basic-type char)) (term-send-raw-string (if (and (numberp char) (> char 127) (< char 256)) -- 2.11.4.GIT