summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2009-01-09 04:44:15 +0000
committerGlenn Morris <rgm@gnu.org>2009-01-09 04:44:15 +0000
commit8989a9203f73473569ddf83e505a846609def407 (patch)
tree2dcc35b588e98388ef66ef39157e9d17290df217 /lisp
parenta4d9b7bca3dc69efe89eecbd81ed96859f7cd818 (diff)
Replace last-command-char with last-command-event.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/allout.el10
-rw-r--r--lisp/autoarg.el2
-rw-r--r--lisp/complete.el2
-rw-r--r--lisp/ediff-mult.el4
-rw-r--r--lisp/ediff-util.el26
-rw-r--r--lisp/electric.el2
-rw-r--r--lisp/hexl.el2
-rw-r--r--lisp/isearch.el7
-rw-r--r--lisp/isearchb.el13
-rw-r--r--lisp/kmacro.el2
-rw-r--r--lisp/minibuffer.el2
-rw-r--r--lisp/repeat.el12
-rw-r--r--lisp/simple.el10
-rw-r--r--lisp/skeleton.el4
-rw-r--r--lisp/terminal.el2
-rw-r--r--lisp/tmm.el2
-rw-r--r--lisp/wdired.el7
18 files changed, 60 insertions, 53 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cc70c82f9f..6f6f5bebf3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -3,6 +3,10 @@
* subr.el (last-input-char, last-command-char):
Move here from src/keyboard.c.
+ * allout.el, autoarg.el, complete.el, ediff-mult.el, ediff-util.el:
+ * electric.el, hexl.el, isearch.el, isearchb.el, kmacro.el:
+ * minibuffer.el, repeat.el, simple.el, skeleton.el, terminal.el, tmm.el:
+ * wdired.el:
* calc/calc-aent.el, calc/calc-ext.el, calc/calc-incom.el:
* calc/calc-keypd.el, calc/calc-misc.el, calc/calc-prog.el:
* calc/calc-sel.el, calc/calc-store.el, calc/calc-stuff.el:
diff --git a/lisp/allout.el b/lisp/allout.el
index 354ab84b9d..98f729c93a 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -3392,13 +3392,13 @@ this-command accordingly.
Returns the qualifying command, if any, else nil."
(interactive)
- (let* ((key-string (if (numberp last-command-char)
- (char-to-string last-command-char)))
- (key-num (cond ((numberp last-command-char) last-command-char)
+ (let* ((key-string (if (numberp last-command-event)
+ (char-to-string last-command-event)))
+ (key-num (cond ((numberp last-command-event) last-command-event)
;; for XEmacs character type:
((and (fboundp 'characterp)
- (apply 'characterp (list last-command-char)))
- (apply 'char-to-int (list last-command-char)))
+ (apply 'characterp (list last-command-event)))
+ (apply 'char-to-int (list last-command-event)))
(t 0)))
mapped-binding)
diff --git a/lisp/autoarg.el b/lisp/autoarg.el
index 924fdd97ba..13be30e180 100644
--- a/lisp/autoarg.el
+++ b/lisp/autoarg.el
@@ -67,7 +67,7 @@
(defun autoarg-kp-digit-argument (arg)
"Part of the numeric argument for the next command, like `digit-argument'."
(interactive "P")
- (let ((digit (cdr (assq last-command-char autoarg-kp-digits))))
+ (let ((digit (cdr (assq last-command-event autoarg-kp-digits))))
(cond ((integerp arg)
(setq prefix-arg (+ (* arg 10)
(if (< arg 0) (- digit) digit))))
diff --git a/lisp/complete.el b/lisp/complete.el
index ecffb660a2..207b7f549d 100644
--- a/lisp/complete.el
+++ b/lisp/complete.el
@@ -290,7 +290,7 @@ See `PC-complete' for details.
This can be bound to other keys, like `-' and `.', if you wish."
(interactive)
(if (eq (PC-was-meta-key) PC-meta-flag)
- (if (eq last-command-char ? )
+ (if (eq last-command-event ? )
(minibuffer-complete-word)
(self-insert-command 1))
(self-insert-command 1)
diff --git a/lisp/ediff-mult.el b/lisp/ediff-mult.el
index 41f3a15710..ebbfb1ce1c 100644
--- a/lisp/ediff-mult.el
+++ b/lisp/ediff-mult.el
@@ -2344,10 +2344,10 @@ If this is a session registry buffer then just bury it."
This is used only for sessions that involve 2 or 3 files at the same time.
ACTION is an optional argument that can be ?h, ?m, ?=, to mark for hiding, mark
for operation, or simply indicate which are equal files. If it is nil, then
-`last-command-char' is used to decide which action to take."
+`last-command-event' is used to decide which action to take."
(interactive)
(if (null action)
- (setq action last-command-char))
+ (setq action last-command-event))
(let ((list (cdr ediff-meta-list))
marked1 marked2 marked3
fileinfo1 fileinfo2 fileinfo3 elt)
diff --git a/lisp/ediff-util.el b/lisp/ediff-util.el
index 49a957e8bf..4885ca472e 100644
--- a/lisp/ediff-util.el
+++ b/lisp/ediff-util.el
@@ -1012,7 +1012,7 @@ of the current buffer."
(interactive)
(ediff-barf-if-not-control-buffer)
(let ((ctl-buf (if (null buf) (current-buffer)))
- (buf-type (ediff-char-to-buftype last-command-char)))
+ (buf-type (ediff-char-to-buftype last-command-event)))
(or buf (ediff-recenter))
(or buf
(setq buf (ediff-get-buffer buf-type)))
@@ -1514,7 +1514,7 @@ the one half of the height of window-A."
(error ediff-KILLED-VITAL-BUFFER))
(ediff-operate-on-windows
- (if (memq last-command-char '(?v ?\C-v))
+ (if (memq last-command-event '(?v ?\C-v))
'scroll-up
'scroll-down)
;; calculate argument to scroll-up/down
@@ -1562,7 +1562,7 @@ the width of the A/B/C windows."
;; interactively so that they set the window's min_hscroll.
;; Otherwise, automatic hscrolling will undo the effect of
;; hscrolling.
- (if (= last-command-char ?<)
+ (if (= last-command-event ?<)
(lambda (arg)
(let ((prefix-arg arg))
(call-interactively 'scroll-left)))
@@ -1826,7 +1826,7 @@ With a prefix argument, synchronize all files around the current point position
in the specified buffer."
(interactive "P")
(ediff-barf-if-not-control-buffer)
- (let* ((buf-type (ediff-char-to-buftype last-command-char))
+ (let* ((buf-type (ediff-char-to-buftype last-command-event))
(buffer (ediff-get-buffer buf-type))
(pt (ediff-with-current-buffer buffer (point)))
(diff-no (ediff-diff-at-point buf-type nil (if arg 'after)))
@@ -2162,13 +2162,13 @@ ARG is a prefix argument. If nil, copy the current difference region."
"Restore ARGth diff from `ediff-killed-diffs-alist'.
ARG is a prefix argument. If ARG is nil, restore the current-difference.
If the second optional argument, a character, is given, use it to
-determine the target buffer instead of last-command-char"
+determine the target buffer instead of last-command-event"
(interactive "P")
(ediff-barf-if-not-control-buffer)
(if (numberp arg)
(ediff-jump-to-difference arg))
(ediff-pop-diff ediff-current-difference
- (ediff-char-to-buftype (or key last-command-char)))
+ (ediff-char-to-buftype (or key last-command-event)))
;; recenter with rehighlighting, but no messages
(let (ediff-verbose-p)
(ediff-recenter)))
@@ -2192,13 +2192,13 @@ a regular expression typed in by the user."
(cond
((or (and (eq ediff-skip-diff-region-function
ediff-focus-on-regexp-matches-function)
- (eq last-command-char ?f))
+ (eq last-command-event ?f))
(and (eq ediff-skip-diff-region-function
ediff-hide-regexp-matches-function)
- (eq last-command-char ?h)))
+ (eq last-command-event ?h)))
(message "Selective browsing by regexp turned off")
(setq ediff-skip-diff-region-function 'ediff-show-all-diffs))
- ((eq last-command-char ?h)
+ ((eq last-command-event ?h)
(setq ediff-skip-diff-region-function ediff-hide-regexp-matches-function
regexp-A
(read-string
@@ -2236,7 +2236,7 @@ a regular expression typed in by the user."
(or (string= regexp-B "") (setq ediff-regexp-hide-B regexp-B))
(or (string= regexp-C "") (setq ediff-regexp-hide-C regexp-C)))
- ((eq last-command-char ?f)
+ ((eq last-command-event ?f)
(setq ediff-skip-diff-region-function
ediff-focus-on-regexp-matches-function
regexp-A
@@ -3302,10 +3302,10 @@ Without an argument, it saves customized diff argument, if available
(ediff-barf-if-not-control-buffer)
(ediff-compute-custom-diffs-maybe)
(ediff-with-current-buffer
- (cond ((memq last-command-char '(?a ?b ?c))
+ (cond ((memq last-command-event '(?a ?b ?c))
(ediff-get-buffer
- (ediff-char-to-buftype last-command-char)))
- ((eq last-command-char ?d)
+ (ediff-char-to-buftype last-command-event)))
+ ((eq last-command-event ?d)
(message "Saving diff output ...")
(sit-for 1) ; let the user see the message
(cond ((and arg (ediff-buffer-live-p ediff-diff-buffer))
diff --git a/lisp/electric.el b/lisp/electric.el
index ca6f3f921f..498f1e4f13 100644
--- a/lisp/electric.el
+++ b/lisp/electric.el
@@ -65,7 +65,7 @@
(setq prompt-string nil)
(setq prompt-string "->")))
(setq cmd (read-key-sequence prompt-string))
- (setq last-command-char (aref cmd (1- (length cmd)))
+ (setq last-command-event (aref cmd (1- (length cmd)))
this-command (key-binding cmd t)
cmd this-command)
;; This makes universal-argument-other-key work.
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 6d63bccba6..2cdd449af3 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -835,7 +835,7 @@ Interactively, with a numeric argument, insert this character that many times.
Non-ASCII characters are first encoded with `buffer-file-coding-system',
and their encoded form is inserted byte by byte."
(interactive "p")
- (hexl-insert-multibyte-char last-command-char arg))
+ (hexl-insert-multibyte-char last-command-event arg))
(defun hexl-insert-char (ch num)
"Insert the character CH NUM times in a hexl buffer.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index bed3a7d8de..9199039ec8 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1,7 +1,8 @@
;;; isearch.el --- incremental search minor mode
;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000,
-;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;; Free Software Foundation, Inc.
;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
;; Maintainer: FSF
@@ -954,7 +955,7 @@ REGEXP if non-nil says use the regexp search ring."
;; ;; First terminate isearch-mode.
;; (isearch-done)
;; (isearch-clean-overlays)
-;; (handle-switch-frame (car (cdr last-command-char))))
+;; (handle-switch-frame (car (cdr last-command-event))))
;; The search status structure and stack.
@@ -1984,7 +1985,7 @@ Isearch mode."
(defun isearch-printing-char ()
"Add this ordinary printing character to the search string and search."
(interactive)
- (let ((char last-command-char))
+ (let ((char last-command-event))
(if (= char ?\S-\ )
(setq char ?\s))
(if current-input-method
diff --git a/lisp/isearchb.el b/lisp/isearchb.el
index 496bcf9291..d9a14eaefa 100644
--- a/lisp/isearchb.el
+++ b/lisp/isearchb.el
@@ -1,6 +1,7 @@
;;; isearchb --- a marriage between iswitchb and isearch
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
+;; Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org>
;; Maintainer: FSF
@@ -136,10 +137,10 @@ Its purpose is to pass different call arguments to
(unless iswitchb-text
(setq iswitchb-text "")
(iswitchb-make-buflist nil))
- (if last-command-char
+ (if last-command-event
(setq iswitchb-rescan t
iswitchb-text (concat iswitchb-text
- (char-to-string last-command-char))))
+ (char-to-string last-command-event))))
(iswitchb-set-matches)
(let* ((match (car iswitchb-matches))
(buf (and match (get-buffer match))))
@@ -176,17 +177,17 @@ Its purpose is to pass different call arguments to
(substring iswitchb-text 0 (1- (length iswitchb-text))))
(if (= 0 (length iswitchb-text))
(isearchb-stop t t)
- (setq last-command-char nil)
+ (setq last-command-event nil)
(setq this-command 'isearchb)))
((or (equal keys "\C-i") (equal keys [tab]))
(setq this-command 'isearchb-iswitchb))
((equal keys "\C-s")
(iswitchb-next-match)
- (setq last-command-char nil)
+ (setq last-command-event nil)
(setq this-command 'isearchb))
((equal keys "\C-r")
(iswitchb-prev-match)
- (setq last-command-char nil)
+ (setq last-command-event nil)
(setq this-command 'isearchb))
((equal keys "\C-g")
(ding)
diff --git a/lisp/kmacro.el b/lisp/kmacro.el
index eab099fa03..d06e3c02e1 100644
--- a/lisp/kmacro.el
+++ b/lisp/kmacro.el
@@ -1196,7 +1196,7 @@ following additional answers: `insert', `insert-1', `replace', `replace-1',
(setq this-command 'ignore)
(setq this-command cmd)
(if (memq this-command '(self-insert-command digit-argument))
- (setq last-command-char (aref keys (1- (length keys)))))
+ (setq last-command-event (aref keys (1- (length keys)))))
(if keys
(setq kmacro-step-edit-new-macro (vconcat kmacro-step-edit-new-macro keys))))
(setq kmacro-step-edit-key-index next-index)))
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 364ee3d909..fc42905c3d 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -905,7 +905,7 @@ the completions buffer."
(defun self-insert-and-exit ()
"Terminate minibuffer input."
(interactive)
- (if (characterp last-command-char)
+ (if (characterp last-command-event)
(call-interactively 'self-insert-command)
(ding))
(exit-minibuffer))
diff --git a/lisp/repeat.el b/lisp/repeat.el
index b65188078a..4a4b519bf4 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -100,9 +100,9 @@
:type '(repeat function))
;; If the last command was self-insert-command, the char to be inserted was
-;; obtained by that command from last-command-char, which has now been
+;; obtained by that command from last-command-event, which has now been
;; clobbered by the command sequence that invoked `repeat'. We could get it
-;; from (recent-keys) & set last-command-char to that, "unclobbering" it, but
+;; from (recent-keys) & set last-command-event to that, "unclobbering" it, but
;; this has the disadvantage that if the user types a sequence of different
;; chars then invokes repeat, only the final char will be inserted. In vi,
;; the dot command can reinsert the entire most-recently-inserted sequence.
@@ -247,14 +247,14 @@ recently executed command not bound to an input event\"."
(setq repeat-arg last-prefix-arg))
;; Now determine whether to loop on repeated taps of the final character
;; of the key sequence that invoked repeat. The Emacs global
- ;; last-command-char contains the final character now, but may not still
+ ;; last-command-event contains the final character now, but may not still
;; contain it after the previous command is repeated, so the character
;; needs to be saved.
(let ((repeat-repeat-char
(if (eq repeat-on-final-keystroke t)
- last-command-char
+ last-command-event
;; allow only specified final keystrokes
- (car (memq last-command-char
+ (car (memq last-command-event
(listify-key-sequence
repeat-on-final-keystroke))))))
(if (memq last-repeatable-command '(exit-minibuffer
@@ -344,7 +344,7 @@ recently executed command not bound to an input event\"."
(defun repeat-self-insert (string)
(let ((i 0))
(while (< i (length string))
- (let ((last-command-char (aref string i)))
+ (let ((last-command-event (aref string i)))
(self-insert-command 1))
(setq i (1+ i)))))
diff --git a/lisp/simple.el b/lisp/simple.el
index edce7c8ddf..a9f961acce 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -463,8 +463,8 @@ than the value of `fill-column' and ARG is nil."
(beforepos (point)))
(if flag (backward-char 1))
;; Call self-insert so that auto-fill, abbrev expansion etc. happens.
- ;; Set last-command-char to tell self-insert what to insert.
- (let ((last-command-char ?\n)
+ ;; Set last-command-event to tell self-insert what to insert.
+ (let ((last-command-event ?\n)
;; Don't auto-fill if we have a numeric argument.
;; Also not if flag is true (it would fill wrong line);
;; there is no need to since we're at BOL.
@@ -2596,9 +2596,9 @@ These commands include \\[set-mark-command] and \\[start-kbd-macro]."
"Part of the numeric argument for the next command.
\\[universal-argument] following digits or minus sign ends the argument."
(interactive "P")
- (let* ((char (if (integerp last-command-char)
- last-command-char
- (get last-command-char 'ascii-character)))
+ (let* ((char (if (integerp last-command-event)
+ last-command-event
+ (get last-command-event 'ascii-character)))
(digit (- (logand char ?\177) ?0)))
(cond ((integerp arg)
(setq prefix-arg (+ (* arg 10)
diff --git a/lisp/skeleton.el b/lisp/skeleton.el
index c816888912..c7d9b0e6aa 100644
--- a/lisp/skeleton.el
+++ b/lisp/skeleton.el
@@ -470,7 +470,7 @@ This allows for context-sensitive checking whether pairing is appropriate.")
(defvar skeleton-pair-alist ()
- "An override alist of pairing partners matched against `last-command-char'.
+ "An override alist of pairing partners matched against `last-command-event'.
Each alist element, which looks like (ELEMENT ...), is passed to
`skeleton-insert' with no interactor. Variable `str' does nothing.
@@ -504,7 +504,7 @@ symmetrical ones, and the same character twice for the others."
(or (eq last-command 'mouse-drag-region)
(and transient-mark-mode mark-active))))
(skeleton-end-hook)
- (char last-command-char)
+ (char last-command-event)
(skeleton (or (assq char skeleton-pair-alist)
(assq char skeleton-pair-default-alist)
`(,char _ ,char))))
diff --git a/lisp/terminal.el b/lisp/terminal.el
index 8b550c022a..d79ea1a47e 100644
--- a/lisp/terminal.el
+++ b/lisp/terminal.el
@@ -225,7 +225,7 @@ performance."
;; you hit esc key...
((and (stringp s)
(string= s (make-string 1 terminal-escape-char)))
- (setq last-command-char terminal-escape-char)
+ (setq last-command-event terminal-escape-char)
(let ((terminal-escape-char -259))
(te-pass-through)))
diff --git a/lisp/tmm.el b/lisp/tmm.el
index 3d8315cb1e..7058f54ef8 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -402,7 +402,7 @@ Stores a list of all the shortcuts in the free variable `tmm-short-cuts'."
(defun tmm-shortcut ()
"Choose the shortcut that the user typed."
(interactive)
- (let ((c last-command-char) s)
+ (let ((c last-command-event) s)
(if (symbolp tmm-shortcut-style)
(setq c (funcall tmm-shortcut-style c)))
(if (memq c tmm-short-cuts)
diff --git a/lisp/wdired.el b/lisp/wdired.el
index e0d8c801d0..11b2d9f617 100644
--- a/lisp/wdired.el
+++ b/lisp/wdired.el
@@ -1,6 +1,7 @@
;;; wdired.el --- Rename files editing their names in dired buffers
-;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009
+;; Free Software Foundation, Inc.
;; Filename: wdired.el
;; Author: Juan León Lahoz García <juanleon1@gmail.com>
@@ -741,9 +742,9 @@ Like original function but it skips read-only words."
(defun wdired-set-bit ()
"Set a permission bit character."
(interactive)
- (if (wdired-perm-allowed-in-pos last-command-char
+ (if (wdired-perm-allowed-in-pos last-command-event
(- (current-column) wdired-col-perm))
- (let ((new-bit (char-to-string last-command-char))
+ (let ((new-bit (char-to-string last-command-event))
(inhibit-read-only t)
(pos-prop (- (point) (- (current-column) wdired-col-perm))))
(put-text-property 0 1 'keymap wdired-perm-mode-map new-bit)