emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/lisp ChangeLog emulation/vi.el emulation/...


From: Glenn Morris
Subject: [Emacs-diffs] emacs/lisp ChangeLog emulation/vi.el emulation/...
Date: Fri, 09 Jan 2009 04:36:05 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Glenn Morris <gm>       09/01/09 04:36:04

Modified files:
        lisp           : ChangeLog 
        lisp/emulation : vi.el vip.el viper-cmd.el viper.el 
        lisp/mail      : mailabbrev.el 

Log message:
        Replace last-command-char with last-command-event.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15070&r2=1.15071
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/emulation/vi.el?cvsroot=emacs&r1=1.32&r2=1.33
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/emulation/vip.el?cvsroot=emacs&r1=1.48&r2=1.49
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/emulation/viper-cmd.el?cvsroot=emacs&r1=1.81&r2=1.82
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/emulation/viper.el?cvsroot=emacs&r1=1.120&r2=1.121
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/mail/mailabbrev.el?cvsroot=emacs&r1=1.93&r2=1.94

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15070
retrieving revision 1.15071
diff -u -b -r1.15070 -r1.15071
--- ChangeLog   9 Jan 2009 04:29:16 -0000       1.15070
+++ ChangeLog   9 Jan 2009 04:36:00 -0000       1.15071
@@ -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:

Index: emulation/vi.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emulation/vi.el,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -b -r1.32 -r1.33
--- emulation/vi.el     6 Dec 2007 04:07:24 -0000       1.32
+++ emulation/vi.el     9 Jan 2009 04:36:04 -0000       1.33
@@ -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))))

Index: emulation/vip.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emulation/vip.el,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -b -r1.48 -r1.49
--- emulation/vip.el    5 Jan 2009 03:21:19 -0000       1.48
+++ emulation/vip.el    9 Jan 2009 04:36:04 -0000       1.49
@@ -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)

Index: emulation/viper-cmd.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emulation/viper-cmd.el,v
retrieving revision 1.81
retrieving revision 1.82
diff -u -b -r1.81 -r1.82
--- emulation/viper-cmd.el      5 Jan 2009 03:21:20 -0000       1.81
+++ emulation/viper-cmd.el      9 Jan 2009 04:36:04 -0000       1.82
@@ -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)

Index: emulation/viper.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/emulation/viper.el,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -b -r1.120 -r1.121
--- emulation/viper.el  5 Jan 2009 03:21:23 -0000       1.120
+++ emulation/viper.el  9 Jan 2009 04:36:04 -0000       1.121
@@ -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

Index: mail/mailabbrev.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/mail/mailabbrev.el,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -b -r1.93 -r1.94
--- mail/mailabbrev.el  5 Jan 2009 03:22:33 -0000       1.93
+++ mail/mailabbrev.el  9 Jan 2009 04:36:04 -0000       1.94
@@ -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 <address@hidden; now address@hidden>
 ;; 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))))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]