diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-06-20 00:48:49 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-06-20 12:51:38 +0200 |
commit | dfec2bc7853fbef72f4306dcee3807b5dc9f6064 (patch) | |
tree | 199b0bc428b783a65bc6dea1fd88d10387e0cacf /lisp/emulation/viper.el | |
parent | 82aeaf16061e5c79b5d936ae8af33783b572a40f (diff) | |
download | emacs-dfec2bc7853fbef72f4306dcee3807b5dc9f6064.tar.gz |
Remove most of the XEmacs compat code from viper*.el
* lisp/emulation/viper-cmd.el ()
(viper-insert-state-post-command-sentinel)
(viper-change-state-to-vi, viper-change-state-to-insert)
(viper-change-state-to-emacs, viper-escape-to-state)
(viper-special-read-and-insert-char, viper-toggle-key-action)
(viper-prefix-arg-value, viper-prefix-arg-com)
(viper-digit-argument, viper-command-argument, )
(viper-exec-Yank, viper-repeat, viper-forward-char)
(viper-backward-char, viper-forward-word, viper-forward-Word)
(viper-end-of-word, viper-end-of-Word, viper-backward-word)
(viper-backward-Word, viper-beginning-of-line)
(viper-bol-and-skip-white, viper-goto-eol, viper-goto-col)
(viper-next-line, viper-next-line-at-bol, viper-previous-line)
(viper-previous-line-at-bol, viper-goto-line, )
(viper-repeat-find, viper-repeat-find-opposite)
(viper-window-top, viper-window-middle, viper-window-bottom)
(viper-paren-match, viper-search, viper-buffer-search-enable)
(viper-put-back, viper-Put-back, viper-mark-point)
(viper-cycle-through-mark-ring, viper-goto-mark-subr)
(viper-brac-function, viper-register-to-point)
(viper-submit-report): Remove some XEmacs compat code.
* lisp/emulation/viper-ex.el (viper-get-ex-address-subr)
(viper-handle-!, ex-edit, ex-mark, ex-next-related-buffer)
(ex-help, ex-write, ex-write-info, viper-info-on-file): Ditto.
* lisp/emulation/viper-keym.el (viper-add-keymap): Ditto.
* lisp/emulation/viper-macs.el (viper-record-kbd-macro): Remove
XEmacs compat code.
* lisp/emulation/viper-mous.el (viper-mouse-click-insert-word)
(viper-mouse-click-search-word): Remove some XEmacs compat code.
* lisp/emulation/viper-util.el (viper-overlay-p)
(viper-color-defined-p, viper-iconify, viper-memq-char)
(viper-char-equal, viper=, viper-color-display-p)
(viper-get-cursor-color, viper-frame-value)
(viper-change-cursor-color, viper-save-cursor-color)
(viper-restore-cursor-color, viper-get-visible-buffer-window)
(viper-file-checked-in-p, viper-put-on-search-overlay)
(viper-flash-search-pattern, viper-hide-search-overlay)
(viper-move-replace-overlay, viper-set-replace-overlay)
(viper-set-replace-overlay-glyphs, viper-hide-replace-overlay)
(viper-replace-start, viper-replace-end)
(viper-set-minibuffer-overlay, viper-check-minibuffer-overlay)
(viper-abbreviate-file-name, viper-mark-marker)
(viper-set-mark-if-necessary, viper-leave-region-active)
(viper-copy-event, viper-read-event-convert-to-char)
(viper-event-key, viper-last-command-char)
(viper-key-to-emacs-key, viper-eventify-list-xemacs)
(viper-set-unread-command-events, viper-char-array-p)
(viper-key-press-events-to-chars, viper-read-char-exclusive):
Remove most of the XEmacs compat code.
* lisp/emulation/viper.el (viper-go-away, viper-set-hooks)
(viper-non-hook-settings): Remove some XEmacs compat code.
Diffstat (limited to 'lisp/emulation/viper.el')
-rw-r--r-- | lisp/emulation/viper.el | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/lisp/emulation/viper.el b/lisp/emulation/viper.el index d6912ee3675..521edbe6048 100644 --- a/lisp/emulation/viper.el +++ b/lisp/emulation/viper.el @@ -700,8 +700,6 @@ It also can't undo some Viper settings." (and (fboundp 'add-to-ordered-list) (boundp 'emulation-mode-map-alists)) (viper-delocalize-var 'minor-mode-map-alist)) (viper-delocalize-var 'require-final-newline) - (if (featurep 'xemacs) (viper-delocalize-var 'bar-cursor)) - ;; deactivate all advices done by Viper. (viper--deactivate-advice-list) @@ -787,8 +785,6 @@ It also can't undo some Viper settings." ;; In emacs, we have to advice handle-switch-frame ;; This advice is undone earlier, when all advices matching "viper-" are ;; deactivated. - (if (featurep 'xemacs) - (remove-hook 'mouse-leave-frame-hook #'viper-remember-current-frame)) ) ; end viper-go-away @@ -935,15 +931,7 @@ Two differences: (lambda (orig-fun &rest args) ;; FIXME: Use remapping? (if (and (eq viper-current-state 'vi-state) - ;; Do not use called-interactively-p here. XEmacs does not have it - ;; and interactive-p is just fine. - (if (featurep 'xemacs) - (interactive-p) - ;; Respect the spirit of the above comment, though it - ;; seems pointless, since XE doesn't have advice-add or - ;; lexical binding or any other of the newer features - ;; this file uses. - (called-interactively-p 'interactive))) + (called-interactively-p 'interactive)) (beep 1) (apply orig-fun args)))) @@ -1083,13 +1071,11 @@ This may be needed if the previous `:map' command terminated abnormally." ;; catch frame switching event (if (viper-window-display-p) - (if (featurep 'xemacs) - (add-hook 'mouse-leave-frame-hook - #'viper-remember-current-frame) - (viper--advice-add 'handle-switch-frame :before - (lambda (&rest _) - "Remember the selected frame before the switch-frame event." - (viper-remember-current-frame (selected-frame)))))) + (viper--advice-add + 'handle-switch-frame :before + (lambda (&rest _) + "Remember the selected frame before the switch-frame event." + (viper-remember-current-frame (selected-frame))))) ) ; end viper-non-hook-settings |