]> code.delx.au - gnu-emacs/commitdiff
Replace last-command-char with last-command-event.
authorGlenn Morris <rgm@gnu.org>
Fri, 9 Jan 2009 04:44:15 +0000 (04:44 +0000)
committerGlenn Morris <rgm@gnu.org>
Fri, 9 Jan 2009 04:44:15 +0000 (04:44 +0000)
18 files changed:
lisp/ChangeLog
lisp/allout.el
lisp/autoarg.el
lisp/complete.el
lisp/ediff-mult.el
lisp/ediff-util.el
lisp/electric.el
lisp/hexl.el
lisp/isearch.el
lisp/isearchb.el
lisp/kmacro.el
lisp/minibuffer.el
lisp/repeat.el
lisp/simple.el
lisp/skeleton.el
lisp/terminal.el
lisp/tmm.el
lisp/wdired.el

index cc70c82f9f42e5b11c6f4cda17b9461323fda112..6f6f5bebf3edee4f67caa2540b1ca30c8c4cb013 100644 (file)
@@ -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:
index 354ab84b9db88024d9e69ba66056afc54691312e..98f729c93a9653f396b03d9f6058c4f3d3d784a4 100644 (file)
@@ -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)
 
index 924fdd97ba1f6f9bdc82aeaf065d552a32a4b978..13be30e1808438144b5f383fe469032e62b3232e 100644 (file)
@@ -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))))
index ecffb660a26ba0a8c948aae651a8e1b2fea6ba75..207b7f549d8311c77cfebe123d27b0a4177dcb1c 100644 (file)
@@ -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)
index 41f3a157100d7fca6c2ed0d6969f2adee784ce52..ebbfb1ce1c74d2122aa5061e49b97f006ef52a12 100644 (file)
@@ -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)
index 49a957e8bf1f0298eb94c3431b5f7f75cfc6411a..4885ca472e251abc02082752503e8a4069d2fe94 100644 (file)
@@ -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))
index ca6f3f921f304c575dd99ad1f16d2f3e28d65134..498f1e4f138ad34116e17f4a8f3dbc876b966701 100644 (file)
@@ -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.
index 6d63bccba65e6e6474172c9bca367046ee8aa746..2cdd449af38827b4a3837f163648959c3d691c6f 100644 (file)
@@ -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.
index bed3a7d8de827cae7050d5a6c3a811a1034f9c54..9199039ec81a8b0503f65bb64860dbbd6202368a 100644 (file)
@@ -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))))
 
 \f
 ;; 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
index 496bcf92914ddfe897cc353fb5c455018b88f899..d9a14eaefa2eabad427f502370e39f7fbfe9d2db 100644 (file)
@@ -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)
index eab099fa0350331e1c6f7ea696913dc619d8d5d2..d06e3c02e1507d4cf140cc1c0da383c851d477c6 100644 (file)
@@ -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)))
index 364ee3d909f5cf4d890165ee5a35cd0bc54bed43..fc42905c3dff1330f2fbd569f51c113e2096cf3b 100644 (file)
@@ -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))
index b65188078a44058d9d98e0375b87ed0a26c25f28..4a4b519bf4ffb3038d8c440fbb623425c717abd5 100644 (file)
   :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)))))
 
index edce7c8ddf73650f772308b0d6c3afcff678729d..a9f961acce9dcda370a94136fbf3bb0397e6c459 100644 (file)
@@ -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)
index c816888912f5756b00a9e63a6735678abe3ec31f..c7d9b0e6aad31830e405640a84c5dec9b7ea1330 100644 (file)
@@ -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))))
index 8b550c022a5e0bef3d6eedb9ead0f1254c98a517..d79ea1a47ef1aee5aac9f93266dec5716c4604d5 100644 (file)
@@ -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)))
 
index 3d8315cb1eaedf8bd2f8dfa577431337bcbdf9b9..7058f54ef8e70d8eb32a4ad7879a34d1e033d6a1 100644 (file)
@@ -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)
index e0d8c801d07cfb72e8861f05344091b98ba9dc13..11b2d9f617dfd836652b4d21b9cca35ee867d280 100644 (file)
@@ -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)