summaryrefslogtreecommitdiff
path: root/lisp/emulation/viper.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2018-09-12 21:47:39 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2018-09-12 21:47:39 -0400
commitf066999b6540451c590cbe32113fae61c4778ba3 (patch)
tree6e4741ec3cd1f0b94c87f5c4c5abfd4fd620e09e /lisp/emulation/viper.el
parentdf3d7e401b1b0e34b3f6583894f05841270fc1db (diff)
downloademacs-f066999b6540451c590cbe32113fae61c4778ba3.tar.gz
(viper-read-key, viper-read-key-sequence): Remove
Ever since the time-dependent ESC handling was moved to input-decode-map, viper-read-key-sequence has been obsolete. Clean up accordingly. * lisp/emulation/viper-keym.el: Use lexical-binding. (viper-overriding-map): Remove. * lisp/emulation/viper-macs.el: Use lexical-binding and 'read-key'. * lisp/emulation/viper-util.el: Use lexical-binding. (viper-read-key, viper-read-key-sequence): Remove. * lisp/emulation/viper.el (viper-non-hook-settings): Remove obsolete advice.
Diffstat (limited to 'lisp/emulation/viper.el')
-rw-r--r--lisp/emulation/viper.el102
1 files changed, 0 insertions, 102 deletions
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el
index 8604020b987..8dd150bf7c8 100644
--- a/lisp/emulation/viper.el
+++ b/lisp/emulation/viper.el
@@ -1057,108 +1057,6 @@ Two differences:
(setq global-mode-string
(append '("" viper-mode-string) (cdr global-mode-string))))
- (if (featurep 'xemacs)
- ;; XEmacs
- (defadvice describe-key (before viper-describe-key-ad protect activate)
- "Force to read key via `viper-read-key-sequence'."
- (interactive (list (viper-read-key-sequence "Describe key: "))))
- ;; Emacs
- (viper--advice-add 'describe-key :before
- (lambda (&rest _)
- "Force to read key via `viper-read-key-sequence'."
- (interactive (let ((key (viper-read-key-sequence
- "Describe key (or click or menu item): ")))
- (list key
- (prefix-numeric-value current-prefix-arg)
- ;; If KEY is a down-event, read also the
- ;; corresponding up-event.
- (and (vectorp key)
- (let ((last-idx (1- (length key))))
- (and (eventp (aref key last-idx))
- (memq 'down (event-modifiers
- (aref key last-idx)))))
- (or (and (eventp (aref key 0))
- (memq 'down (event-modifiers
- (aref key 0)))
- ;; For the C-down-mouse-2 popup menu,
- ;; there is no subsequent up-event
- (= (length key) 1))
- (and (> (length key) 1)
- (eventp (aref key 1))
- (memq 'down (event-modifiers (aref key 1)))))
- (read-event)))))
- nil))
-
- ) ; (if (featurep 'xemacs)
-
- (if (featurep 'xemacs)
- ;; XEmacs
- (defadvice describe-key-briefly
- (before viper-describe-key-briefly-ad protect activate)
- "Force to read key via `viper-read-key-sequence'."
- (interactive (list (viper-read-key-sequence "Describe key briefly: "))))
- ;; Emacs
- (viper--advice-add 'describe-key-briefly :before
- (lambda (&rest _)
- "Force to read key via `viper-read-key-sequence'."
- (interactive (let ((key (viper-read-key-sequence
- "Describe key (or click or menu item): ")))
- ;; If KEY is a down-event, read and discard the
- ;; corresponding up-event.
- (and (vectorp key)
- (let ((last-idx (1- (length key))))
- (and (eventp (aref key last-idx))
- (memq 'down (event-modifiers (aref key last-idx)))))
- (read-event))
- (list key
- (if current-prefix-arg
- (prefix-numeric-value current-prefix-arg))
- 1)))
- nil))
- ) ; (if (featurep 'xemacs)
-
- ;; FIXME: The default already uses read-file-name, so it looks like this
- ;; advice is not needed any more.
- ;; (defadvice find-file (before viper-add-suffix-advice activate)
- ;; "Use `read-file-name' for reading arguments."
- ;; (interactive (cons (read-file-name "Find file: " nil default-directory)
- ;; ;; XEmacs: if Mule & prefix arg, ask for coding system
- ;; (cond ((and (featurep 'xemacs) (featurep 'mule))
- ;; (list
- ;; (and current-prefix-arg
- ;; (read-coding-system "Coding-system: "))))
- ;; ;; Emacs: do wildcards
- ;; ((and (featurep 'emacs) (boundp 'find-file-wildcards))
- ;; (list find-file-wildcards))))
- ;; ))
- ;; (defadvice find-file-other-window (before viper-add-suffix-advice activate)
- ;; "Use `read-file-name' for reading arguments."
- ;; (interactive (cons (read-file-name "Find file in other window: "
- ;; nil default-directory)
- ;; ;; XEmacs: if Mule & prefix arg, ask for coding system
- ;; (cond ((and (featurep 'xemacs) (featurep 'mule))
- ;; (list
- ;; (and current-prefix-arg
- ;; (read-coding-system "Coding-system: "))))
- ;; ;; Emacs: do wildcards
- ;; ((and (featurep 'emacs) (boundp 'find-file-wildcards))
- ;; (list find-file-wildcards))))
- ;; ))
- ;; (defadvice find-file-other-frame (before viper-add-suffix-advice activate)
- ;; "Use `read-file-name' for reading arguments."
- ;; (interactive (cons (read-file-name "Find file in other frame: "
- ;; nil default-directory)
- ;; ;; XEmacs: if Mule & prefix arg, ask for coding system
- ;; (cond ((and (featurep 'xemacs) (featurep 'mule))
- ;; (list
- ;; (and current-prefix-arg
- ;; (read-coding-system "Coding-system: "))))
- ;; ;; Emacs: do wildcards
- ;; ((and (featurep 'emacs) (boundp 'find-file-wildcards))
- ;; (list find-file-wildcards))))
- ;; ))
-
-
(viper--advice-add 'read-file-name :around
(lambda (orig-fun &rest args)
"Tell `exit-minibuffer' to run `viper-file-add-suffix' as a hook."