/[emacs]/emacs/lisp/edmacro.el
ViewVC logotype

Diff of /emacs/lisp/edmacro.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.24.8.1 by miles, Fri Apr 4 06:20:04 2003 UTC revision 1.24.8.2 by miles, Tue Oct 14 23:50:59 2003 UTC
# Line 418  doubt, use whitespace." Line 418  doubt, use whitespace."
418                           (while (memq (aref rest-mac i) (cdr mdigs))                           (while (memq (aref rest-mac i) (cdr mdigs))
419                             (incf i))                             (incf i))
420                           (and (not (memq (aref rest-mac i) pkeys))                           (and (not (memq (aref rest-mac i) pkeys))
421                                (prog1 (concat "M-" (edmacro-subseq rest-mac 0 i) " ")                                (prog1 (vconcat "M-" (edmacro-subseq rest-mac 0 i) " ")
422                                  (callf edmacro-subseq rest-mac i)))))                                  (callf edmacro-subseq rest-mac i)))))
423                    (and (eq (aref rest-mac 0) ?\C-u)                    (and (eq (aref rest-mac 0) ?\C-u)
424                         (eq (key-binding [?\C-u]) 'universal-argument)                         (eq (key-binding [?\C-u]) 'universal-argument)
# Line 437  doubt, use whitespace." Line 437  doubt, use whitespace."
437                                        '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9))                                        '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9))
438                             (incf i))                             (incf i))
439                           (and (not (memq (aref rest-mac i) pkeys))                           (and (not (memq (aref rest-mac i) pkeys))
440                                (prog1 (concat "C-u " (edmacro-subseq rest-mac 1 i) " ")                                (prog1 (vconcat "C-u " (edmacro-subseq rest-mac 1 i) " ")
441                                  (callf edmacro-subseq rest-mac i)))))))                                  (callf edmacro-subseq rest-mac i)))))))
442               (bind-len (apply 'max 1               (bind-len (apply 'max 1
443                                (loop for map in maps                                (loop for map in maps
# Line 525  doubt, use whitespace." Line 525  doubt, use whitespace."
525                                 (t                                 (t
526                                  (error "Unrecognized item in macro: %s" ch)))))                                  (error "Unrecognized item in macro: %s" ch)))))
527                             (or fkey key) " "))))                             (or fkey key) " "))))
528          (if prefix (setq desc (concat prefix desc)))          (if prefix
529                (setq desc (concat (edmacro-sanitize-for-string prefix) desc)))
530          (unless (string-match " " desc)          (unless (string-match " " desc)
531            (let ((times 1) (pos bind-len))            (let ((times 1) (pos bind-len))
532              (while (not (edmacro-mismatch rest-mac rest-mac              (while (not (edmacro-mismatch rest-mac rest-mac
# Line 608  If START or END is negative, it counts f Line 609  If START or END is negative, it counts f
609                   (setq i (1+ i) start (1+ start)))                   (setq i (1+ i) start (1+ start)))
610                 res))))))                 res))))))
611    
612    (defun edmacro-sanitize-for-string (seq)
613      "Convert a key sequence vector into a string.
614    The string represents the same events; Meta is indicated by bit 7.
615    This function assumes that the events can be stored in a string."
616      (setq seq (copy-sequence seq))
617      (loop for i below (length seq) do
618            (when (< (aref seq i) 0)
619              (setf (aref seq i) (logand (aref seq i) 127))))
620      seq)
621    
622  (defun edmacro-fix-menu-commands (macro &optional noerror)  (defun edmacro-fix-menu-commands (macro &optional noerror)
623    (if (vectorp macro)    (if (vectorp macro)
624        (let (result)        (let (result)
# Line 727  If START or END is negative, it counts f Line 738  If START or END is negative, it counts f
738    
739  (provide 'edmacro)  (provide 'edmacro)
740    
741    ;;; arch-tag: 726807b4-3ae6-49de-b0ae-b9590973e0d7
742  ;;; edmacro.el ends here  ;;; edmacro.el ends here

Legend:
Removed from v.1.24.8.1  
changed lines
  Added in v.1.24.8.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26