emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/iedit b94c75e8c6 107/301: Move iedit-help-keymap to iedit.


From: ELPA Syncer
Subject: [nongnu] elpa/iedit b94c75e8c6 107/301: Move iedit-help-keymap to iedit.el
Date: Mon, 10 Jan 2022 22:58:55 -0500 (EST)

branch: elpa/iedit
commit b94c75e8c6bac88589ab75b06416c2c39d13a3bd
Author: Victor Ren <victorhge@gmail.com>
Commit: Victor Ren <victorhge@gmail.com>

    Move iedit-help-keymap to iedit.el
---
 iedit-lib.el  | 61 ++-----------------------------------------------------
 iedit-rect.el |  7 ++-----
 iedit.el      | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++---
 3 files changed, 66 insertions(+), 67 deletions(-)

diff --git a/iedit-lib.el b/iedit-lib.el
index 7ef9214281..ec894d9db1 100644
--- a/iedit-lib.el
+++ b/iedit-lib.el
@@ -3,7 +3,7 @@
 
 ;; Copyright (C) 2010, 2011, 2012 Victor Ren
 
-;; Time-stamp: <2012-08-24 09:38:53 Victor Ren>
+;; Time-stamp: <2012-08-24 10:39:33 Victor Ren>
 ;; Author: Victor Ren <victorhge@gmail.com>
 ;; Keywords: occurrence region simultaneous rectangle refactoring
 ;; Version: 0.97
