comparison lisp/emulation/viper.el @ 19756:22c1e47f66e1

new version
author Michael Kifer <kifer@cs.stonybrook.edu>
date Fri, 05 Sep 1997 04:48:58 +0000
parents a3240ad2e954
children ad407da635c4
comparison
equal deleted inserted replaced
19755:4b765ab0b8d1 19756:22c1e47f66e1
950 "Force to read key via `read-key-sequence'." 950 "Force to read key via `read-key-sequence'."
951 (interactive (list (viper-events-to-keys 951 (interactive (list (viper-events-to-keys
952 (read-key-sequence "Describe key briefly: "))))) 952 (read-key-sequence "Describe key briefly: ")))))
953 953
954 954
955 ;; Advice for use in find-file and read-file-name commands. 955 ;; This is now done in viper-minibuffer-exit-hook
956 (defadvice exit-minibuffer (before viper-exit-minibuffer-advice activate) 956 ;;;; Advice for use in find-file and read-file-name commands.
957 "Run `viper-minibuffer-exit-hook' just before exiting the minibuffer." 957 ;;(defadvice exit-minibuffer (before viper-exit-minibuffer-advice activate)
958 (run-hooks 'viper-minibuffer-exit-hook)) 958 ;; "Run `viper-minibuffer-exit-hook' just before exiting the minibuffer."
959 ;; (run-hooks 'viper-minibuffer-exit-hook))
959 960
960 (defadvice find-file (before viper-add-suffix-advice activate) 961 (defadvice find-file (before viper-add-suffix-advice activate)
961 "Use `read-file-name' for reading arguments." 962 "Use `read-file-name' for reading arguments."
962 (interactive (cons (read-file-name "Find file: " nil default-directory) 963 (interactive (cons (read-file-name "Find file: " nil default-directory)
963 ;; if Mule and prefix argument, ask for coding system 964 ;; if Mule and prefix argument, ask for coding system
1009 ))) 1010 )))
1010 1011
1011 1012
1012 (defadvice read-file-name (around viper-suffix-advice activate) 1013 (defadvice read-file-name (around viper-suffix-advice activate)
1013 "Tell `exit-minibuffer' to run `viper-file-add-suffix' as a hook." 1014 "Tell `exit-minibuffer' to run `viper-file-add-suffix' as a hook."
1014 (let ((viper-minibuffer-exit-hook 'viper-file-add-suffix)) 1015 (let ((viper-minibuffer-exit-hook
1016 (append viper-minibuffer-exit-hook '(viper-file-add-suffix))))
1015 ad-do-it)) 1017 ad-do-it))
1016 1018
1017 (defadvice start-kbd-macro (after viper-kbd-advice activate) 1019 (defadvice start-kbd-macro (after viper-kbd-advice activate)
1018 "Remove Viper's intercepting bindings for C-x ). 1020 "Remove Viper's intercepting bindings for C-x ).
1019 This may be needed if the previous `:map' command terminated abnormally." 1021 This may be needed if the previous `:map' command terminated abnormally."