bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#47878: Mark outline commands as repeatable


From: Philip Kaludercic
Subject: bug#47878: Mark outline commands as repeatable
Date: Sun, 18 Apr 2021 19:00:17 +0000

This is a suggested extension for repeat-mode. outline-mode, especially
outline-minor-mode commands are somewhat inconvenient to access ("C-x @
C-<something>" requires me to change modifiers mid-input twice). When
repeat-mode is enabled, this would allow me to access all outline keys
in just one key-press.

One might want to discuss if outline-mode-prefix-map should be directly
marked as the repeat-map or if a subset should be used. My approach
requires less effort but might be more confusing.

-- 
        Philip K.

>From 060f1a9facd4e30bd0bca5b405dc6e544dca3cf9 Mon Sep 17 00:00:00 2001
From: Philip K <philipk@posteo.net>
Date: Sun, 18 Apr 2021 20:34:18 +0200
Subject: [PATCH 2/4] Mark outline-mode keys as repeatable

---
 lisp/outline.el | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lisp/outline.el b/lisp/outline.el
index bce9c6b9e4..f5fbfb5b98 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -1274,6 +1274,12 @@ outline-cycle-buffer
       (setq outline--cycle-buffer-state 'show-all)
       (message "Show all")))))
 
+;;; mark all commands bound in `outline-mode-prefix-map' as
+;;; repeatable.
+(dolist (command (mapcar #'cdr (cdr outline-mode-prefix-map)))
+  (when (commandp command)
+    (put command 'repeat-map 'outline-mode-prefix-map)))
+
 (provide 'outline)
 (provide 'noutline)
 
-- 
2.30.2


reply via email to

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