[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/iedit 5883f9af54 211/301: Avoid overriding user's key bind
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/iedit 5883f9af54 211/301: Avoid overriding user's key bindings |
Date: |
Mon, 10 Jan 2022 22:59:03 -0500 (EST) |
branch: elpa/iedit
commit 5883f9af5425772bd16dd4388fbd1b8aed762c4f
Author: Victor Ren <victorhge@gmail.com>
Commit: Victor Ren <victorhge@gmail.com>
Avoid overriding user's key bindings
---
iedit-rect.el | 12 ++++++++++--
iedit.el | 4 ++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/iedit-rect.el b/iedit-rect.el
index 247f732540..5b4cd5f011 100644
--- a/iedit-rect.el
+++ b/iedit-rect.el
@@ -2,7 +2,7 @@
;; Copyright (C) 2010, 2011, 2012 Victor Ren
-;; Time-stamp: <2016-06-11 22:03:41 Victor Ren>
+;; Time-stamp: <2016-06-14 00:05:58 Victor Ren>
;; Author: Victor Ren <victorhge@gmail.com>
;; Keywords: occurrence region simultaneous rectangle refactoring
;; Version: 0.9.9
@@ -53,7 +53,15 @@
;;; Default key bindings:
-(define-key ctl-x-r-map [return] 'iedit-rectangle-mode)
+(when (null (where-is-internal 'iedit-rectangle-mode))
+ (let ((key-def (lookup-key ctl-x-r-map [return])))
+ (if key-def
+ (display-warning 'iedit (format "Iedit rect default key %S is occupied
by %s."
+ (key-description [C-x r return])
+ key-def)
+ :warning)
+ (define-key ctl-x-r-map [return] 'iedit-rectangle-mode)
+ (message "Iedit-rect default key binding is %s" (key-description [C-x r
return])))))
(defvar iedit-rectangle nil
"This buffer local variable which is the rectangle geometry if
diff --git a/iedit.el b/iedit.el
index dedac44392..3d2d62e12f 100644
--- a/iedit.el
+++ b/iedit.el
@@ -219,9 +219,9 @@ This is like `describe-bindings', but displays only Iedit
keys."
(describe-function 'iedit-mode)))
;;; Default key bindings:
-(when iedit-toggle-key-default
+(when (and iedit-toggle-key-default (null (where-is-internal 'iedit-mode)))
(let ((key-def (lookup-key (current-global-map) iedit-toggle-key-default)))
- (if (and key-def (not (eq key-def 'iedit-mode)))
+ (if key-def
(display-warning 'iedit (format "Iedit default key %S is occupied by
%s."
(key-description
iedit-toggle-key-default)
key-def)
- [nongnu] elpa/iedit b58ba728ef 059/301: Add global variables and functions to make it possible to reapply last iedit modification, (continued)
- [nongnu] elpa/iedit b58ba728ef 059/301: Add global variables and functions to make it possible to reapply last iedit modification, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit f334da3f57 098/301: Split iedit into three files: iedit.el, iedit-lib.el, iedit-rect.el, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit d2684ee774 099/301: Remove duplicate definations, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 67ad83f7fc 192/301: Rewrite iedit-expand-by-a-line, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit d1326bdef1 136/301: release.sh: New file., ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit d6c99fa91a 130/301: set `iedit-rectangle` to the actual rectangle corners, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit f36e6fcf0d 143/301: Move iedit-apply-global-modification to iedit, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 8d58171240 145/301: bugfix for iedit-hide-unmatched-lines, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit a55fcae6d0 175/301: Bind <tab> to iedit-next-occurrence, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 232cd0e5ec 146/301: tweak to use isearch case sensitivity, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 5883f9af54 211/301: Avoid overriding user's key bindings,
ELPA Syncer <=
- [nongnu] elpa/iedit 95e7731a91 147/301: bugfix for when there are no occurrences, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 19abf6e871 247/301: Update URLs to emacswiki, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit ed52608a0d 268/301: Fix conjoined occurrences issues, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 890a11657c 226/301: Merge pull request #66 from pstray/master, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit a5ce38a9c3 123/301: fix deleting char at end of overlay with mirror at EOB, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 8219304d9c 051/301: Fix problem when iedit-stop-buffering is called when current point is at any occurrence., ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit d872cb77e5 058/301: Update comments for restricting, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 75552aa1c8 090/301: Rename, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit 33d1b24e04 080/301: Fix compatible with Emacs 22 problem, ELPA Syncer, 2022/01/10
- [nongnu] elpa/iedit ad8fd96f86 215/301: Add support for markup tags, ELPA Syncer, 2022/01/10