emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/edmacro.el [lexbind]


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/edmacro.el [lexbind]
Date: Tue, 14 Oct 2003 19:51:45 -0400

Index: emacs/lisp/edmacro.el
diff -c emacs/lisp/edmacro.el:1.24.8.1 emacs/lisp/edmacro.el:1.24.8.2
*** emacs/lisp/edmacro.el:1.24.8.1      Fri Apr  4 01:20:04 2003
--- emacs/lisp/edmacro.el       Tue Oct 14 19:50:59 2003
***************
*** 418,424 ****
                         (while (memq (aref rest-mac i) (cdr mdigs))
                           (incf i))
                         (and (not (memq (aref rest-mac i) pkeys))
!                             (prog1 (concat "M-" (edmacro-subseq rest-mac 0 i) 
" ")
                                (callf edmacro-subseq rest-mac i)))))
                  (and (eq (aref rest-mac 0) ?\C-u)
                       (eq (key-binding [?\C-u]) 'universal-argument)
--- 418,424 ----
                         (while (memq (aref rest-mac i) (cdr mdigs))
                           (incf i))
                         (and (not (memq (aref rest-mac i) pkeys))
!                             (prog1 (vconcat "M-" (edmacro-subseq rest-mac 0 
i) " ")
                                (callf edmacro-subseq rest-mac i)))))
                  (and (eq (aref rest-mac 0) ?\C-u)
                       (eq (key-binding [?\C-u]) 'universal-argument)
***************
*** 437,443 ****
                                      '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9))
                           (incf i))
                         (and (not (memq (aref rest-mac i) pkeys))
!                             (prog1 (concat "C-u " (edmacro-subseq rest-mac 1 
i) " ")
                                (callf edmacro-subseq rest-mac i)))))))
             (bind-len (apply 'max 1
                              (loop for map in maps
--- 437,443 ----
                                      '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9))
                           (incf i))
                         (and (not (memq (aref rest-mac i) pkeys))
!                             (prog1 (vconcat "C-u " (edmacro-subseq rest-mac 1 
i) " ")
                                (callf edmacro-subseq rest-mac i)))))))
             (bind-len (apply 'max 1
                              (loop for map in maps
***************
*** 525,531 ****
                               (t
                                (error "Unrecognized item in macro: %s" ch)))))
                           (or fkey key) " "))))
!       (if prefix (setq desc (concat prefix desc)))
        (unless (string-match " " desc)
          (let ((times 1) (pos bind-len))
            (while (not (edmacro-mismatch rest-mac rest-mac
--- 525,532 ----
                               (t
                                (error "Unrecognized item in macro: %s" ch)))))
                           (or fkey key) " "))))
!       (if prefix
!           (setq desc (concat (edmacro-sanitize-for-string prefix) desc)))
        (unless (string-match " " desc)
          (let ((times 1) (pos bind-len))
            (while (not (edmacro-mismatch rest-mac rest-mac
***************
*** 608,613 ****
--- 609,624 ----
                 (setq i (1+ i) start (1+ start)))
               res))))))
  
+ (defun edmacro-sanitize-for-string (seq)
+   "Convert a key sequence vector into a string.
+ 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)
+           (setf (aref seq i) (logand (aref seq i) 127))))
+   seq)
+ 
  (defun edmacro-fix-menu-commands (macro &optional noerror)
    (if (vectorp macro)
        (let (result)
***************
*** 727,730 ****
--- 738,742 ----
  
  (provide 'edmacro)
  
+ ;;; arch-tag: 726807b4-3ae6-49de-b0ae-b9590973e0d7
  ;;; edmacro.el ends here




reply via email to

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