From: Susanne Oberhauser <froh@suse.com>
To: 15323@debbugs.gnu.org
Subject: bug#15323: 24.3; make hideshow use outline-minor-mode-prefix or a similar hs-minor-mode-prefix
Date: Tue, 10 Sep 2013 18:51:46 +0200 [thread overview]
Message-ID: <s2ivc28r55p.fsf@byron.suse.de> (raw)
Hi,
hideshow mode has the prefix C-c @ hard coded in it's minor mode map.
C-c @ on a german keyboard actually is C-c M-q
That makes C-c @ C-h into C-c AltGr-q C-h which is slow and puts my
fingers at risk :)
Now outline minor mode allows to simply define the minor mode prefix to
something more convenient.
I'd love to have this in hideshow mode, too, e.g. along the lines in the
patch below.
Thanks,
S.
=== modified file 'lisp/progmodes/hideshow.el'
--- lisp/progmodes/hideshow.el 2013-03-05 17:13:01 +0000
+++ lisp/progmodes/hideshow.el 2013-09-10 16:28:05 +0000
@@ -335,6 +335,13 @@
as how to set its `display' property. See `hs-make-overlay' and
info node `(elisp)Overlays'.")
+(defcustom hs-minor-mode-prefix "\C-c@"
+ "Prefix key to use for hideshow commands in hideshow minor mode.
+The value of this variable is only checked as part of loading hideshow mode.
+After that, changing the prefix key requires manipulating keymaps."
+ :type 'string
+ :group 'hideshow)
+
;;---------------------------------------------------------------------------
;; internal variables
@@ -343,14 +350,16 @@
Use the command `hs-minor-mode' to toggle or set this variable.")
(defvar hs-minor-mode-map
- (let ((map (make-sparse-keymap)))
- ;; These bindings roughly imitate those used by Outline mode.
- (define-key map "\C-c@\C-h" 'hs-hide-block)
- (define-key map "\C-c@\C-s" 'hs-show-block)
- (define-key map "\C-c@\C-\M-h" 'hs-hide-all)
- (define-key map "\C-c@\C-\M-s" 'hs-show-all)
- (define-key map "\C-c@\C-l" 'hs-hide-level)
- (define-key map "\C-c@\C-c" 'hs-toggle-hiding)
+ (let ((map (make-sparse-keymap))
+ (prefixed-map (make-sparse-keymap)))
+ ;; These bindings very roughly imitate those used by Outline mode.
+ (define-key prefixed-map "\C-h" 'hs-hide-block)
+ (define-key prefixed-map "\C-s" 'hs-show-block)
+ (define-key prefixed-map "\C-\M-h" 'hs-hide-all)
+ (define-key prefixed-map "\C-\M-s" 'hs-show-all)
+ (define-key prefixed-map "\C-l" 'hs-hide-level)
+ (define-key prefixed-map "\C-c" 'hs-toggle-hiding)
+ (define-key map hs-minor-mode-prefix prefixed-map)
(define-key map [(shift mouse-2)] 'hs-mouse-toggle-hiding)
map)
"Keymap for hideshow minor mode.")
In GNU Emacs 24.3.1 (x86_64-suse-linux-gnu, GTK+ Version 3.6.4)
of 2013-06-15 on build35
Windowing system distributor `The X.Org Foundation', version 11.0.11302000
System Description: openSUSE 12.3 (x86_64)
--
Susanne Oberhauser SUSE LINUX Products GmbH
+49-911-74053-574 Maxfeldstraße 5
Processes and Infrastructure 90409 Nürnberg
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)
next reply other threads:[~2013-09-10 16:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-10 16:51 Susanne Oberhauser [this message]
2016-02-24 4:26 ` bug#15323: 24.3; make hideshow use outline-minor-mode-prefix or a similar hs-minor-mode-prefix Lars Ingebrigtsen
2016-02-24 4:46 ` Lars Ingebrigtsen
2019-06-26 15:29 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=s2ivc28r55p.fsf@byron.suse.de \
--to=froh@suse.com \
--cc=15323@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).