aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--evil-commands.el10
-rw-r--r--evil-common.el29
-rw-r--r--evil-core.el2
-rw-r--r--evil-ex.el38
-rw-r--r--evil-macros.el4
-rw-r--r--evil-pkg.el3
-rw-r--r--lib/undo-tree.el4
7 files changed, 11 insertions, 79 deletions
diff --git a/evil-commands.el b/evil-commands.el
index 6bf7c3a..78c6860 100644
--- a/evil-commands.el
+++ b/evil-commands.el
@@ -32,10 +32,6 @@
(require 'evil-command-window)
(require 'evil-jumps)
-;;; Compatibility for Emacs 23
-(unless (fboundp 'window-body-width)
- (defalias 'window-body-width 'window-width))
-
;;; Motions
;; Movement commands, or motions, are defined with the macro
@@ -1301,7 +1297,7 @@ Save in REGISTER or in the kill-ring with YANK-HANDLER."
(t
(delete-region beg end)))
;; place cursor on beginning of line
- (when (and (evil-called-interactively-p)
+ (when (and (called-interactively-p 'any)
(eq type 'line))
(evil-first-non-blank)))
@@ -2126,7 +2122,7 @@ lines. This is the default behaviour for Visual-state insertion."
(prog1 (count-lines evil-visual-beginning evil-visual-end)
(set-mark m)))))
(evil-visual-state-p)))
- (if (and (evil-called-interactively-p)
+ (if (and (called-interactively-p 'any)
(evil-visual-state-p))
(cond
((eq (evil-visual-type) 'line)
@@ -2169,7 +2165,7 @@ the lines."
(evil-visual-rotate 'upper-left)
(prog1 (count-lines evil-visual-beginning evil-visual-end)
(set-mark m)))))))
- (if (and (evil-called-interactively-p)
+ (if (and (called-interactively-p 'any)
(evil-visual-state-p))
(cond
((or (eq (evil-visual-type) 'line)
diff --git a/evil-common.el b/evil-common.el
index 0e28aa7..f95d528 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -38,12 +38,6 @@
(declare-function evil-ex-p "evil-ex")
(declare-function evil-set-jump "evil-jumps")
-;;; Compatibility for Emacs 23
-(unless (fboundp 'deactivate-input-method)
- (defalias 'deactivate-input-method 'inactivate-input-method))
-(unless (boundp 'input-method-deactivate-hook)
- (defvaralias 'input-method-deactivate-hook 'input-method-inactivate-hook))
-
(condition-case nil
(require 'windmove)
(error
@@ -51,29 +45,6 @@
window commands not available.")
nil))
-;;; Compatibility with different Emacs versions
-
-(defmacro evil-called-interactively-p ()
- "Wrapper for `called-interactively-p'.
-In older versions of Emacs, `called-interactively-p' takes
-no arguments. In Emacs 23.2 and newer, it takes one argument."
- (if (version< emacs-version "23.2")
- '(called-interactively-p)
- '(called-interactively-p 'any)))
-
-(unless (fboundp 'region-active-p)
- (defun region-active-p ()
- "Returns t iff region and mark are active."
- (and transient-mark-mode mark-active)))
-
-;; Emacs <23 does not know `characterp'
-(unless (fboundp 'characterp)
- (defalias 'characterp 'char-valid-p))
-
-;; `make-char-table' requires this property in Emacs 22
-(unless (get 'display-table 'char-table-extra-slots)
- (put 'display-table 'char-table-extra-slots 0))
-
;; macro helper
(eval-and-compile
(defun evil-unquote (exp)
diff --git a/evil-core.el b/evil-core.el
index e5e0267..a27857c 100644
--- a/evil-core.el
+++ b/evil-core.el
@@ -1229,7 +1229,7 @@ If ARG is nil, don't display a message in the echo area.%s" name doc)
(unless evil-no-display
(evil-refresh-cursor ',state)
(evil-refresh-mode-line ',state)
- (when (evil-called-interactively-p)
+ (when (called-interactively-p 'any)
(redisplay)))
,@body
(run-hooks ',entry-hook)
diff --git a/evil-ex.el b/evil-ex.el
index 23a164c..4d12e90 100644
--- a/evil-ex.el
+++ b/evil-ex.el
@@ -579,43 +579,9 @@ argument handler that requires shell completion."
'(evil-ex-command-completion-at-point
evil-ex-argument-completion-at-point))))
-;; because this variable is used only for Emacs 23 shell completion,
-;; we put it here instead of "evil-vars.el"
-(defvar evil-ex-shell-argument-range nil
- "Internal helper variable for Emacs 23 shell completion.")
-
-(defun evil-ex-shell-command-completion-at-point ()
- "Completion at point function for shell commands."
- (cond
- ;; Emacs 24
- ((fboundp 'comint-completion-at-point)
- (comint-completion-at-point))
- ;; Emacs 23
- ((fboundp 'minibuffer-complete-shell-command)
- (set (make-local-variable 'evil-ex-shell-argument-range)
- (list (point-min) (point-max)))
- #'(lambda ()
- ;; We narrow the buffer to the argument so
- ;; `minibuffer-complete-shell-command' will correctly detect
- ;; the beginning of the argument. When narrowing the buffer
- ;; to the argument the leading text in the minibuffer will be
- ;; hidden. Therefore we add a dummy overlay which shows that
- ;; text during narrowing.
- (let* ((beg (car evil-ex-shell-argument-range))
- (end (cdr evil-ex-shell-argument-range))
- (prev-text (buffer-substring
- (point-min)
- (car evil-ex-shell-argument-range)))
- (ov (make-overlay beg beg)))
- (overlay-put ov 'before-string prev-text)
- (save-restriction
- (apply #'narrow-to-region evil-ex-shell-argument-range)
- (minibuffer-complete-shell-command))
- (delete-overlay ov))))))
-
(evil-ex-define-argument-type shell
"Shell argument type, supports completion."
- :completion-at-point evil-ex-shell-command-completion-at-point
+ :completion-at-point comint-completion-at-point
:runner evil-ex-init-shell-argument-completion)
(defun evil-ex-file-or-shell-command-completion-at-point ()
@@ -623,7 +589,7 @@ argument handler that requires shell completion."
(= (char-after (point-min)) ?!))
(save-restriction
(narrow-to-region (1+ (point-min)) (point-max))
- (evil-ex-shell-command-completion-at-point))
+ (comint-completion-at-point))
(list (point-min) (point-max) #'read-file-name-internal)))
(evil-ex-define-argument-type file-or-shell
diff --git a/evil-macros.el b/evil-macros.el
index 13bff5c..aca963f 100644
--- a/evil-macros.el
+++ b/evil-macros.el
@@ -396,7 +396,7 @@ if COUNT is positive, and to the left of it if negative.
(cond
;; Visual state: extend the current selection
((and (evil-visual-state-p)
- (evil-called-interactively-p))
+ (called-interactively-p 'any))
;; if we are at the beginning of the Visual selection,
;; go to the left (negative COUNT); if at the end,
;; go to the right (positive COUNT)
@@ -518,7 +518,7 @@ if COUNT is positive, and to the left of it if negative.
(unwind-protect
(let ((evil-inhibit-operator evil-inhibit-operator-value))
(unless (and evil-inhibit-operator
- (evil-called-interactively-p))
+ (called-interactively-p 'any))
,@body))
(setq evil-inhibit-operator-value nil)))))
diff --git a/evil-pkg.el b/evil-pkg.el
index 6cb699c..80b7643 100644
--- a/evil-pkg.el
+++ b/evil-pkg.el
@@ -2,6 +2,7 @@
"evil"
"1.2.12"
"Extensible Vi layer for Emacs."
- '((undo-tree "0.6.3")
+ '((emacs "24.1")
+ (undo-tree "0.6.3")
(goto-chg "1.6")
(cl-lib "0.5")))
diff --git a/lib/undo-tree.el b/lib/undo-tree.el
index 3e3f9b6..1ff99b2 100644
--- a/lib/undo-tree.el
+++ b/lib/undo-tree.el
@@ -51,9 +51,7 @@
;; Installation
;; ============
;;
-;; This package has only been tested with Emacs versions 24 and CVS. It should
-;; work in Emacs versions 22 and 23 too, but will not work without
-;; modifications in earlier versions of Emacs.
+;; This package requires Emacs version 24 or newer.
;;
;; To install `undo-tree-mode', make sure this file is saved in a directory in
;; your `load-path', and add the line: