]> code.delx.au - gnu-emacs/blobdiff - lisp/edmacro.el
(find-file, find-file-other-window, find-file-other-frame, find-file-existing)
[gnu-emacs] / lisp / edmacro.el
index 0db09d7eebead991524e11ee0e72ed84ce7391e0..d914d409d055fdb2531bdefbc2882e60f1a735fc 100644 (file)
@@ -1,6 +1,7 @@
 ;;; edmacro.el --- keyboard macro editor
 
-;; Copyright (C) 1993, 1994 Free Software Foundation, Inc.
+;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
+;;   2005, 2006, 2007 Free Software Foundation, Inc.
 
 ;; Author: Dave Gillespie <daveg@synaptics.com>
 ;; Maintainer: Dave Gillespie <daveg@synaptics.com>
@@ -11,7 +12,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
 ;;; Usage:
 ;;
-;; The `C-x C-k' (`edit-kbd-macro') command edits a keyboard macro
+;; The `C-x C-k e' (`edit-kbd-macro') command edits a keyboard macro
 ;; in a special buffer.  It prompts you to type a key sequence,
 ;; which should be one of:
 ;;
@@ -266,7 +267,8 @@ or nil, use a compact 80-column format."
                            (and b (commandp b) (not (arrayp b))
                                 (not (kmacro-extract-lambda b))
                                 (or (not (fboundp b))
-                                    (not (arrayp (symbol-function b))))
+                                    (not (or (arrayp (symbol-function b))
+                                             (get b 'kmacro))))
                                 (not (y-or-n-p
                                       (format "Key %s is already defined; %s"
                                               (edmacro-format-keys key 1)
@@ -279,7 +281,7 @@ or nil, use a compact 80-column format."
                    (let ((str (buffer-substring (match-beginning 1)
                                                 (match-end 1))))
                      (unless (equal str "")
-                       (setq mac-counter (string-to-int str))))
+                       (setq mac-counter (string-to-number str))))
                    t)
                   ((looking-at "Format:[ \t]*\"\\([^\n]*\\)\"[ \t]*$")
                    (when edmacro-store-hook
@@ -655,7 +657,7 @@ The string represents the same events; Meta is indicated by bit 7.
 This function assumes that the events can be stored in a string."
   (setq seq (copy-sequence seq))
   (loop for i below (length seq) do
-        (when (< (aref seq i) 0)
+        (when (logand (aref seq i) 128)
           (setf (aref seq i) (logand (aref seq i) 127))))
   seq)
 
@@ -668,6 +670,7 @@ This function assumes that the events can be stored in a string."
          (cond ((atom ev)
                 (push ev result))
                ((eq (car ev) 'help-echo))
+               ((eq (car ev) 'switch-frame))
                ((equal ev '(menu-bar))
                 (push 'menu-bar result))
                ((equal (cadadr ev) '(menu-bar))
@@ -697,7 +700,7 @@ This function assumes that the events can be stored in a string."
            (times 1))
        (setq pos (match-end 0))
        (when (string-match "\\([0-9]+\\)\\*." word)
-         (setq times (string-to-int (substring word 0 (match-end 1))))
+         (setq times (string-to-number (substring word 0 (match-end 1))))
          (setq word (substring word (1+ (match-end 1)))))
        (cond ((string-match "^<<.+>>$" word)
               (setq key (vconcat (if (eq (key-binding [?\M-x])