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


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/edmacro.el
Date: Fri, 21 Jun 2002 05:53:01 -0400

Index: emacs/lisp/edmacro.el
diff -c emacs/lisp/edmacro.el:1.24 emacs/lisp/edmacro.el:1.25
*** emacs/lisp/edmacro.el:1.24  Mon Jul 16 08:22:58 2001
--- emacs/lisp/edmacro.el       Fri Jun 21 05:53:01 2002
***************
*** 609,631 ****
                 (setq i (1+ i) start (1+ start)))
               res))))))
  
! (defun edmacro-fix-menu-commands (macro)
!   (when (vectorp macro)
!     (let ((i 0) ev)
!       (while (< i (length macro))
!       (when (consp (setq ev (aref macro i)))
!         (cond ((equal (cadadr ev) '(menu-bar))
!                (setq macro (vconcat (edmacro-subseq macro 0 i)
!                                     (vector 'menu-bar (car ev))
!                                     (edmacro-subseq macro (1+ i))))
!                (incf i))
                ;; It would be nice to do pop-up menus, too, but not enough
                ;; info is recorded in macros to make this possible.
                (t
                 (error "Macros with mouse clicks are not %s"
                        "supported by this command"))))
!       (incf i))))
!   macro)
  
  ;;; Parsing a human-readable keyboard macro.
  
--- 609,638 ----
                 (setq i (1+ i) start (1+ start)))
               res))))))
  
! (defun edmacro-fix-menu-commands (macro &optional noerror)
!   (if (vectorp macro)
!       (let (result)
!       ;; Make a list of the elements.
!       (setq macro (append macro nil))
!       (dolist (ev macro)
!         (cond ((atom ev)
!                (push ev result))
!               ((eq (car ev) 'help-echo))
!               ((equal ev '(menu-bar))
!                (push 'menu-bar result))
!               ((equal (cadadr ev) '(menu-bar))
!                (push (vector 'menu-bar (car ev)) result))
                ;; It would be nice to do pop-up menus, too, but not enough
                ;; info is recorded in macros to make this possible.
+               (noerror
+                ;; Just ignore mouse events.
+                nil)
                (t
                 (error "Macros with mouse clicks are not %s"
                        "supported by this command"))))
!       ;; Reverse them again and make them back into a vector.
!       (vconcat (nreverse result)))
!     macro))
  
  ;;; Parsing a human-readable keyboard macro.
  



reply via email to

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