aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-01-09 05:00:56 +0000
committerGlenn Morris2009-01-09 05:00:56 +0000
commit1e4bd40da283e6bbd9f501b7fcbc748353173f41 (patch)
tree023038713fe26febec1d66ff460fe26aea104dc4
parentcfa29281070a1f7868ed42f330d9a666b2fc39e2 (diff)
downloademacs-1e4bd40da283e6bbd9f501b7fcbc748353173f41.tar.gz
emacs-1e4bd40da283e6bbd9f501b7fcbc748353173f41.zip
Replace last-input-char with last-input-event.
-rw-r--r--lisp/ChangeLog7
-rw-r--r--lisp/calc/calc.el4
-rw-r--r--lisp/double.el2
-rw-r--r--lisp/electric.el4
-rw-r--r--lisp/emulation/viper-cmd.el4
-rw-r--r--lisp/international/mule-cmds.el2
-rw-r--r--lisp/obsolete/iso-acc.el6
-rw-r--r--lisp/progmodes/vhdl-mode.el10
-rw-r--r--lisp/replace.el5
-rw-r--r--lisp/term.el12
-rw-r--r--lisp/terminal.el24
11 files changed, 44 insertions, 36 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6f6f5bebf3e..4a82c7a5e60 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -28,6 +28,13 @@
28 * textmodes/sgml-mode.el, textmodes/table.el, textmodes/two-column.el: 28 * textmodes/sgml-mode.el, textmodes/table.el, textmodes/two-column.el:
29 Replace last-command-char with last-command-event. 29 Replace last-command-char with last-command-event.
30 30
31 * double.el, electric.el, replace.el, term.el, terminal.el:
32 * calc/calc.el:
33 * emulation/viper-cmd.el:
34 * international/mule-cmds.el:
35 * obsolete/iso-acc.el:
36 * progmodes/vhdl-mode.el: Replace last-input-char with last-input-event.
37
312009-01-09 Dave Love <fx@gnu.org> 382009-01-09 Dave Love <fx@gnu.org>
32 39
33 * calendar/time-date.el: Require cl for `declare'. 40 * calendar/time-date.el: Require cl for `declare'.
diff --git a/lisp/calc/calc.el b/lisp/calc/calc.el
index 0d372ce1959..59b4b682417 100644
--- a/lisp/calc/calc.el
+++ b/lisp/calc/calc.el
@@ -2199,8 +2199,8 @@ See calc-keypad for details."
2199 (or (memq last-command-event '(32 13)) 2199 (or (memq last-command-event '(32 13))
2200 (progn (setq prefix-arg current-prefix-arg) 2200 (progn (setq prefix-arg current-prefix-arg)
2201 (calc-unread-command (if (and (eq last-command-event 27) 2201 (calc-unread-command (if (and (eq last-command-event 27)
2202 (>= last-input-char 128)) 2202 (>= last-input-event 128))
2203 last-input-char 2203 last-input-event
2204 nil)))) 2204 nil))))
2205 (exit-minibuffer))) 2205 (exit-minibuffer)))
2206 2206
diff --git a/lisp/double.el b/lisp/double.el
index 7204e3300df..e7f6e6c75b4 100644
--- a/lisp/double.el
+++ b/lisp/double.el
@@ -103,7 +103,7 @@ but not `C-u X' or `ESC X' since the X is not the prefix key."
103 103
104(defun double-translate-key (prompt) 104(defun double-translate-key (prompt)
105 ;; Translate input events using double map. 105 ;; Translate input events using double map.
106 (let ((key last-input-char)) 106 (let ((key last-input-event))
107 (cond (unread-command-events 107 (cond (unread-command-events
108 ;; Artificial event, ignore it. 108 ;; Artificial event, ignore it.
109 (vector key)) 109 (vector key))
diff --git a/lisp/electric.el b/lisp/electric.el
index 498f1e4f138..3adecb82f40 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -71,7 +71,7 @@
71 ;; This makes universal-argument-other-key work. 71 ;; This makes universal-argument-other-key work.
72 (setq universal-argument-num-events 0) 72 (setq universal-argument-num-events 0)
73 (if (or (prog1 quit-flag (setq quit-flag nil)) 73 (if (or (prog1 quit-flag (setq quit-flag nil))
74 (eq last-input-char ?\C-g)) 74 (eq last-input-event ?\C-g))
75 (progn (setq unread-command-events nil 75 (progn (setq unread-command-events nil
76 prefix-arg nil) 76 prefix-arg nil)
77 ;; If it wasn't cancelling a prefix character, then quit. 77 ;; If it wasn't cancelling a prefix character, then quit.
@@ -87,7 +87,7 @@
87 (progn (command-execute cmd) 87 (progn (command-execute cmd)
88 (setq last-command this-command) 88 (setq last-command this-command)
89 (if (or (prog1 quit-flag (setq quit-flag nil)) 89 (if (or (prog1 quit-flag (setq quit-flag nil))
90 (eq last-input-char ?\C-g)) 90 (eq last-input-event ?\C-g))
91 (progn (setq unread-command-events nil) 91 (progn (setq unread-command-events nil)
92 (if (not inhibit-quit) 92 (if (not inhibit-quit)
93 (progn (ding) 93 (progn (ding)
diff --git a/lisp/emulation/viper-cmd.el b/lisp/emulation/viper-cmd.el
index 95f601716fa..7a793b92d9a 100644
--- a/lisp/emulation/viper-cmd.el
+++ b/lisp/emulation/viper-cmd.el
@@ -2546,7 +2546,7 @@ These keys are ESC, RET, and LineFeed"
2546 (let (com) 2546 (let (com)
2547 (if (eq this-command 'viper-intercept-ESC-key) 2547 (if (eq this-command 'viper-intercept-ESC-key)
2548 (setq com 'viper-exit-insert-state) 2548 (setq com 'viper-exit-insert-state)
2549 (viper-set-unread-command-events last-input-char) 2549 (viper-set-unread-command-events last-input-event)
2550 (setq com (key-binding (viper-read-key-sequence nil)))) 2550 (setq com (key-binding (viper-read-key-sequence nil))))
2551 2551
2552 (condition-case conds 2552 (condition-case conds
@@ -2567,7 +2567,7 @@ These keys are ESC, RET, and LineFeed"
2567 (if (or (< (point) (viper-replace-start)) 2567 (if (or (< (point) (viper-replace-start))
2568 (> (point) (viper-replace-end))) 2568 (> (point) (viper-replace-end)))
2569 (let (viper-replace-minor-mode com) 2569 (let (viper-replace-minor-mode com)
2570 (viper-set-unread-command-events last-input-char) 2570 (viper-set-unread-command-events last-input-event)
2571 (setq com (key-binding (read-key-sequence nil))) 2571 (setq com (key-binding (read-key-sequence nil)))
2572 (condition-case conds 2572 (condition-case conds
2573 (command-execute com) 2573 (command-execute com)
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index 4e4c0352ccf..465c3efecf5 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -288,7 +288,7 @@ wrong, use this command again to toggle back to the right mode."
288 prefix) 288 prefix)
289 ;; read-key-sequence ignores quit, so make an explicit check. 289 ;; read-key-sequence ignores quit, so make an explicit check.
290 ;; Like many places, this assumes quit == C-g, but it need not be. 290 ;; Like many places, this assumes quit == C-g, but it need not be.
291 (if (equal last-input-char ?\C-g) 291 (if (equal last-input-event ?\C-g)
292 (keyboard-quit)) 292 (keyboard-quit))
293 (when (memq cmd '(universal-argument digit-argument)) 293 (when (memq cmd '(universal-argument digit-argument))
294 (call-interactively cmd) 294 (call-interactively cmd)
diff --git a/lisp/obsolete/iso-acc.el b/lisp/obsolete/iso-acc.el
index beb4a5d6b4c..ed949cd0eb3 100644
--- a/lisp/obsolete/iso-acc.el
+++ b/lisp/obsolete/iso-acc.el
@@ -287,9 +287,9 @@ the language you choose)."
287 "Modify the following character by adding an accent to it." 287 "Modify the following character by adding an accent to it."
288 ;; Pick up the accent character. 288 ;; Pick up the accent character.
289 (if (and iso-accents-mode 289 (if (and iso-accents-mode
290 (memq last-input-char iso-accents-enable)) 290 (memq last-input-event iso-accents-enable))
291 (iso-accents-compose prompt) 291 (iso-accents-compose prompt)
292 (vector last-input-char))) 292 (vector last-input-event)))
293 293
294 294
295;; The iso-accents-compose function is called deep inside Emacs' read 295;; The iso-accents-compose function is called deep inside Emacs' read
@@ -302,7 +302,7 @@ the language you choose)."
302;; window's display matrix. 302;; window's display matrix.
303 303
304(defun iso-accents-compose (prompt) 304(defun iso-accents-compose (prompt)
305 (let* ((first-char last-input-char) 305 (let* ((first-char last-input-event)
306 (list (assq first-char iso-accents-list)) 306 (list (assq first-char iso-accents-list))
307 ;; Wait for the second key and look up the combination. 307 ;; Wait for the second key and look up the combination.
308 (second-char (if (or prompt 308 (second-char (if (or prompt
diff --git a/lisp/progmodes/vhdl-mode.el b/lisp/progmodes/vhdl-mode.el
index c44d4c82114..3c1f47592c8 100644
--- a/lisp/progmodes/vhdl-mode.el
+++ b/lisp/progmodes/vhdl-mode.el
@@ -8158,7 +8158,7 @@ Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil."
8158(defun vhdl-electric-quote (count) "'' --> \"" 8158(defun vhdl-electric-quote (count) "'' --> \""
8159 (interactive "p") 8159 (interactive "p")
8160 (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal))) 8160 (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
8161 (if (= (preceding-char) last-input-char) 8161 (if (= (preceding-char) last-input-event)
8162 (progn (delete-backward-char 1) (insert-char ?\" 1)) 8162 (progn (delete-backward-char 1) (insert-char ?\" 1))
8163 (insert-char ?\' 1)) 8163 (insert-char ?\' 1))
8164 (self-insert-command count))) 8164 (self-insert-command count)))
@@ -8166,7 +8166,7 @@ Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil."
8166(defun vhdl-electric-semicolon (count) "';;' --> ' : ', ': ;' --> ' := '" 8166(defun vhdl-electric-semicolon (count) "';;' --> ' : ', ': ;' --> ' := '"
8167 (interactive "p") 8167 (interactive "p")
8168 (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal))) 8168 (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
8169 (cond ((= (preceding-char) last-input-char) 8169 (cond ((= (preceding-char) last-input-event)
8170 (progn (delete-char -1) 8170 (progn (delete-char -1)
8171 (unless (eq (preceding-char) ? ) (insert " ")) 8171 (unless (eq (preceding-char) ? ) (insert " "))
8172 (insert ": ") 8172 (insert ": ")
@@ -8180,7 +8180,7 @@ Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil."
8180(defun vhdl-electric-comma (count) "',,' --> ' <= '" 8180(defun vhdl-electric-comma (count) "',,' --> ' <= '"
8181 (interactive "p") 8181 (interactive "p")
8182 (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal))) 8182 (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
8183 (cond ((= (preceding-char) last-input-char) 8183 (cond ((= (preceding-char) last-input-event)
8184 (progn (delete-char -1) 8184 (progn (delete-char -1)
8185 (unless (eq (preceding-char) ? ) (insert " ")) 8185 (unless (eq (preceding-char) ? ) (insert " "))
8186 (insert "<= "))) 8186 (insert "<= ")))
@@ -8190,7 +8190,7 @@ Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil."
8190(defun vhdl-electric-period (count) "'..' --> ' => '" 8190(defun vhdl-electric-period (count) "'..' --> ' => '"
8191 (interactive "p") 8191 (interactive "p")
8192 (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal))) 8192 (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
8193 (cond ((= (preceding-char) last-input-char) 8193 (cond ((= (preceding-char) last-input-event)
8194 (progn (delete-char -1) 8194 (progn (delete-char -1)
8195 (unless (eq (preceding-char) ? ) (insert " ")) 8195 (unless (eq (preceding-char) ? ) (insert " "))
8196 (insert "=> "))) 8196 (insert "=> ")))
@@ -8200,7 +8200,7 @@ Turn on if ARG positive, turn off if ARG negative, toggle if ARG zero or nil."
8200(defun vhdl-electric-equal (count) "'==' --> ' == '" 8200(defun vhdl-electric-equal (count) "'==' --> ' == '"
8201 (interactive "p") 8201 (interactive "p")
8202 (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal))) 8202 (if (and vhdl-stutter-mode (= count 1) (not (vhdl-in-literal)))
8203 (cond ((= (preceding-char) last-input-char) 8203 (cond ((= (preceding-char) last-input-event)
8204 (progn (delete-char -1) 8204 (progn (delete-char -1)
8205 (unless (eq (preceding-char) ? ) (insert " ")) 8205 (unless (eq (preceding-char) ? ) (insert " "))
8206 (insert "== "))) 8206 (insert "== ")))
diff --git a/lisp/replace.el b/lisp/replace.el
index 95bb680b7a4..131bfb66f77 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1,7 +1,8 @@
1;;; replace.el --- replace commands for Emacs 1;;; replace.el --- replace commands for Emacs
2 2
3;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1996, 1997, 2000, 2001, 3;; Copyright (C) 1985, 1986, 1987, 1992, 1994, 1996, 1997, 2000, 2001,
4;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 4;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5;; Free Software Foundation, Inc.
5 6
6;; Maintainer: FSF 7;; Maintainer: FSF
7 8
@@ -1571,7 +1572,7 @@ make, or the user didn't cancel the call."
1571 1572
1572 ;; If last typed key in previous call of multi-buffer perform-replace 1573 ;; If last typed key in previous call of multi-buffer perform-replace
1573 ;; was `automatic-all', don't ask more questions in next files 1574 ;; was `automatic-all', don't ask more questions in next files
1574 (when (eq (lookup-key map (vector last-input-char)) 'automatic-all) 1575 (when (eq (lookup-key map (vector last-input-event)) 'automatic-all)
1575 (setq query-flag nil multi-buffer t)) 1576 (setq query-flag nil multi-buffer t))
1576 1577
1577 ;; REPLACEMENTS is either a string, a list of strings, or a cons cell 1578 ;; REPLACEMENTS is either a string, a list of strings, or a cons cell
diff --git a/lisp/term.el b/lisp/term.el
index 56d7fb24d06..14884246c6c 100644
--- a/lisp/term.el
+++ b/lisp/term.el
@@ -1182,15 +1182,15 @@ Entry to this mode runs the hooks on `term-mode-hook'."
1182without any interpretation." 1182without any interpretation."
1183 (interactive) 1183 (interactive)
1184 ;; Convert `return' to C-m, etc. 1184 ;; Convert `return' to C-m, etc.
1185 (when (and (symbolp last-input-char) 1185 (when (and (symbolp last-input-event)
1186 (get last-input-char 'ascii-character)) 1186 (get last-input-event 'ascii-character))
1187 (setq last-input-char (get last-input-char 'ascii-character))) 1187 (setq last-input-event (get last-input-event 'ascii-character)))
1188 (term-send-raw-string (make-string 1 last-input-char))) 1188 (term-send-raw-string (make-string 1 last-input-event)))
1189 1189
1190(defun term-send-raw-meta () 1190(defun term-send-raw-meta ()
1191 (interactive) 1191 (interactive)
1192 (let ((char last-input-char)) 1192 (let ((char last-input-event))
1193 (when (symbolp last-input-char) 1193 (when (symbolp last-input-event)
1194 ;; Convert `return' to C-m, etc. 1194 ;; Convert `return' to C-m, etc.
1195 (let ((tmp (get char 'event-symbol-elements))) 1195 (let ((tmp (get char 'event-symbol-elements)))
1196 (when tmp 1196 (when tmp
diff --git a/lisp/terminal.el b/lisp/terminal.el
index d79ea1a47ef..a015a918047 100644
--- a/lisp/terminal.el
+++ b/lisp/terminal.el
@@ -396,10 +396,10 @@ set it smaller for more frequent updates (but overall slower performance."
396(put 'te-more-break-unread 'suppress-keymap t) 396(put 'te-more-break-unread 'suppress-keymap t)
397(defun te-more-break-unread () 397(defun te-more-break-unread ()
398 (interactive) 398 (interactive)
399 (if (eq last-input-char terminal-escape-char) 399 (if (eq last-input-event terminal-escape-char)
400 (call-interactively 'te-escape) 400 (call-interactively 'te-escape)
401 (message "Continuing from more break (\"%s\" typed, %d chars output pending...)" 401 (message "Continuing from more break (\"%s\" typed, %d chars output pending...)"
402 (single-key-description last-input-char) 402 (single-key-description last-input-event)
403 (te-pending-output-length)) 403 (te-pending-output-length))
404 (setq te-more-count 259259) 404 (setq te-more-count 259259)
405 (te-more-break-unwind) 405 (te-more-break-unwind)
@@ -469,29 +469,29 @@ One characters is treated specially:
469the terminal escape character (normally C-^) 469the terminal escape character (normally C-^)
470lets you type a terminal emulator command." 470lets you type a terminal emulator command."
471 (interactive) 471 (interactive)
472 (cond ((eq last-input-char terminal-escape-char) 472 (cond ((eq last-input-event terminal-escape-char)
473 (call-interactively 'te-escape)) 473 (call-interactively 'te-escape))
474 (t 474 (t
475 ;; Convert `return' to C-m, etc. 475 ;; Convert `return' to C-m, etc.
476 (if (and (symbolp last-input-char) 476 (if (and (symbolp last-input-event)
477 (get last-input-char 'ascii-character)) 477 (get last-input-event 'ascii-character))
478 (setq last-input-char (get last-input-char 'ascii-character))) 478 (setq last-input-event (get last-input-event 'ascii-character)))
479 ;; Convert meta characters to 8-bit form for transmission. 479 ;; Convert meta characters to 8-bit form for transmission.
480 (if (and (integerp last-input-char) 480 (if (and (integerp last-input-event)
481 (not (zerop (logand last-input-char ?\M-\^@)))) 481 (not (zerop (logand last-input-event ?\M-\^@))))
482 (setq last-input-char (+ 128 (logand last-input-char 127)))) 482 (setq last-input-event (+ 128 (logand last-input-event 127))))
483 ;; Now ignore all but actual characters. 483 ;; Now ignore all but actual characters.
484 ;; (It ought to be possible to send through function 484 ;; (It ought to be possible to send through function
485 ;; keys as character sequences if we add a description 485 ;; keys as character sequences if we add a description
486 ;; to our termcap entry of what they should look like.) 486 ;; to our termcap entry of what they should look like.)
487 (if (integerp last-input-char) 487 (if (integerp last-input-event)
488 (progn 488 (progn
489 (and terminal-more-processing (null (cdr te-pending-output)) 489 (and terminal-more-processing (null (cdr te-pending-output))
490 (te-set-more-count nil)) 490 (te-set-more-count nil))
491 (process-send-string te-process (make-string 1 last-input-char)) 491 (process-send-string te-process (make-string 1 last-input-event))
492 (te-process-output t)) 492 (te-process-output t))
493 (message "Function key `%s' ignored" 493 (message "Function key `%s' ignored"
494 (single-key-description last-input-char)))))) 494 (single-key-description last-input-event))))))
495 495
496 496
497(defun te-set-window-start () 497(defun te-set-window-start ()