changeset 106923:200d1ac9090a

* lisp/term.el (term-send-raw-meta): Revert 2009-12-04 change (Bug#5330).
author Chong Yidong <cyd@stupidchicken.com>
date Wed, 20 Jan 2010 12:14:37 -0500
parents 6657954b1aa2
children e394375cf1da 61b4d7e04828 1b97672e92c5
files lisp/ChangeLog lisp/term.el
diffstat 2 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Jan 20 11:42:50 2010 -0500
+++ b/lisp/ChangeLog	Wed Jan 20 12:14:37 2010 -0500
@@ -1,3 +1,7 @@
+2010-01-20  Chong Yidong  <cyd@stupidchicken.com>
+
+	* term.el (term-send-raw-meta): Revert 2009-12-04 change (Bug#5330).
+
 2010-01-20  Glenn Morris  <rgm@gnu.org>
 
 	* indent.el (tab-always-indent): Fix custom-type.
--- a/lisp/term.el	Wed Jan 20 11:42:50 2010 -0500
+++ b/lisp/term.el	Wed Jan 20 12:14:37 2010 -0500
@@ -1208,8 +1208,17 @@
 
 (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))