Show
Ignore:
Timestamp:
04/07/07 15:49:28 (2 years ago)
Author:
miyoshi
Message:

Sync up with Emacs CVS HEAD.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lisp/emulation/viper.el

    r4190 r4200  
    10281028  (defadvice describe-key (before viper-describe-key-ad protect activate) 
    10291029    "Force to read key via `viper-read-key-sequence'." 
    1030     (interactive (list (viper-read-key-sequence "Describe key: ")) 
    1031                  )) 
     1030    (interactive (let (key) 
     1031                   (setq key (viper-read-key-sequence 
     1032                              "Describe key (or click or menu item): ")) 
     1033                   (list key 
     1034                         (prefix-numeric-value current-prefix-arg) 
     1035                         ;; If KEY is a down-event, read also the 
     1036                         ;; corresponding up-event. 
     1037                         (and (vectorp key) 
     1038                              (let ((last-idx (1- (length key)))) 
     1039                                (and (eventp (aref key last-idx)) 
     1040                                     (memq 'down (event-modifiers 
     1041                                                  (aref key last-idx))))) 
     1042                              (or (and (eventp (aref key 0)) 
     1043                                       (memq 'down (event-modifiers 
     1044                                                    (aref key 0))) 
     1045                                       ;; For the C-down-mouse-2 popup 
     1046                                       ;; menu, there is no subsequent up-event. 
     1047                                       (= (length key) 1)) 
     1048                                  (and (> (length key) 1) 
     1049                                       (eventp (aref key 1)) 
     1050                                       (memq 'down (event-modifiers (aref key 1))))) 
     1051                              (read-event)))))) 
    10321052 
    10331053  (defadvice describe-key-briefly 
    10341054    (before viper-describe-key-briefly-ad protect activate) 
    10351055    "Force to read key via `viper-read-key-sequence'." 
    1036     (interactive (list (viper-read-key-sequence "Describe key briefly: ")))) 
    1037  
     1056    (interactive (let (key) 
     1057                   (setq key (viper-read-key-sequence 
     1058                              "Describe key (or click or menu item): ")) 
     1059                   ;; If KEY is a down-event, read and discard the 
     1060                   ;; corresponding up-event. 
     1061                   (and (vectorp key) 
     1062                        (let ((last-idx (1- (length key)))) 
     1063                          (and (eventp (aref key last-idx)) 
     1064                               (memq 'down (event-modifiers (aref key last-idx))))) 
     1065                        (read-event)) 
     1066                   (list key 
     1067                         (if current-prefix-arg 
     1068                             (prefix-numeric-value current-prefix-arg)) 
     1069                         1)))) 
    10381070 
    10391071  (defadvice find-file (before viper-add-suffix-advice activate)