From 4313dd0b446c29f4099f13d5fdefbe52e2eb5e79 Mon Sep 17 00:00:00 2001 From: TLINDEN Date: Sun, 15 May 2016 15:22:37 +0200 Subject: [PATCH] added some commentary to viking-last-key-repeats, besser is das --- viking-mode.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/viking-mode.el b/viking-mode.el index 968f341..fcf20d2 100644 --- a/viking-mode.el +++ b/viking-mode.el @@ -207,15 +207,15 @@ should be a point-moving function." (defun viking-last-key-repeats () "Returns how many times the last key has been pressed as integer." (interactive) - (let* ((keys (reverse (append (recent-keys) nil))) ;; list of last keys pressed, last @0 - (pressed (car keys)) ;; the very last key pressed, i.e. the one bound to this defun - (times 0)) ;; how many times that key have been pressed + (let* ((keys (reverse (append (recent-keys) nil))) ;; list of last keys pressed, last @0 + (pressed (car keys)) ;; the very last key pressed, i.e. the one bound to this defun + (times 0)) ;; how many times that key have been pressed (progn (catch 'nomore ;; don't iterate endless (dolist (k keys) ;; loop over the key list, (car keys) is the most recent, due to 'reverse above (if (equal pressed k) ;; one more of the same key pressed in a row (setq times (+ times 1)) ;; register - (throw 'nomore t)))) ;; another key, break the loop and rerturn the count + (throw 'nomore t)))) ;; another key, break the loop and return the count times))) ;;;;; kill/delete wrappers