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

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

[elpa] externals/hiddenquote 934208f22b 05/15: Improve navigation comman


From: ELPA Syncer
Subject: [elpa] externals/hiddenquote 934208f22b 05/15: Improve navigation commands in the syllables buffer
Date: Wed, 26 Oct 2022 11:57:51 -0400 (EDT)

branch: externals/hiddenquote
commit 934208f22b0fd03c9aea9b17baf8bb1793dbd2f6
Author: Mauro Aranda <maurooaranda@gmail.com>
Commit: Mauro Aranda <maurooaranda@gmail.com>

    Improve navigation commands in the syllables buffer
    
    * hiddenquote.el (hiddenquote-beg-of-line-syllable)
    (hiddenquote-end-of-line-syllable): New commands.
    
    (hiddenquote-syllables-map): Bind them.  Also bind f, b, n, p, a and
    e, as they are more convenient to type.
---
 hiddenquote.el | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/hiddenquote.el b/hiddenquote.el
index f1f04ea4ef..3b4ee450d1 100644
--- a/hiddenquote.el
+++ b/hiddenquote.el
@@ -316,6 +316,16 @@ Syllables window."
     (define-key map "\t" #'hiddenquote-forward-syllable)
     (define-key map [(shift tab)] #'hiddenquote-backward-syllable)
     (define-key map [backtab] #'hiddenquote-backward-syllable)
+    (define-key map "f" #'hiddenquote-forward-syllable)
+    (define-key map "\C-f" #'hiddenquote-forward-syllable)
+    (define-key map "b" #'hiddenquote-backward-syllable)
+    (define-key map "\C-b" #'hiddenquote-backward-syllable)
+    (define-key map "n" #'next-line)
+    (define-key map "p" #'previous-line)
+    (define-key map "a" #'hiddenquote-beg-of-line-syllable)
+    (define-key map "\C-a" #'hiddenquote-beg-of-line-syllable)
+    (define-key map "e" #'hiddenquote-end-of-line-syllable)
+    (define-key map "\C-e" #'hiddenquote-end-of-line-syllable)
     map)
   "Keymap for the Syllables buffer.")
 
@@ -1444,6 +1454,17 @@ Character cell bindings:
           (widget-backward 1)))
     (widget-backward 1)))
 
+(defun hiddenquote-beg-of-line-syllable ()
+  "Move to the first syllable in the current line."
+  (interactive)
+  (beginning-of-line))
+
+(defun hiddenquote-end-of-line-syllable ()
+  "Move to the last syllable in the current line."
+  (interactive)
+  (end-of-line)
+  (widget-backward 1))
+
 (defun hiddenquote-check-answer ()
   "Check if the answer for the word point is at is right or wrong."
   (interactive)



reply via email to

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