[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/evil-goggles 221a5ed8ea 098/225: Add support for Emacs 24
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/evil-goggles 221a5ed8ea 098/225: Add support for Emacs 24 by not relying on funcall-interactively |
Date: |
Wed, 12 Jan 2022 08:58:59 -0500 (EST) |
branch: elpa/evil-goggles
commit 221a5ed8ea0455e4274ef9ba14fe852cc512112d
Author: Evgeni Kolev <evgenysw@gmail.com>
Commit: Evgeni Kolev <evgenysw@gmail.com>
Add support for Emacs 24 by not relying on funcall-interactively
---
evil-goggles.el | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/evil-goggles.el b/evil-goggles.el
index 951ddaa3d6..4468b047fc 100644
--- a/evil-goggles.el
+++ b/evil-goggles.el
@@ -4,7 +4,7 @@
;; Author: edkolev <evgenysw@gmail.com>
;; URL: http://github.com/edkolev/evil-goggles
-;; Package-Requires: ((emacs "25") (evil "1.0.0"))
+;; Package-Requires: ((emacs "24.4") (evil "1.0.0"))
;; Version: 0.0.1
;; Keywords: emulations, evil, vim, visual
@@ -37,7 +37,6 @@
;;; Code:
(require 'evil)
-;; TODO try not to depend on cl-lib
(require 'cl-lib)
(defcustom evil-goggles-duration 0.200
@@ -131,10 +130,18 @@ displayed while its running."
(progn ,@body))
(progn ,@body)))
+(defun evil-goggles--funcall-interactively (f &rest args)
+ "Call F with ARGS interactively.
+
+This function mimics `funcall-interactively', available in Emacs 25,
+so this package can work with Emacs 24"
+ (cl-letf (((symbol-function 'called-interactively-p) (lambda (_) t)))
+ (apply f args)))
+
(defmacro evil-goggles--funcall-preserve-interactive (fun &rest args)
"Call FUN with ARGS with `funcall' or `funcall-interactively'."
`(if (called-interactively-p 'any)
- (funcall-interactively ,fun ,@args)
+ (evil-goggles--funcall-interactively ,fun ,@args)
(funcall ,fun ,@args)))
(defmacro evil-goggles--define-switch-and-face (switch-name switch-doc
face-name face-doc)
@@ -277,7 +284,7 @@ N and LIST are the arguments of the original function."
(defun evil-goggles--get-undo-item (list)
"Process LIST.
-The LIST is the input variable to function primitive-undo.
+The LIST is the input variable to function `primitive-undo'.
This function tries to return a single list, either:
('text-added beg end), or:
@@ -540,6 +547,7 @@ COUNT BEG &OPTIONAL END TYPE REGISTER are the arguments of
the original function
"evil-goggles global minor mode."
:lighter evil-goggles-lighter
:global t
+ :require 'evil-goggles
(cond
(evil-goggles-mode
- [nongnu] elpa/evil-goggles 450e153a2d 046/225: Depend on emacs 25 for `funcall-interactively', (continued)
- [nongnu] elpa/evil-goggles 450e153a2d 046/225: Depend on emacs 25 for `funcall-interactively', ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 99d3416598 049/225: Update README.md, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 9927490983 042/225: Update README.md, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 08da44cf83 057/225: Add the evil-goggles face, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles ef1cad8f3a 064/225: Re-add paste and fill-and-move, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 179c3002f2 071/225: Update README.md, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 904fc39728 072/225: Add doc for evil-goggles-use-diff-faces, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles e65aa39749 083/225: Add support for block paste, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 685e3714a5 090/225: Handle a specific u/redo case when the list has 2 connecting items, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 1e9ebe5e4c 095/225: Extend support for u/redo after some text is changed., ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 221a5ed8ea 098/225: Add support for Emacs 24 by not relying on funcall-interactively,
ELPA Syncer <=
- [nongnu] elpa/evil-goggles aaa93841f9 103/225: Update evil-goggles.el, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles f79c03ba62 108/225: Experimental: add support for pulsing, new option`evil-goggles-pulse', ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 9fa3d448ca 112/225: Update "Recent Significant Changes" section in README, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 219d93e125 118/225: Add support for displaying the hint after the operation, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles c5c49d7965 127/225: Use different duration for before/after hints, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 5c313522cf 128/225: Don't call deprecated functions, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 03cb67fc4c 125/225: Remove duplicated line, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 70ed667698 131/225: Fix compile warnings, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles ea0102bcf5 133/225: Use "post" hint when commenting, ELPA Syncer, 2022/01/12
- [nongnu] elpa/evil-goggles 3f6dd85657 151/225: Update README, ELPA Syncer, 2022/01/12