# HG changeset patch # User Glenn Morris # Date 1231475760 0 # Node ID ad9d2270860e68bb9c0261c6dbabb2ea63280f83 # Parent 5aa3a4e050894383d1c92681d0dd4c03e601ddf5 Replace last-command-char with last-command-event. diff -r 5aa3a4e05089 -r ad9d2270860e lisp/ChangeLog --- a/lisp/ChangeLog Fri Jan 09 04:29:16 2009 +0000 +++ b/lisp/ChangeLog Fri Jan 09 04:36:00 2009 +0000 @@ -8,8 +8,10 @@ * calc/calc-sel.el, calc/calc-store.el, calc/calc-stuff.el: * calc/calc-units.el, calc/calc-yank.el, calc/calc.el: * emacs-lisp/lisp.el, emacs-lisp/re-builder.el: + * emulation/vi.el, emulation/vip.el, emulation/viper-cmd.el: * eshell/em-smart.el, eshell/esh-mode.el: * international/mule-cmds.el: + * mail/mailabbrev.el: * net/tramp.el: * play/mpuz.el: * progmodes/ada-mode.el, progmodes/antlr-mode.el, progmodes/cc-align.el: diff -r 5aa3a4e05089 -r ad9d2270860e lisp/emulation/vi.el --- a/lisp/emulation/vi.el Fri Jan 09 04:29:16 2009 +0000 +++ b/lisp/emulation/vi.el Fri Jan 09 04:36:00 2009 +0000 @@ -506,13 +506,13 @@ (defun vi-undefined () (interactive) (message "Command key \"%s\" is undefined in Evi." - (single-key-description last-command-char)) + (single-key-description last-command-event)) (ding)) (defun vi-unimplemented () (interactive) (message "Command key \"%s\" is not implemented in Evi." - (single-key-description last-command-char)) + (single-key-description last-command-event)) (ding)) ;;;;; @@ -832,7 +832,7 @@ (defun vi-goto-mark (mark-char &optional line-flag) "Go to marked position or line (if line-flag is given). Goto mark '@' means jump into and pop the top mark on the mark ring." - (cond ((char-equal mark-char last-command-char) ; `` or '' + (cond ((char-equal mark-char last-command-event) ; `` or '' (exchange-point-and-mark) (if line-flag (back-to-indentation))) ((char-equal mark-char ?@) ; jump and pop mark (set-mark-command t) (if line-flag (back-to-indentation))) @@ -949,7 +949,7 @@ "Replace char after point by CHAR. Repeat COUNT times." (interactive "p\nc") (delete-char count nil) ; don't save in kill ring - (setq last-command-char char) + (setq last-command-event char) (self-insert-command count) (vi-set-last-change-command 'vi-replace-1-char count char)) @@ -984,15 +984,15 @@ the key bindings of the operators being fixed." (interactive "P") (catch 'vi-exit-op - (let ((this-op-char last-command-char)) - (setq last-command-char (read-char)) - (setq this-command (lookup-key vi-com-map (char-to-string last-command-char))) + (let ((this-op-char last-command-event)) + (setq last-command-event (read-char)) + (setq this-command (lookup-key vi-com-map (char-to-string last-command-event))) (if (not (eq this-command 'vi-digit-argument)) (setq prefix-arg arg) (vi-digit-argument arg) - (setq last-command-char (read-char)) - (setq this-command (lookup-key vi-com-map (char-to-string last-command-char)))) - (cond ((char-equal this-op-char last-command-char) ; line op + (setq last-command-event (read-char)) + (setq this-command (lookup-key vi-com-map (char-to-string last-command-event)))) + (cond ((char-equal this-op-char last-command-event) ; line op (vi-execute-op this-op-char 'next-line (cons (1- (vi-prefix-numeric-value prefix-arg)) (vi-prefix-char-value prefix-arg)))) diff -r 5aa3a4e05089 -r ad9d2270860e lisp/emulation/vip.el --- a/lisp/emulation/vip.el Fri Jan 09 04:29:16 2009 +0000 +++ b/lisp/emulation/vip.el Fri Jan 09 04:36:00 2009 +0000 @@ -606,7 +606,7 @@ (defun vip-digit-argument (arg) "Begin numeric argument for the next command." (interactive "P") - (vip-prefix-arg-value last-command-char nil + (vip-prefix-arg-value last-command-event nil (if (consp arg) (cdr arg) nil))) (defun vip-command-argument (arg) @@ -614,7 +614,7 @@ (interactive "P") (condition-case conditions (vip-prefix-arg-com - last-command-char + last-command-event (cond ((null arg) nil) ((consp arg) (car arg)) ((numberp arg) arg) diff -r 5aa3a4e05089 -r ad9d2270860e lisp/emulation/viper-cmd.el --- a/lisp/emulation/viper-cmd.el Fri Jan 09 04:29:16 2009 +0000 +++ b/lisp/emulation/viper-cmd.el Fri Jan 09 04:36:00 2009 +0000 @@ -719,7 +719,7 @@ ARG is used as the prefix value for the executed command. If EVENTS is a list of events, which become the beginning of the command." (interactive "P") - (if (viper= last-command-char ?\\) + (if (viper= last-command-event ?\\) (message "Switched to EMACS state for the next command...")) (viper-escape-to-state arg events 'emacs-state)) @@ -773,8 +773,7 @@ last-command-char (event-to-character last-command-event)) ;; Emacs represents them as sequences (str or vec) (setq last-command-event - (viper-copy-event (viper-seq-last-elt key)) - last-command-char last-command-event)) + (viper-copy-event (viper-seq-last-elt key)))) (if (commandp com) ;; pretend that current state is the state we excaped to @@ -1170,7 +1169,7 @@ ;; then execute it with funcall and clear prefix-arg in order to not ;; confuse subsequent commands (progn - ;; last-command-char is the char we want emacs to think was typed + ;; last-command-event is the char we want emacs to think was typed ;; last. If com is not nil, the viper-digit-argument command was ;; called from within viper-prefix-arg command, such as `d', `w', ;; etc., i.e., the user typed, say, d2. In this case, `com' would be @@ -1178,13 +1177,13 @@ ;; viper-escape-to-vi (which is indicated by the fact that the ;; current state is not vi-state), then `event-char' represents the ;; vi command to be executed (e.g., `d', `w', etc). Again, - ;; last-command-char must make emacs believe that this is the command + ;; last-command-event must make emacs believe that this is the command ;; we typed. (cond ((eq event-char 'return) (setq event-char ?\C-m)) ((eq event-char 'delete) (setq event-char ?\C-?)) ((eq event-char 'backspace) (setq event-char ?\C-h)) ((eq event-char 'space) (setq event-char ?\ ))) - (setq last-command-char (or com event-char)) + (setq last-command-event (or com event-char)) (setq func (viper-exec-form-in-vi `(key-binding (char-to-string ,event-char)))) (funcall func prefix-arg) @@ -1288,7 +1287,6 @@ (if cmd-to-exec-at-end (progn - (setq last-command-char char) (setq last-command-event (viper-copy-event (if (featurep 'xemacs) (character-to-event char) char))) @@ -1315,7 +1313,7 @@ (interactive "P") (viper-leave-region-active) (viper-prefix-arg-value - last-command-char (if (consp arg) (cdr arg) nil))) + last-command-event (if (consp arg) (cdr arg) nil))) (defun viper-command-argument (arg) "Accept a motion command as an argument." @@ -1323,7 +1321,7 @@ (let ((viper-intermediate-command 'viper-command-argument)) (condition-case nil (viper-prefix-arg-com - last-command-char + last-command-event (cond ((null arg) nil) ((consp arg) (car arg)) ((integerp arg) arg) @@ -2100,7 +2098,7 @@ "Exit minibuffer Viper way." (interactive) (let (command) - (setq command (local-key-binding (char-to-string last-command-char))) + (setq command (local-key-binding (char-to-string last-command-event))) (run-hooks 'viper-minibuffer-exit-hook) (if command (command-execute command) diff -r 5aa3a4e05089 -r ad9d2270860e lisp/emulation/viper.el --- a/lisp/emulation/viper.el Fri Jan 09 04:29:16 2009 +0000 +++ b/lisp/emulation/viper.el Fri Jan 09 04:36:00 2009 +0000 @@ -288,7 +288,7 @@ ;; convoluted. Instead of viper-command-argument, keymaps should bind the ;; actual commands. E.g., "dw" should be bound to a generic command ;; viper-delete that will delete things based on the value of -;; last-command-char. This would greatly simplify the logic and the code. +;; last-command-event. This would greatly simplify the logic and the code. ;; ;; 2. Somebody should venture to write a customization package a la ;; options.el that would allow the user to change values of variables diff -r 5aa3a4e05089 -r ad9d2270860e lisp/mail/mailabbrev.el --- a/lisp/mail/mailabbrev.el Fri Jan 09 04:29:16 2009 +0000 +++ b/lisp/mail/mailabbrev.el Fri Jan 09 04:36:00 2009 +0000 @@ -1,7 +1,8 @@ ;;; mailabbrev.el --- abbrev-expansion of mail aliases ;; Copyright (C) 1985, 1986, 1987, 1992, 1993, 1996, 1997, 2000, 2001, -;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 +;; Free Software Foundation, Inc. ;; Author: Jamie Zawinski ;; Maintainer: FSF @@ -500,12 +501,12 @@ ;; when the user types -.) Check the character's syntax in ;; the usual syntax table. - (or (and (integerp last-command-char) + (or (and (integerp last-command-event) ;; Some commands such as M-> may want to expand first. (equal this-command 'self-insert-command) - (or (eq (char-syntax last-command-char) ?_) + (or (eq (char-syntax last-command-event) ?_) ;; Don't expand on @. - (memq last-command-char '(?@ ?. ?% ?! ?_ ?-)))) + (memq last-command-event '(?@ ?. ?% ?! ?_ ?-)))) ;; Use this table so that abbrevs can have hyphens in them. (with-syntax-table mail-abbrev-syntax-table (funcall expand))))