~ubuntu-branches/ubuntu/karmic/emacs-snapshot/karmic

« back to all changes in this revision

Viewing changes to lisp/kmacro.el

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-04-05 09:14:30 UTC
  • mto: This revision was merged to the branch mainline in revision 34.
  • Revision ID: james.westby@ubuntu.com-20090405091430-nw07lynn2arotjbe
Tags: upstream-20090320
ImportĀ upstreamĀ versionĀ 20090320

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
;;; kmacro.el --- enhanced keyboard macros
2
2
 
3
 
;; Copyright (C) 2002, 2003, 2004, 2005, 2006,
4
 
;;   2007, 2008 Free Software Foundation, Inc.
 
3
;; Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
 
4
;;   Free Software Foundation, Inc.
5
5
 
6
6
;; Author: Kim F. Storm <storm@cua.dk>
7
7
;; Keywords: keyboard convenience
253
253
 
254
254
 
255
255
(defun kmacro-insert-counter (arg)
256
 
  "Insert macro counter and increment with ARG or 1 if missing.
257
 
With \\[universal-argument], insert previous `kmacro-counter' (but do not modify counter)."
 
256
  "Insert macro counter, then increment it by ARG.
 
257
Interactively, ARG defaults to 1.  With \\[universal-argument], insert
 
258
previous `kmacro-counter', and do not modify counter."
258
259
  (interactive "P")
259
260
  (if kmacro-initial-counter-value
260
261
      (setq kmacro-counter kmacro-initial-counter-value
1195
1196
        (setq this-command 'ignore)
1196
1197
      (setq this-command cmd)
1197
1198
      (if (memq this-command '(self-insert-command digit-argument))
1198
 
          (setq last-command-char (aref keys (1- (length keys)))))
 
1199
          (setq last-command-event (aref keys (1- (length keys)))))
1199
1200
      (if keys
1200
1201
          (setq kmacro-step-edit-new-macro (vconcat kmacro-step-edit-new-macro keys))))
1201
1202
    (setq kmacro-step-edit-key-index next-index)))