aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-07-12 18:25:40 +0000
committerGerd Moellmann2000-07-12 18:25:40 +0000
commit4bf4fb05c2bd126436050d00c615b28223bbc99c (patch)
tree6eaae0f837dd860e1f6f9285ad9a1622174cdd5b
parent37328bcd5373c916e86ea1c8e4435ddf09ba6e92 (diff)
downloademacs-4bf4fb05c2bd126436050d00c615b28223bbc99c.tar.gz
emacs-4bf4fb05c2bd126436050d00c615b28223bbc99c.zip
(term-send-raw-meta): Strip modifiers from the keyboard
event when deciding what to send to the terminal.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/term.el28
2 files changed, 20 insertions, 13 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8700f3bc27e..247bf61e162 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12000-07-12 Gerd Moellmann <gerd@gnu.org>
2
3 * term.el (term-send-raw-meta): Strip modifiers from the keyboard
4 event when deciding what to send to the terminal.
5
12000-07-12 Dave Love <fx@gnu.org> 62000-07-12 Dave Love <fx@gnu.org>
2 7
3 * cus-start.el: Add optional version as 4th element of specs and 8 * cus-start.el: Add optional version as 4th element of specs and
diff --git a/lisp/term.el b/lisp/term.el
index d76db38ee4e..5f68c4f1713 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1205,20 +1205,22 @@ without any interpretation."
1205 1205
1206(defun term-send-raw-meta () 1206(defun term-send-raw-meta ()
1207 (interactive) 1207 (interactive)
1208 (if (symbolp last-input-char) 1208 (let ((char last-input-char))
1209 (when (symbolp last-input-char)
1209 ;; Convert `return' to C-m, etc. 1210 ;; Convert `return' to C-m, etc.
1210 (let ((tmp (get last-input-char 'event-symbol-elements))) 1211 (let ((tmp (get char 'event-symbol-elements)))
1211 (if tmp 1212 (when tmp
1212 (setq last-input-char (car tmp))) 1213 (setq char (car tmp)))
1213 (if (symbolp last-input-char) 1214 (when (symbolp char)
1214 (progn 1215 (setq tmp (get char 'ascii-character))
1215 (setq tmp (get last-input-char 'ascii-character)) 1216 (when tmp
1216 (if tmp (setq last-input-char tmp)))))) 1217 (setq char tmp)))))
1217 (term-send-raw-string (if (and (numberp last-input-char) 1218 (setq char (event-basic-type char))
1218 (> last-input-char 127) 1219 (term-send-raw-string (if (and (numberp char)
1219 (< last-input-char 256)) 1220 (> char 127)
1220 (make-string 1 last-input-char) 1221 (< char 256))
1221 (format "\e%c" last-input-char)))) 1222 (make-string 1 char)
1223 (format "\e%c" char)))))
1222 1224
1223(defun term-mouse-paste (click arg) 1225(defun term-mouse-paste (click arg)
1224 "Insert the last stretch of killed text at the position clicked on." 1226 "Insert the last stretch of killed text at the position clicked on."