update packages
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
(define-package "key-chord" "20230522.223" "map pairs of simultaneously pressed keys to commands"
|
||||
(define-package "key-chord" "20240910.1441" "map pairs of simultaneously pressed keys to commands"
|
||||
'((emacs "24"))
|
||||
:commit "e724def60fdf6473858f2962ae276cf4413473eb" :authors
|
||||
:commit "fc75b1451759121601110da8ddfadcf5156318af" :authors
|
||||
'(("David Andersson" . "l.david.anderssonsverige.nu"))
|
||||
:maintainers
|
||||
'(("David Andersson" . "l.david.anderssonsverige.nu"))
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
;; Copyright (C) 2003, 2005, 2008, 2012 David Andersson
|
||||
|
||||
;; Author: David Andersson <l.david.andersson(at)sverige.nu>
|
||||
;; Package-Version: 0.7.1
|
||||
;; Package-Requires: ((emacs "24"))
|
||||
;; Keywords: keyboard chord input
|
||||
|
||||
@@ -43,14 +44,6 @@
|
||||
This should normally be a little longer than `key-chord-two-keys-delay'."
|
||||
:type 'float)
|
||||
|
||||
(defcustom key-chord-safety-interval-backward 0.1
|
||||
"Min time to distinguish a key chord and preceding inputs."
|
||||
:type 'float)
|
||||
|
||||
(defcustom key-chord-safety-interval-forward 0.35
|
||||
"Min time delay to distinguish a key chord and following inputs."
|
||||
:type 'float)
|
||||
|
||||
(defcustom key-chord-in-macros t
|
||||
"If nil, don't expand key chords when executing keyboard macros.
|
||||
|
||||
@@ -74,13 +67,6 @@ when recorded.)"
|
||||
(defvar key-chord-in-last-kbd-macro nil)
|
||||
(defvar key-chord-defining-kbd-macro nil)
|
||||
|
||||
;; Internal vars for
|
||||
;; `key-chord-safety-interval-backward'. `key-chord-idle-state' is
|
||||
;; non-nil iff at least `key-chord-safety-interval-backward' past
|
||||
;; after the last (non-keychord) input.
|
||||
(defvar key-chord-idle-state t)
|
||||
(defvar key-chord-timer-object nil)
|
||||
|
||||
;;;###autoload
|
||||
(define-minor-mode key-chord-mode
|
||||
"Map pairs of simultaneously pressed keys to commands.
|
||||
@@ -89,16 +75,9 @@ See functions `key-chord-define-global', `key-chord-define-local',
|
||||
and `key-chord-define' and variables `key-chord-two-keys-delay'
|
||||
and `key-chord-one-key-delay'."
|
||||
:global t
|
||||
(if key-chord-mode
|
||||
(progn
|
||||
(setq input-method-function 'key-chord-input-method)
|
||||
(setq key-chord-timer-object
|
||||
(run-with-idle-timer
|
||||
key-chord-safety-interval-backward 'repeat
|
||||
(lambda () (setq key-chord-idle-state t)))))
|
||||
(cancel-timer key-chord-timer-object)
|
||||
(setq input-method-function nil)
|
||||
(setq key-chord-timer-object nil)))
|
||||
(setq input-method-function
|
||||
(and key-chord-mode
|
||||
'key-chord-input-method)))
|
||||
|
||||
;;;###autoload
|
||||
(defun key-chord-define-global (keys command)
|
||||
@@ -192,8 +171,7 @@ Commands. Please ignore that."
|
||||
(defun key-chord-input-method (first-char)
|
||||
"Input method controlled by key bindings with the prefix `key-chord'."
|
||||
(cond
|
||||
((and key-chord-idle-state
|
||||
(not (eq first-char key-chord-last-unmatched))
|
||||
((and (not (eq first-char key-chord-last-unmatched))
|
||||
(key-chord-lookup-key (vector 'key-chord first-char)))
|
||||
(let ((delay (if (key-chord-lookup-key
|
||||
(vector 'key-chord first-char first-char))
|
||||
@@ -205,14 +183,12 @@ Commands. Please ignore that."
|
||||
(eldoc-pre-command-refresh-echo-area))
|
||||
(sit-for delay 'no-redisplay))
|
||||
(setq key-chord-last-unmatched nil)
|
||||
(setq key-chord-idle-state nil)
|
||||
(list first-char))
|
||||
(t ; input-pending-p
|
||||
(let* ((input-method-function nil)
|
||||
(next-char (read-event))
|
||||
(res (vector 'key-chord first-char next-char)))
|
||||
(cond ((and (key-chord-lookup-key res)
|
||||
(sit-for key-chord-safety-interval-forward 'no-redisplay))
|
||||
(cond ((key-chord-lookup-key res)
|
||||
(setq key-chord-defining-kbd-macro
|
||||
(cons first-char key-chord-defining-kbd-macro))
|
||||
(list 'key-chord first-char next-char))
|
||||
@@ -221,11 +197,9 @@ Commands. Please ignore that."
|
||||
(cons next-char unread-command-events))
|
||||
(when (eq first-char next-char)
|
||||
(setq key-chord-last-unmatched first-char))
|
||||
(setq key-chord-idle-state nil)
|
||||
(list first-char))))))))
|
||||
(t ; no key-chord keymap
|
||||
(setq key-chord-last-unmatched first-char)
|
||||
(setq key-chord-idle-state nil)
|
||||
(list first-char))))
|
||||
|
||||
(defun key-chord--start-kbd-macro (_append &optional _no-exec)
|
||||
|
||||
Reference in New Issue
Block a user