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

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

[elpa] externals/ergoemacs-mode 25f5be8 022/325: Merge branch 'ctl-x-c'


From: Stefan Monnier
Subject: [elpa] externals/ergoemacs-mode 25f5be8 022/325: Merge branch 'ctl-x-c'
Date: Sat, 23 Oct 2021 18:48:13 -0400 (EDT)

branch: externals/ergoemacs-mode
commit 25f5be8b9590ed076fff4168993c1957bca3652e
Merge: 8b47756 0935e87
Author: Walter Landry <wlandry@caltech.edu>
Commit: Walter Landry <wlandry@caltech.edu>

    Merge branch 'ctl-x-c'
---
 ergoemacs-command-loop.el | 33 +++++++++------------------------
 ergoemacs-functions.el    |  7 -------
 ergoemacs-test.el         |  4 +---
 ergoemacs-theme-engine.el |  5 +----
 4 files changed, 11 insertions(+), 38 deletions(-)

diff --git a/ergoemacs-command-loop.el b/ergoemacs-command-loop.el
index 8628dbb..dacfbd1 100644
--- a/ergoemacs-command-loop.el
+++ b/ergoemacs-command-loop.el
@@ -189,7 +189,6 @@ ignore the post-command hooks.")
 (defvar ergoemacs-command-loop-type)
 (defvar ergoemacs-keymap)
 (defvar ergoemacs-handle-ctl-c-or-ctl-x)
