unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#47878: Mark outline commands as repeatable
@ 2021-04-18 19:00 Philip Kaludercic
  2021-04-19 20:45 ` Juri Linkov
  0 siblings, 1 reply; 8+ messages in thread
From: Philip Kaludercic @ 2021-04-18 19:00 UTC (permalink / raw)
  To: 47878

[-- Attachment #1: Type: text/plain, Size: 517 bytes --]


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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0002-Mark-outline-mode-keys-as-repeatable.patch --]
[-- Type: text/x-diff, Size: 812 bytes --]

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-05-03 16:44 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-18 19:00 bug#47878: Mark outline commands as repeatable Philip Kaludercic
2021-04-19 20:45 ` Juri Linkov
2021-04-21 13:53   ` Philip Kaludercic
2021-04-21 19:20     ` Juri Linkov
2021-04-21 20:50       ` Philip Kaludercic
2021-04-21 21:15         ` Juri Linkov
2021-05-03 10:30           ` Lars Ingebrigtsen
2021-05-03 16:44             ` Juri Linkov

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).