From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Susanne Oberhauser Newsgroups: gmane.emacs.bugs 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 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1378832784 19196 80.91.229.3 (10 Sep 2013 17:06:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Sep 2013 17:06:24 +0000 (UTC) To: 15323@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Sep 10 19:06:26 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VJROU-00081x-DP for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Sep 2013 19:06:26 +0200 Original-Received: from localhost ([::1]:59211 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJROT-0005so-TM for geb-bug-gnu-emacs@m.gmane.org; Tue, 10 Sep 2013 13:06:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJROI-0005gg-5C for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2013 13:06:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJRO7-0007dx-I3 for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2013 13:06:14 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:44659) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJRO7-0007dq-9h for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2013 13:06:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VJRO6-0007QE-Jw for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2013 13:06:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Susanne Oberhauser Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 10 Sep 2013 17:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15323 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.137883272628466 (code B ref -1); Tue, 10 Sep 2013 17:06:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Sep 2013 17:05:26 +0000 Original-Received: from localhost ([127.0.0.1]:52948 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VJRNT-0007Ou-7C for submit@debbugs.gnu.org; Tue, 10 Sep 2013 13:05:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53568) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VJRBR-00073B-Ml for submit@debbugs.gnu.org; Tue, 10 Sep 2013 12:52:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJRBE-0003dB-Uk for submit@debbugs.gnu.org; Tue, 10 Sep 2013 12:52:52 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:36526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJRBE-0003d6-R4 for submit@debbugs.gnu.org; Tue, 10 Sep 2013 12:52:44 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJRB8-00007y-KZ for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2013 12:52:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VJRB2-0003TY-EE for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2013 12:52:38 -0400 Original-Received: from smtp.nue.novell.com ([195.135.221.5]:38211) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VJRB2-0003P4-4T for bug-gnu-emacs@gnu.org; Tue, 10 Sep 2013 12:52:32 -0400 Original-Received: from byron.suse.de (charybdis-ext.suse.de [195.135.221.2]) by smtp.nue.novell.com with ESMTP (TLS encrypted); Tue, 10 Sep 2013 18:52:29 +0200 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Tue, 10 Sep 2013 13:05:22 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:78181 Archived-At: 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. =3D=3D=3D 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'.") =20 +(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 mod= e. +After that, changing the prefix key requires manipulating keymaps." + :type 'string + :group 'hideshow) + ;;------------------------------------------------------------------------= --- ;; internal variables =20 @@ -343,14 +350,16 @@ Use the command `hs-minor-mode' to toggle or set this variable.") =20 (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) --=20 Susanne Oberhauser SUSE LINUX Products GmbH +49-911-74053-574 Maxfeldstra=C3=9Fe 5 Processes and Infrastructure 90409 N=C3=BCrnberg GF: Jeff Hawn, Jennifer Guild, Felix Imend=C3=B6rffer, HRB 16746 (AG N=C3= =BCrnberg)