-(defvar ergoemacs-ctl-c-or-ctl-x-delay)
 
 
 (defun ergoemacs-command-loop--modal-show ()
@@ -663,11 +662,9 @@ inconjunction with `input-method-function' to translate 
keys if
                 (ergoemacs-keymapp test-ret))
       ;; The translation needs more keys...
       (if timeout-key
-         (setq next-key (with-timeout (ergoemacs-ctl-c-or-ctl-x-delay
-                                       (progn
-                                         (setq 
ergoemacs-command-loop--decode-event-timeout-p t)
+         (setq next-key (progn
+                          (setq ergoemacs-command-loop--decode-event-timeout-p 
t)
                                          nil))
-                          (ergoemacs-command-loop--history nil 
ergoemacs-command-loop--decode-event-delay current-key)))
        (setq next-key (ergoemacs-command-loop--history nil 
ergoemacs-command-loop--decode-event-delay current-key)))
       (when next-key ;; Since a key was read, save it to be read later.
         (push last-command-event new-ergoemacs-input))
@@ -823,13 +820,13 @@ KEYS is the keys information"
           ((not (region-active-p))) ;; active
           ((and (or ergoemacs-this-command-keys-shift-translated 
this-command-keys-shift-translated)
                  (eq ergoemacs-handle-ctl-c-or-ctl-x 'both)))
-          ((and (not ergoemacs-ctl-c-or-ctl-x-delay) ;; Immediate
-                 (eq ergoemacs-handle-ctl-c-or-ctl-x 'both))
+          ((eq ergoemacs-handle-ctl-c-or-ctl-x 'both)
            (push 'ergoemacs-timeout unread-command-events))
            (t
             (setq ergoemacs-command--timeout-keys keys
-                 ergoemacs-command--timeout-timer
-                  (run-at-time t ergoemacs-ctl-c-or-ctl-x-delay 
#'ergoemacs-command--timer-timeout)))))
+                 ergoemacs-command--timeout-timer 
ergoemacs-command--timer-timeout
+                  )
+            )))
         (unless unread-command-events
          (ergoemacs-command-loop--message
           "%s" (ergoemacs-command-loop--key-msg
@@ -2195,22 +2192,10 @@ pressed the translated key by changing
                    
                    ((and (or ergoemacs-this-command-keys-shift-translated 
this-command-keys-shift-translated)
                          (eq ergoemacs-handle-ctl-c-or-ctl-x 'both)))
-
                    ;; Immediate
-                   ((and (not ergoemacs-ctl-c-or-ctl-x-delay)
-                        (eq ergoemacs-handle-ctl-c-or-ctl-x 'both))
-                    (setq ret tmp))
-                   
-                   (t ;; with delay
-                   (if ergoemacs-command-loop--decode-event-timeout-p
-                       (setq tmp2 nil
-                             ergoemacs-command-loop--decode-event-timeout-p 
nil))
-                    (setq tmp2 (with-timeout (ergoemacs-ctl-c-or-ctl-x-delay 
nil)
-                                 (ergoemacs-command-loop--read-event nil key)))
-                    (if (not tmp2)
-                        (setq ret tmp) ;; timeout, use copy/cut
-                      ;; Actual key
-                      (setq ret (ergoemacs-command-loop--key-lookup (vconcat 
key (vector tmp2))))))))
+                   (setq ret tmp)
+                   )
+                  )
                 (ergoemacs-command-loop--message-binding new-key ret))
                ((equal orig-key (nth 1 trials)) ;; `ergoemacs-mode' shift 
translation
                 (setq this-command-keys-shift-translated t
diff --git a/ergoemacs-functions.el b/ergoemacs-functions.el
index d91deb7..afede56 100644
--- a/ergoemacs-functions.el
+++ b/ergoemacs-functions.el
@@ -102,13 +102,6 @@
   '(delete-backward-char delete-char kill-word backward-kill-word)
   "Defines deletion functions that ergoemacs is aware of.")
 
-(defcustom ergoemacs-ctl-c-or-ctl-x-delay 0.2
-  "Delay before sending Cut or Copy.
-This is applied when using Ctrl+c and Ctrl+x."
-  :type '(choice (number :tag "Inhibit delay")
-                 (const :tag "No delay" nil))
-  :group 'ergoemacs-mode)
-
 (defcustom ergoemacs-handle-ctl-c-or-ctl-x 'both
   "Type of Copy and Paste handling for `ergoemacs-mode'."
   :type '(choice
diff --git a/ergoemacs-test.el b/ergoemacs-test.el
index 88d6736..c8b4001 100644
--- a/ergoemacs-test.el
+++ b/ergoemacs-test.el
@@ -505,7 +505,6 @@ not using cua or cutting line. I think kill-region is what 
is meant."
   :tags '(:copy :interactive)
   (ergoemacs-test-layout
    (let ((ret t)
-         (ergoemacs-ctl-c-or-ctl-x-delay 0.1)
          (ergoemacs-handle-ctl-c-or-ctl-x 'both))
      (save-excursion
        (switch-to-buffer (get-buffer-create "*ergoemacs-test*"))
@@ -523,8 +522,7 @@ not using cua or cutting line. I think kill-region is what 
is meant."
   "Attempts to test Issue #130 -- Copy"
   :tags '(:copy :interactive)
   (ergoemacs-test-layout
-   (let ((ergoemacs-ctl-c-or-ctl-x-delay 0.1)
-         (ergoemacs-handle-ctl-c-or-ctl-x 'both)
+   (let ((ergoemacs-handle-ctl-c-or-ctl-x 'both)
          (txt "Text\n123"))
      (with-temp-buffer
        (switch-to-buffer (get-buffer-create "*ergoemacs-test*"))
diff --git a/ergoemacs-theme-engine.el b/ergoemacs-theme-engine.el
index 60ef0d8..875cfd3 100644
--- a/ergoemacs-theme-engine.el
+++ b/ergoemacs-theme-engine.el
@@ -383,10 +383,7 @@ When AT-END is non-nil, append a $ to the regular 
expression."
          (interactive)
          (ergoemacs-save 'ergoemacs-handle-ctl-c-or-ctl-x 'both))
        :button (:radio . (eq ergoemacs-handle-ctl-c-or-ctl-x 'both)))
-      (c-c-c-x-timeout
-       menu-item "Customize Ctrl+C and Ctrl+X Cut/Copy Timeout"
-       (lambda() (interactive)
-         (ergoemacs-save 'ergoemacs-ctl-c-or-ctl-x-delay)))))
+      ))
     (c-v
      menu-item "Paste behavior"
      (keymap



reply via email to

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