all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#15323: 24.3; make hideshow use outline-minor-mode-prefix or a similar hs-minor-mode-prefix
@ 2013-09-10 16:51 Susanne Oberhauser
  2016-02-24  4:26 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Susanne Oberhauser @ 2013-09-10 16:51 UTC (permalink / raw)
  To: 15323

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)





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

* bug#15323: 24.3; make hideshow use outline-minor-mode-prefix or a similar hs-minor-mode-prefix
  2013-09-10 16:51 bug#15323: 24.3; make hideshow use outline-minor-mode-prefix or a similar hs-minor-mode-prefix Susanne Oberhauser
@ 2016-02-24  4:26 ` Lars Ingebrigtsen
  2016-02-24  4:46   ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-24  4:26 UTC (permalink / raw)
  To: Susanne Oberhauser; +Cc: 15323

Susanne Oberhauser <froh@suse.com> writes:

> 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.

Looks good to me.  Could you resubmit the patch (against the Emacs
trunk) including documentation changes and an etc/NEWS entry?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#15323: 24.3; make hideshow use outline-minor-mode-prefix or a similar hs-minor-mode-prefix
  2016-02-24  4:26 ` Lars Ingebrigtsen
@ 2016-02-24  4:46   ` Lars Ingebrigtsen
  2019-06-26 15:29     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-24  4:46 UTC (permalink / raw)
  To: Susanne Oberhauser; +Cc: 15323

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Susanne Oberhauser <froh@suse.com> writes:
>
>> 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.
>
> Looks good to me.  Could you resubmit the patch (against the Emacs
> trunk) including documentation changes and an etc/NEWS entry?

The email bounced, so I guess not...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#15323: 24.3; make hideshow use outline-minor-mode-prefix or a similar hs-minor-mode-prefix
  2016-02-24  4:46   ` Lars Ingebrigtsen
@ 2019-06-26 15:29     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-26 15:29 UTC (permalink / raw)
  To: Susanne Oberhauser; +Cc: 15323

Lars Ingebrigtsen <larsi@gnus.org> writes:

>> Looks good to me.  Could you resubmit the patch (against the Emacs
>> trunk) including documentation changes and an etc/NEWS entry?
>
> The email bounced, so I guess not...

And we don't have copyright papers in place, so I'm closing this bug
report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

end of thread, other threads:[~2019-06-26 15:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-10 16:51 bug#15323: 24.3; make hideshow use outline-minor-mode-prefix or a similar hs-minor-mode-prefix Susanne Oberhauser
2016-02-24  4:26 ` Lars Ingebrigtsen
2016-02-24  4:46   ` Lars Ingebrigtsen
2019-06-26 15:29     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.