@@ -130,61 +130,6 @@ is not applied to other occurrences when it is true.")
 (defconst iedit-occurrence-overlay-name 'iedit-occurrence-overlay-name)
 (defconst iedit-invisible-overlay-name 'iedit-invisible-overlay-name)
 
-;;; Define iedit help map.
-(eval-when-compile (require 'help-macro))
-
-(defvar iedit-help-map
-  (let ((map (make-sparse-keymap)))
-    (define-key map (char-to-string help-char) 'iedit-help-for-help)
-    (define-key map [help] 'iedit-help-for-help)
-    (define-key map [f1] 'iedit-help-for-help)
-    (define-key map "?" 'iedit-help-for-help)
-    (define-key map "b" 'iedit-describe-bindings)
-    (define-key map "k" 'iedit-describe-key)
-    (define-key map "m" 'iedit-describe-mode)
-    (define-key map "q" 'help-quit)
-    map)
-  "Keymap for characters following the Help key for Iedit mode.")
-
-(make-help-screen
- iedit-help-for-help-internal
- (purecopy "Type a help option: [bkm] or ?")
- "You have typed %THIS-KEY%, the help character.  Type a Help option:
-\(Type \\<help-map>\\[help-quit] to exit the Help command.)
-
-b           Display all Iedit key bindings.
-k KEYS      Display full documentation of Iedit key sequence.
-m           Display documentation of Iedit mode.
-
-You can't type here other help keys available in the global help map,
-but outside of this help window when you type them in Iedit mode,
-they exit Iedit mode before displaying global help."
- iedit-help-map)
-
-(defun iedit-help-for-help ()
-  "Display Iedit help menu."
-  (interactive)
-  (let (same-window-buffer-names same-window-regexps)
-    (iedit-help-for-help-internal)))
-
-(defun iedit-describe-bindings ()
-  "Show a list of all keys defined in Iedit mode, and their definitions.
-This is like `describe-bindings', but displays only Iedit keys."
-  (interactive)
-  (let (same-window-buffer-names
-        same-window-regexps
-        (keymap (substitute-command-keys "\\{iedit-occurrence-keymap}")))
-    (with-help-window "*Help*"
-      (with-current-buffer standard-output
-        (princ "Iedit Mode Bindings: ")
-        (princ keymap)))))
-
-(defun iedit-describe-key ()
-  "Display documentation of the function invoked by Iedit mode key."
-  (interactive)
-  (let (same-window-buffer-names same-window-regexps)
-    (call-interactively 'describe-key)))
-
 ;;; Define Iedit mode map
 (defvar iedit-lib-keymap
   (let ((map (make-sparse-keymap)))
@@ -194,14 +139,12 @@ This is like `describe-bindings', but displays only Iedit 
keys."
     (define-key map (kbd "<S-iso-lefttab>") 'iedit-prev-occurrence)
     (define-key map (kbd "<backtab>") 'iedit-prev-occurrence)
     (define-key map (kbd "C-'") 'iedit-toggle-unmatched-lines-visible)
-    (define-key map (char-to-string help-char) iedit-help-map)
-    (define-key map [help] iedit-help-map)
-    (define-key map [f1] iedit-help-map)
     map)
   "Keymap used while Iedit mode is enabled.")
 
 (defvar iedit-occurrence-keymap-default
   (let ((map (make-sparse-keymap)))
+;;    (set-keymap-parent map iedit-lib-keymap)
     (define-key map (kbd "M-U") 'iedit-upcase-occurrences)
     (define-key map (kbd "M-L") 'iedit-downcase-occurrences)
     (define-key map (kbd "M-R") 'iedit-replace-occurrences)
diff --git a/iedit-rect.el b/iedit-rect.el
index e60f6098d4..398914a6b4 100644
--- a/iedit-rect.el
+++ b/iedit-rect.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2010, 2011, 2012 Victor Ren
 
-;; Time-stamp: <2012-08-23 15:30:08 Victor Ren>
+;; Time-stamp: <2012-08-24 10:43:05 Victor Ren>
 ;; Author: Victor Ren <victorhge@gmail.com>
 ;; Keywords: occurrence region simultaneous rectangle refactoring
 ;; Version: 0.97
@@ -63,9 +63,6 @@ current mode is iedit-rect. Otherwise it is nil.
 
 (make-variable-buffer-local 'iedit-rectangle)
 
-;;; Define iedit help map.
-(eval-when-compile (require 'help-macro))
-
 ;;; Define Iedit rect mode map
 (defvar iedit-rect-keymap
   (let ((map (make-sparse-keymap)))
@@ -85,7 +82,7 @@ current mode is iedit-rect. Otherwise it is nil.
 
 ;;;###autoload
 (defun iedit-rectangle-mode ()
-  "Toggle iedit-RECT mode."
+  "Toggle iedit-RECT mode. TODO"
   (interactive)
   (if iedit-rectangle-mode
       (iedit-rectangle-done)
diff --git a/iedit.el b/iedit.el
index 90c467e8ed..4589f4924e 100644
--- a/iedit.el
+++ b/iedit.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2010, 2011, 2012 Victor Ren
 
-;; Time-stamp: <2012-08-24 09:40:07 Victor Ren>
+;; Time-stamp: <2012-08-24 10:38:26 Victor Ren>
 ;; Author: Victor Ren <victorhge@gmail.com>
 ;; Keywords: occurrence region simultaneous refactoring
 ;; Version: 0.97
@@ -133,6 +133,61 @@ Iedit mode is turned off last time.")
     (nconc minor-mode-alist
            (list '(iedit-mode iedit-mode))))
 
+;;; Define iedit help map.
+(eval-when-compile (require 'help-macro))
+
+(defvar iedit-help-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map (char-to-string help-char) 'iedit-help-for-help)
+    (define-key map [help] 'iedit-help-for-help)
+    (define-key map [f1] 'iedit-help-for-help)
+    (define-key map "?" 'iedit-help-for-help)
+    (define-key map "b" 'iedit-describe-bindings)
+    (define-key map "k" 'iedit-describe-key)
+    (define-key map "m" 'iedit-describe-mode)
+    (define-key map "q" 'help-quit)
+    map)
+  "Keymap for characters following the Help key for Iedit mode.")
+
+(make-help-screen
+ iedit-help-for-help-internal
+ (purecopy "Type a help option: [bkm] or ?")
+ "You have typed %THIS-KEY%, the help character.  Type a Help option:
+\(Type \\<help-map>\\[help-quit] to exit the Help command.)
+
+b           Display all Iedit key bindings.
+k KEYS      Display full documentation of Iedit key sequence.
+m           Display documentation of Iedit mode.
+
+You can't type here other help keys available in the global help map,
+but outside of this help window when you type them in Iedit mode,
+they exit Iedit mode before displaying global help."
+ iedit-help-map)
+
+(defun iedit-help-for-help ()
+  "Display Iedit help menu."
+  (interactive)
+  (let (same-window-buffer-names same-window-regexps)
+    (iedit-help-for-help-internal)))
+
+(defun iedit-describe-bindings ()
+  "Show a list of all keys defined in Iedit mode, and their definitions.
+This is like `describe-bindings', but displays only Iedit keys."
+  (interactive)
+  (let (same-window-buffer-names
+        same-window-regexps
+        (keymap (substitute-command-keys 
"\\{iedit-mode-keymap}\\{iedit-mode-occurrence-keymap}")))
+    (with-help-window "*Help*"
+      (with-current-buffer standard-output
+        (princ "Iedit Mode Bindings: ")
+        (princ keymap)))))
+
+(defun iedit-describe-key ()
+  "Display documentation of the function invoked by Iedit mode key."
+  (interactive)
+  (let (same-window-buffer-names same-window-regexps)
+    (call-interactively 'describe-key)))
+
 (defun iedit-describe-mode ()
   "Display documentation of Iedit mode."
   (interactive)
@@ -163,7 +218,9 @@ Iedit mode is turned off last time.")
 (defvar iedit-mode-keymap
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map iedit-lib-keymap)
-    (define-key map (kbd "C-'") 'iedit-toggle-unmatched-lines-visible)
+    (define-key map (char-to-string help-char) iedit-help-map)
+    (define-key map [help] iedit-help-map)
+    (define-key map [f1] iedit-help-map)
     map)
   "Keymap used while Iedit mode is enabled.")
 
@@ -226,7 +283,9 @@ e.g. the occurrences in the region is excluded.
 Turn off Iedit mode in other situations.
 
 Commands:
-\\{iedit-occurrence-keymap}"
+\\{iedit-mode-keymap}
+Keymap used within overlays:
+\\{iedit-mode-occurrence-keymap}"
   (interactive "P")
   (if iedit-mode
       (progn



reply via email to

[Prev in Thread] Current Thread [Next in Thread]