From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 25 14:54:13 2017 Received: (at submit) by debbugs.gnu.org; 25 Apr 2017 18:54:13 +0000 Received: from localhost ([127.0.0.1]:40041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d35bI-0007YU-U5 for submit@debbugs.gnu.org; Tue, 25 Apr 2017 14:54:13 -0400 Received: from eggs.gnu.org ([208.118.235.92]:39702) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d35a9-0007WA-5X for submit@debbugs.gnu.org; Tue, 25 Apr 2017 14:53:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d35a2-0004pk-PO for submit@debbugs.gnu.org; Tue, 25 Apr 2017 14:52:55 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41339) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d35a2-0004pd-M1 for submit@debbugs.gnu.org; Tue, 25 Apr 2017 14:52:54 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d35a1-0004xp-7O for bug-gnu-emacs@gnu.org; Tue, 25 Apr 2017 14:52:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d35Zy-0004m2-Lu for bug-gnu-emacs@gnu.org; Tue, 25 Apr 2017 14:52:53 -0400 Received: from mx1.mailbox.org ([80.241.60.212]:39683) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d35Zy-0004ke-F4 for bug-gnu-emacs@gnu.org; Tue, 25 Apr 2017 14:52:50 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id CF91645EA9 for ; Tue, 25 Apr 2017 20:52:47 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id UBGEygtEHipU for ; Tue, 25 Apr 2017 20:52:45 +0200 (CEST) Date: Tue, 25 Apr 2017 20:52:45 +0200 (CEST) From: Vasilij Schneidermann To: bug-gnu-emacs@gnu.org Message-ID: <2136449839.36363.1493146365820@office.mailbox.org> Subject: 25.2; cc-mode doesn't use prog-mode-map as parent for c-mode-base-map MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Medium X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.4 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Tue, 25 Apr 2017 14:54:11 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.4 (----) See title. Modes derived from cc-mode inherit its keybindings, however they won't inherit keys defined in prog-mode-map. This could probably be rectified by using (set-keymap-parent c-mode-base-map prog-mode-map) at the strategically correct location (like the lengthy top-level if form setting up that map). Is there any reason to *not* have this change? I'd otherwise write a patch for it. In GNU Emacs 25.2.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.22.10) of 2017-04-22 built on juergen Windowing system distributor 'The X.Org Foundation', version 11.0.11903000 Configured using: 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GCONF GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 MODULES Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message dired format-spec rfc822 mml mml-sec password-cache epg epg-config gnus-util mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util help-fns help-mode easymenu cl-loaddefs pcase cl-lib mail-prsvr mail-utils time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote dbusbind inotify dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 86143 6257) (symbols 48 19774 0) (miscs 40 45 146) (strings 32 14298 4240) (string-bytes 1 408381) (vectors 16 11746) (vector-slots 8 430626 5147) (floats 8 166 174) (intervals 56 205 0) (buffers 976 18)) From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 25 14:57:50 2017 Received: (at 26658) by debbugs.gnu.org; 25 Apr 2017 18:57:50 +0000 Received: from localhost ([127.0.0.1]:40051 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d35eo-0007eS-Jb for submit@debbugs.gnu.org; Tue, 25 Apr 2017 14:57:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41711) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d35em-0007eF-Vu for 26658@debbugs.gnu.org; Tue, 25 Apr 2017 14:57:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d35eh-0007Vh-4Z for 26658@debbugs.gnu.org; Tue, 25 Apr 2017 14:57:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d35ec-0007SV-M8; Tue, 25 Apr 2017 14:57:38 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1d35ec-0002Ny-9f; Tue, 25 Apr 2017 14:57:38 -0400 From: Glenn Morris To: Vasilij Schneidermann Subject: Re: bug#26658: 25.2; cc-mode doesn't use prog-mode-map as parent for c-mode-base-map References: <2136449839.36363.1493146365820@office.mailbox.org> X-Spook: Israel Violence George W. Bush Border Response Biological X-Ran: ~lu*/(VjDuxJ?1YM"~~{9_RqUdoP.@FE.sm_/1T+Ud8&Oo|B9~!\u"~p`DN1/|ri{O,#<` X-Hue: black X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 25 Apr 2017 14:57:38 -0400 In-Reply-To: <2136449839.36363.1493146365820@office.mailbox.org> (Vasilij Schneidermann's message of "Tue, 25 Apr 2017 20:52:45 +0200 (CEST)") Message-ID: <7j1ssg2u3h.fsf@fencepost.gnu.org> User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 26658 Cc: 26658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) This seems to be a duplicate of http://debbugs.gnu.org/23175 From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 25 15:00:36 2017 Received: (at control) by debbugs.gnu.org; 25 Apr 2017 19:00:36 +0000 Received: from localhost ([127.0.0.1]:40059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d35hU-0007l9-8q for submit@debbugs.gnu.org; Tue, 25 Apr 2017 15:00:36 -0400 Received: from eggs.gnu.org ([208.118.235.92]:42568) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d35hT-0007ku-8C for control@debbugs.gnu.org; Tue, 25 Apr 2017 15:00:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d35hN-0000P8-H7 for control@debbugs.gnu.org; Tue, 25 Apr 2017 15:00:30 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d35hN-0000P4-EH for control@debbugs.gnu.org; Tue, 25 Apr 2017 15:00:29 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1d35hN-0007eD-3A for control@debbugs.gnu.org; Tue, 25 Apr 2017 15:00:29 -0400 Subject: control message for bug 26658 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Tue, 25 Apr 2017 15:00:29 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) merge 23175 26658 From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 26 02:30:17 2017 Received: (at 26658) by debbugs.gnu.org; 26 Apr 2017 06:30:17 +0000 Received: from localhost ([127.0.0.1]:40474 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3GSv-0004rJ-B2 for submit@debbugs.gnu.org; Wed, 26 Apr 2017 02:30:17 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:40117) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3GSt-0004r7-2y for 26658@debbugs.gnu.org; Wed, 26 Apr 2017 02:30:15 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id A77E820CF9; Wed, 26 Apr 2017 02:30:14 -0400 (EDT) Received: from web5 ([10.202.2.215]) by compute6.internal (MEProxy); Wed, 26 Apr 2017 02:30:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= secure.kjonigsen.net; h=cc:content-transfer-encoding :content-type:date:from:message-id:mime-version:reply-to:subject :to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=vh9xlzB2jJiHBo 6RBNV/Ato9/wbBUiuBQE3yEtyWGvs=; b=GQTLtz/dx9/Poln4RJBVbQOTtKqb9i s0gzTPxBlw3DILvXfpAM7coTMCyjWeb1OOZqF1Omz+brVCZ0jXZiTy9s+zjVeF1Q E5Mbg+6cvVUFxYf6BuK95f3y7Fcjqp5mb4v9q0SpH+B+QXXIoN0MXZl9Lxp+W8uF 6fjtSDxzFtaXCzZB5SySAiWR92HmB51alfmZ4XFTM4Od0M9HMMAeo58R/O8a7awI qLuXUyM7aanSXRFnH2JQGvyQqt41q1hIGdMh6JCl64z6RASqxATHngnwvmLhr6jI v6ie+qLZ5XFxQ2QzAk5ORJ1PucyOms6McGY204rF8mM3YcNDqMqhvWvw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:reply-to:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=vh9xlzB2jJiHBo6RB NV/Ato9/wbBUiuBQE3yEtyWGvs=; b=OvEUhQgbz4EPZZyS1OpcpJ94c/ULjVsNx 1aln8gU4enZ5VcKvhEjVo3ruh6A5xKLiSDsF9J9BZtG4TbwYZkpz/Dvk+4+hIrjP z6290aH55IDkjapNb8588KIowkxjA4jCodEgmDBiLD66jn7qIcoDU8Ar43FLD/Cb fVKtpytNJvdO2M8x7lcvxobTp8tdgjBfSgV+5Wkj6m/pwn55Px5P9QnJZVSHl9aF yL0kRX0Lwh7jjRRZSz9lBT2osX8LAfMzMpCc7hJszJjlk5lNpgF+VhELvcpIJXGo o5y4pKLHgEhMzpHqeZqFOFyrGCcguUvZSamuhmOum7h+IY6+/On/A== X-ME-Sender: Received: by mailuser.nyi.internal (Postfix, from userid 99) id 7ED1B9E237; Wed, 26 Apr 2017 02:30:14 -0400 (EDT) Message-Id: <1493188214.2722479.956519168.0116EDCE@webmail.messagingengine.com> From: =?utf-8?Q?Jostein=20Kj=C3=B8nigsen?= To: 26658@debbugs.gnu.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: multipart/alternative; boundary="_----------=_149318821427224790" X-Mailer: MessagingEngine.com Webmail Interface - ajax-88a795dc Date: Wed, 26 Apr 2017 08:30:14 +0200 Subject: cc-mode doesn't use prog-mode-map as parent for c-mode-base-map X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26658 Cc: Vasilij Schneidermann X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: jostein@kjonigsen.net Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) This is a multi-part message in MIME format. --_----------=_149318821427224790 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" While this feature isn't by any means critical to me, the response seems a bit overly cautious w.r.t. change IMO. >From what I can tell the main reason this has been tagged "WONT FIX" in the past is that you don't want cc-mode to depend on prog-mode. That's a bit odd, isn't it? What makes that particularly strange is how pretty much every single major- mode which derives from cc-mode probably will derive from prog-mode, so for the loading of any mode derived from cc-mode, such a change would probably lead to very few effective changes. -- Regards Jostein Kj=C3=B8nigsen jostein@kjonigsen.net =F0=9F=8D=B5 jostein@gmail.com https://jostein.kjonigsen.net --_----------=_149318821427224790 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"
While this feature isn't by any means critical to me, the respon= se seems a bit overly cautious w.r.t. change IMO.

From what I can tell the main reason this has been tagged "WONT FIX" i= n the past is that you don't want cc-mode to depend on prog-mode. That's a = bit odd, isn't it?

What makes that particularly strange is how pretty much every single m= ajor-mode which derives from cc-mode probably will derive from prog-mode, s= o for the loading of any mode derived from cc-mode, such a change would pro= bably lead to very few effective changes.

--
Regards
Jostein Kj=C3=B8nigsen



--_----------=_149318821427224790-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 26 02:38:00 2017 Received: (at 26658) by debbugs.gnu.org; 26 Apr 2017 06:38:00 +0000 Received: from localhost ([127.0.0.1]:40479 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3GaO-000532-5Q for submit@debbugs.gnu.org; Wed, 26 Apr 2017 02:38:00 -0400 Received: from mail-wr0-f196.google.com ([209.85.128.196]:36449) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3GaM-00052p-KV for 26658@debbugs.gnu.org; Wed, 26 Apr 2017 02:37:58 -0400 Received: by mail-wr0-f196.google.com with SMTP id v42so19471629wrc.3 for <26658@debbugs.gnu.org>; Tue, 25 Apr 2017 23:37:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=AOXk3rAtcN3Dgvbu5NNCqi+VFo0kjRQA0PdY1124AkQ=; b=HKRhmuJFlEI4K5+rnNF93l3MXwqvm/d+OE9mvqcU+CT2gQWsSbxt5xCoAO35iEd9Hy vZJN0YBlulMEUIqUkcFXpqw62MuG5ef9s8SNTcDz1CXkBkMR5KvJJPAPTXUhNrgpjjOJ Kz11XTM3Pc9B7AeSLnhuH2JFjPNEu5TODk4MNmQJsqNOlyXSnMYQp8KT4g9iltjplC7L UhA19esvnaHy/og1GclTjQPNFNWCxGTyHBjd8h/gcVZ4IuyJEEa+7UBXDeCDigmYilWt C2Jg2ZVvna8V3OpGcCRTKLMAGKTCwPs7FAnaKXX4v3/0Ga1ED84EsJCcK6OEPHg/fc4c FKxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=AOXk3rAtcN3Dgvbu5NNCqi+VFo0kjRQA0PdY1124AkQ=; b=s3hfFaPfIH5CY4XsyfU4WsKvfdonF4zBHdKGwKRA7T0IypuvnrCaeqpIpcKSfRyMzV K3TEFk9nSXaO4e6DEtlbjSOi+9lNBmVJJJDZ2qnJKrZAxQ6kmOKWbbLWgE8EgNEeU3Rl nt5rSwXo05Phs+G7UoY43lsIHlv0iPWvj9YTzYxoSKW1LTLgEGQKP582AommHEN8Gs0S QR4PnhpvyZj4T0cyUY33gXePuQlgncrD/bx7wLoaMfCjdtyOCk+JHFt6Fs2fKivWphGE 5ME6H6pcZibvtXdXsYN6wkwjTtqsziobMGJOquwGH9imw31jE4etDTR9l0uDGcob6a4p AEiQ== X-Gm-Message-State: AN3rC/6N4wtr7Ky2MfMoqXU3D6+qN8YA7OkJ+etl5KOcKHsRAr3sreq/ NSuUYi7H2zBATg== X-Received: by 10.223.176.163 with SMTP id i32mr13691180wra.32.1493188672835; Tue, 25 Apr 2017 23:37:52 -0700 (PDT) Received: from localhost (dslb-084-063-000-192.084.063.pools.vodafone-ip.de. [84.63.0.192]) by smtp.gmail.com with ESMTPSA id i24sm1648223wrc.40.2017.04.25.23.37.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 25 Apr 2017 23:37:52 -0700 (PDT) Date: Wed, 26 Apr 2017 08:37:57 +0200 From: Vasilij Schneidermann To: jostein@kjonigsen.net Subject: Re: cc-mode doesn't use prog-mode-map as parent for c-mode-base-map Message-ID: <20170426063757.GA635@odonien.localdomain> References: <1493188214.2722479.956519168.0116EDCE@webmail.messagingengine.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1493188214.2722479.956519168.0116EDCE@webmail.messagingengine.com> User-Agent: Mutt/1.8.2 (2017-04-18) X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 26658 Cc: 26658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Another thing to keep in mind is that the assumption there isn't anything interesting in prog-mode-map for cc-mode to use is wrong: The bug report that prompted me to open this one was about the user putting keys into it that end up being shared from all derived modes. From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 27 15:37:33 2017 Received: (at 26658) by debbugs.gnu.org; 27 Apr 2017 19:37:33 +0000 Received: from localhost ([127.0.0.1]:43239 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d3pEL-0002zQ-FX for submit@debbugs.gnu.org; Thu, 27 Apr 2017 15:37:33 -0400 Received: from ocolin.muc.de ([193.149.48.4]:40728 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1d3pEJ-0002zC-TE for 26658@debbugs.gnu.org; Thu, 27 Apr 2017 15:37:32 -0400 Received: (qmail 22558 invoked by uid 3782); 27 Apr 2017 19:37:29 -0000 Received: from acm.muc.de (p548C7144.dip0.t-ipconnect.de [84.140.113.68]) by colin.muc.de (tmda-ofmipd) with ESMTP; Thu, 27 Apr 2017 21:37:28 +0200 Received: (qmail 4549 invoked by uid 1000); 27 Apr 2017 19:36:36 -0000 Date: Thu, 27 Apr 2017 19:36:36 +0000 To: Vasilij Schneidermann Subject: Re: bug#26658: 25.2; cc-mode doesn't use prog-mode-map as parent for c-mode-base-map Message-ID: <20170427193636.GA2683@acm> References: <2136449839.36363.1493146365820@office.mailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2136449839.36363.1493146365820@office.mailbox.org> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26658 Cc: 26658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Vasilij. On Tue, Apr 25, 2017 at 20:52:45 +0200, Vasilij Schneidermann wrote: > See title. Modes derived from cc-mode inherit its keybindings, however > they won't inherit keys defined in prog-mode-map. This could probably > be rectified by using (set-keymap-parent c-mode-base-map prog-mode-map) > at the strategically correct location (like the lengthy top-level if > form setting up that map). Is there any reason to *not* have this > change? I'd otherwise write a patch for it. I've been trying to think of good reasons not to do this (on the CC Mode within Emacs), and haven't been able to come up with any yet. ;-) I think it's more likely that as define-derived-mode and prog-mode gradually congealed into existence, prog-mode-map got left out of c-mode-base-map, sort of forgotten. So yes, this change would surely be a good idea, given that this CC Mode is derived from prog-mode anyway. Do you want to write the patch? If so, have you got copyright assignments, or can you manage to write it as an "insignificant" (i.e. very small) change? I think the limit for insignificant changes is less than 15 lines, but I'm not absolutely sure. This wouldn't even need any changes in the manual. :-) If you don't really want to write the patch, just say so, and I'll do it. Thanks for the bug report! -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 28 11:30:54 2017 Received: (at 26658) by debbugs.gnu.org; 28 Apr 2017 15:30:54 +0000 Received: from localhost ([127.0.0.1]:44862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d47rB-0000Jc-Cr for submit@debbugs.gnu.org; Fri, 28 Apr 2017 11:30:54 -0400 Received: from mx1.mailbox.org ([80.241.60.212]:35243) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d413y-0004Je-3w for 26658@debbugs.gnu.org; Fri, 28 Apr 2017 04:15:38 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 190C042543; Fri, 28 Apr 2017 10:15:32 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter01.heinlein-hosting.de (spamfilter01.heinlein-hosting.de [80.241.56.115]) (amavisd-new, port 10030) with ESMTP id rNVMUXyHih7I; Fri, 28 Apr 2017 10:15:25 +0200 (CEST) Date: Fri, 28 Apr 2017 10:15:22 +0200 From: Vasilij Schneidermann To: Alan Mackenzie Subject: Re: bug#26658: 25.2; cc-mode doesn't use prog-mode-map as parent for c-mode-base-map Message-ID: <20170428081522.GA649@odonien.localdomain> References: <2136449839.36363.1493146365820@office.mailbox.org> <20170427193636.GA2683@acm> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170427193636.GA2683@acm> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26658 X-Mailman-Approved-At: Fri, 28 Apr 2017 11:30:52 -0400 Cc: 26658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) > So yes, this change would surely be a good idea, given that this CC Mode > is derived from prog-mode anyway. The more I think about it, the less sure I become. Pretty much every CC-derived mode does (define-derived-mode my-mode prog-mode ...) anyway and according to the macro expansion, its keymap's parent is set to (current-local-map) which should be equivalent to `prog-mode-map'. Could very well be a non-issue in practice and merely faulty testing by the user... > Do you want to write the patch? If so, have you got copyright > assignments, or can you manage to write it as an "insignificant" (i.e. > very small) change? I think the limit for insignificant changes is less > than 15 lines, but I'm not absolutely sure. This wouldn't even need any > changes in the manual. :-) > > If you don't really want to write the patch, just say so, and I'll do > it. I've assigned copyright already, but reckon this is a one-line patch. Before I submit anything, I'd like to make sure it's needed and the change works out as expected. From debbugs-submit-bounces@debbugs.gnu.org Tue May 02 17:17:17 2017 Received: (at 26658) by debbugs.gnu.org; 2 May 2017 21:17:17 +0000 Received: from localhost ([127.0.0.1]:51615 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5fAa-0004oT-SZ for submit@debbugs.gnu.org; Tue, 02 May 2017 17:17:17 -0400 Received: from mx1.mailbox.org ([80.241.60.212]:60779) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d5fAY-0004lc-Ki for 26658@debbugs.gnu.org; Tue, 02 May 2017 17:17:15 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.mailbox.org (Postfix) with ESMTPS id 6371D45BDE; Tue, 2 May 2017 23:17:08 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id WlkUcT_ZONNT; Tue, 2 May 2017 23:17:06 +0200 (CEST) Date: Tue, 2 May 2017 23:17:14 +0200 From: Vasilij Schneidermann To: Alan Mackenzie Subject: Re: bug#26658: 25.2; cc-mode doesn't use prog-mode-map as parent for c-mode-base-map Message-ID: <20170502211714.GB717@odonien.localdomain> References: <2136449839.36363.1493146365820@office.mailbox.org> <20170427193636.GA2683@acm> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ZGiS0Q5IWpPtfppv" Content-Disposition: inline In-Reply-To: <20170427193636.GA2683@acm> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26658 Cc: 26658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --ZGiS0Q5IWpPtfppv Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Hello again, I've ensured the bug is present and wrote a patch that fixes the issue. A workaround for people not using the latest cc-mode is to put the following into their init file: (eval-after-load 'cc-mode '(set-keymap-parent c-mode-base-map prog-mode-map)) --ZGiS0Q5IWpPtfppv Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-Set-c-mode-base-map-parent-to-prog-mode-map.patch" >From d60e354b809f8a551fcdf7322ab16a623153f02f Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Tue, 2 May 2017 23:12:21 +0200 Subject: [PATCH] Set c-mode-base-map parent to prog-mode-map * cc-mode.el (c-set-keymap-parent): New helper function for XEmacs and GNU Emacs. (c-mode-base-map): Set keymap parent for the map to prog-mode-map --- lisp/progmodes/cc-mode.el | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 20c63d4dbe..dc06a30f29 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -223,20 +223,23 @@ c-initialize-cc-mode (defvar c-mode-base-map () "Keymap shared by all CC Mode related modes.") +(defun c-set-keymap-parent (map parent) + ;; Necessary to use `cc-bytecomp-fboundp' below since this + ;; function is called from top-level forms that are evaluated + ;; while cc-bytecomp is active when one does M-x eval-buffer. + (cond + ;; Emacs + ((cc-bytecomp-fboundp 'set-keymap-parent) + (set-keymap-parent map parent)) + ;; XEmacs + ((fboundp 'set-keymap-parents) + (set-keymap-parents map parent)) + ;; incompatible + (t (error "CC Mode is incompatible with this version of Emacs")))) + (defun c-make-inherited-keymap () (let ((map (make-sparse-keymap))) - ;; Necessary to use `cc-bytecomp-fboundp' below since this - ;; function is called from top-level forms that are evaluated - ;; while cc-bytecomp is active when one does M-x eval-buffer. - (cond - ;; Emacs - ((cc-bytecomp-fboundp 'set-keymap-parent) - (set-keymap-parent map c-mode-base-map)) - ;; XEmacs - ((fboundp 'set-keymap-parents) - (set-keymap-parents map c-mode-base-map)) - ;; incompatible - (t (error "CC Mode is incompatible with this version of Emacs"))) + (c-set-keymap-parent map c-mode-base-map) map)) (defun c-define-abbrev-table (name defs &optional doc) @@ -276,6 +279,7 @@ c-bind-special-erase-keys nil (setq c-mode-base-map (make-sparse-keymap)) + (c-set-keymap-parent c-mode-base-map prog-mode-map) ;; Separate M-BS from C-M-h. The former should remain ;; backward-kill-word. -- 2.12.2 --ZGiS0Q5IWpPtfppv-- From debbugs-submit-bounces@debbugs.gnu.org Wed May 03 23:50:37 2017 Received: (at control) by debbugs.gnu.org; 4 May 2017 03:50:37 +0000 Received: from localhost ([127.0.0.1]:53432 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d67mm-0005sq-P0 for submit@debbugs.gnu.org; Wed, 03 May 2017 23:50:36 -0400 Received: from mail-it0-f50.google.com ([209.85.214.50]:37355) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d67mk-0005sb-9p for control@debbugs.gnu.org; Wed, 03 May 2017 23:50:35 -0400 Received: by mail-it0-f50.google.com with SMTP id x188so1761651itb.0 for ; Wed, 03 May 2017 20:50:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=4KhQUmHuKTmw37zKh77oZK7fnZoiIfPWG89k2j3A2w8=; b=uU5LTlvVKi+5x4+vU7hamVJZd9VuX/qA7h+BY7BfPdVTG3nB8byUc5qOuQwzmb95GE k1AfgpcHzfhTUvxFE+b5SOuxbwmW/TzPWk1TQDskkBtJ5iQWtiXFOVJJxKB7bVr9mx02 8nGwTotpVEFAC+fxBVgeCaOVtyiP4pejU7hLRFXLcvO2wOFzVuktOO/vOOpk4/OmYZzj VrJU3lW92L4SElBGOR4o0DuITpVTOHMXQAT9LZUrkaruFfEJ8K7mXCtFtzReWpm16qTv /LAOQ1zP3AdlvlhIMdlMOaPPZoQuqd20/UVexI5Sj/vckISPLCqDdaI96lu7EMDT5WFN e5vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=4KhQUmHuKTmw37zKh77oZK7fnZoiIfPWG89k2j3A2w8=; b=l91lPz3y2eBasmqCMljlmJLyQ6kPDHdGaw1CsHwc6Ex9wrDOzepYH3+yfynEuJ+LM+ iKYSDpSKfHH7zxC18ZSn70DNbx+AORP9/WUtg7N1f9beudqSZsbRYrmDXew1kYWw0IwV mOrAWp6rEdA+Da6YfcqXfPDG2In1lwiWub1+puOHu2gIwAb/I0Iw/qDEg2sIW491+Nzh 7NSfWG/1L0qdln+5RIYVTG9U8X7JJHIYNETfI1yuoS4sXmcZTlHSHV+NB3EKiluZbMY6 XBCi+nT4tQ0wHN1uhdJL1CGdOr1oKwJnRirFFIVs9kldR+fxYLfKYj13BwvdtEy1H7V2 MJsQ== X-Gm-Message-State: AN3rC/6Nd0MyLl4mE0oEqIeMowmdaTF1AYb+WbqKHGOhuSqLEet/3IvG jaKGhOAo1I9t+zUR X-Received: by 10.36.155.194 with SMTP id o185mr11953110itd.64.1493869828469; Wed, 03 May 2017 20:50:28 -0700 (PDT) Received: from zony ([45.2.7.65]) by smtp.googlemail.com with ESMTPSA id k72sm10206998iok.52.2017.05.03.20.50.27 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 May 2017 20:50:27 -0700 (PDT) From: npostavs@users.sourceforge.net To: control@debbugs.gnu.org Subject: Re: bug#26658: 25.2; cc-mode doesn't use prog-mode-map as parent for c-mode-base-map References: <2136449839.36363.1493146365820@office.mailbox.org> <20170427193636.GA2683@acm> Date: Wed, 03 May 2017 23:52:00 -0400 In-Reply-To: <20170427193636.GA2683@acm> (Alan Mackenzie's message of "Thu, 27 Apr 2017 19:36:36 +0000") Message-ID: <87wp9xmg7z.fsf@users.sourceforge.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) severity 26658 wishlist tags 26658 = patch quit Alan Mackenzie writes: > I've been trying to think of good reasons not to do this (on the CC Mode > within Emacs), and haven't been able to come up with any yet. ;-) > > I think it's more likely that as define-derived-mode and prog-mode > gradually congealed into existence, prog-mode-map got left out of > c-mode-base-map, sort of forgotten. > > So yes, this change would surely be a good idea, given that this CC Mode > is derived from prog-mode anyway. Vasilij Schneidermann writes: > I've ensured the bug is present and wrote a patch that fixes the issue. From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 07:23:24 2017 Received: (at 26658) by debbugs.gnu.org; 7 May 2017 11:23:24 +0000 Received: from localhost ([127.0.0.1]:59100 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7KHb-0007NI-Vo for submit@debbugs.gnu.org; Sun, 07 May 2017 07:23:24 -0400 Received: from ocolin.muc.de ([193.149.48.4]:58802 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1d7KHa-0007N8-GD for 26658@debbugs.gnu.org; Sun, 07 May 2017 07:23:22 -0400 Received: (qmail 60665 invoked by uid 3782); 7 May 2017 11:23:20 -0000 Received: from acm.muc.de (p548C60C2.dip0.t-ipconnect.de [84.140.96.194]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 07 May 2017 13:23:19 +0200 Received: (qmail 23377 invoked by uid 1000); 7 May 2017 11:22:29 -0000 Date: Sun, 7 May 2017 11:22:29 +0000 To: Vasilij Schneidermann Subject: Re: bug#26658: 25.2; cc-mode doesn't use prog-mode-map as parent for c-mode-base-map Message-ID: <20170507112229.GA22721@acm.fritz.box> References: <2136449839.36363.1493146365820@office.mailbox.org> <20170427193636.GA2683@acm> <20170502211714.GB717@odonien.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170502211714.GB717@odonien.localdomain> User-Agent: Mutt/1.5.24 (2015-08-30) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26658 Cc: 26658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Vasilij. On Tue, May 02, 2017 at 23:17:14 +0200, Vasilij Schneidermann wrote: > I've ensured the bug is present and wrote a patch that fixes the issue. > A workaround for people not using the latest cc-mode is to put the > following into their init file: > (eval-after-load 'cc-mode > '(set-keymap-parent c-mode-base-map prog-mode-map)) Thanks for the patch. [ .... ] > (setq c-mode-base-map (make-sparse-keymap)) > + (c-set-keymap-parent c-mode-base-map prog-mode-map) It doesn't seem to be quite right in the way it handles XEmacs stuff, but I don't think it's possible to be "right" here, at least not sensibly. If this patch were to be applied to standalone CC Mode, it would test (derived-mode-p 'prog-mode) before calling (c-set-keymap-parent c-mode-base-map prog-mode-map). prog-mode does not exist in XEmacs, and is unlikely ever to exist there. But this code is purely for Emacs. What do you think? For the commit message, the format is to aim for a complete first line which makes sense on its own. (It's a sentence, but without a terminating full stop.) So something like this would do: ######################################################################### Make prog-mode-map the keymap parent of c-mode-base-map Fixes bug #26658. * lisp/progmodes/cc-mode.el (c-set-keymap-parent): New function extracted from c-make-inherited-keymap. (c-mode-base-map): ....... ######################################################################### Note that the path is given before "cc-mode.el". Do you have commit access to the Emacs repository? -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Sun May 07 09:59:01 2017 Received: (at 26658) by debbugs.gnu.org; 7 May 2017 13:59:01 +0000 Received: from localhost ([127.0.0.1]:60398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7MiD-0004Zy-EU for submit@debbugs.gnu.org; Sun, 07 May 2017 09:59:01 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:40420) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d7MiB-0004Zf-HU for 26658@debbugs.gnu.org; Sun, 07 May 2017 09:59:00 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 0B510448D6; Sun, 7 May 2017 15:58:53 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter03.heinlein-hosting.de (spamfilter03.heinlein-hosting.de [80.241.56.117]) (amavisd-new, port 10030) with ESMTP id y30NNWbdJ3lA; Sun, 7 May 2017 15:58:51 +0200 (CEST) Date: Sun, 7 May 2017 15:58:34 +0200 From: Vasilij Schneidermann To: Alan Mackenzie Subject: Re: bug#26658: 25.2; cc-mode doesn't use prog-mode-map as parent for c-mode-base-map Message-ID: <20170507135834.GB645@odonien.localdomain> References: <2136449839.36363.1493146365820@office.mailbox.org> <20170427193636.GA2683@acm> <20170502211714.GB717@odonien.localdomain> <20170507112229.GA22721@acm.fritz.box> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="r5Pyd7+fXNt84Ff3" Content-Disposition: inline In-Reply-To: <20170507112229.GA22721@acm.fritz.box> X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 26658 Cc: 26658@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --r5Pyd7+fXNt84Ff3 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline > It doesn't seem to be quite right in the way it handles XEmacs stuff, > but I don't think it's possible to be "right" here, at least not > sensibly. If this patch were to be applied to standalone CC Mode, it > would test (derived-mode-p 'prog-mode) before calling > (c-set-keymap-parent c-mode-base-map prog-mode-map). prog-mode does not > exist in XEmacs, and is unlikely ever to exist there. > > But this code is purely for Emacs. What do you think? Hm, I don't really have a way to test this in XEmacs anyway. Testing for prog-mode sounds like a good idea, but will the above example do the right thing? The issue with `derived-mode-p` is that it works upon the *current* major mode instead of accepting a major mode to test against other major modes. What is the current major mode when this line is evaluated? Wouldn't it make more sense to use (boundp 'prog-mode-map), considering that we're using the variable, not the mode? > For the commit message, the format is to aim for a complete first line > which makes sense on its own. (It's a sentence, but without a > terminating full stop.) So something like this would do: > > ######################################################################### > Make prog-mode-map the keymap parent of c-mode-base-map > > Fixes bug #26658. > > * lisp/progmodes/cc-mode.el (c-set-keymap-parent): New function > extracted from c-make-inherited-keymap. > (c-mode-base-map): ....... > > ######################################################################### > > Note that the path is given before "cc-mode.el". > > Do you have commit access to the Emacs repository? No and I doubt I'll ever get it because I don't understand the commit message rules at all. They appear to be loosely based upon GNU changelog guidelines, but with everyone I send patches to interpreting them differently, probably because there isn't much substance to them in the first place. I've resorted to using M-x add-change-log-entry, copying the result into the commit message and adjusting it describing my changes, but there's apparently more to it than that. Anyway, here's an updated patch. --r5Pyd7+fXNt84Ff3 Content-Type: text/x-diff; charset=utf-8 Content-Disposition: attachment; filename="0001-Make-prog-mode-map-the-parent-of-c-mode-base-map.patch" >From 1e4a92e05b78edb2f58c138aa7792d39a6d9a9cb Mon Sep 17 00:00:00 2001 From: Vasilij Schneidermann Date: Sun, 7 May 2017 15:55:49 +0200 Subject: [PATCH] Make prog-mode-map the parent of c-mode-base-map Fixes #26658. * lisp/progmodes/cc-mode.el (c-mode-base-map): Make prog-mode-map the parent of c-mode-map if possible. --- lisp/progmodes/cc-mode.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 20c63d4dbe..8f9e40bb0d 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -276,6 +276,9 @@ c-bind-special-erase-keys nil (setq c-mode-base-map (make-sparse-keymap)) + (when (and (cc-bytecomp-fboundp 'set-keymap-parent) + (boundp 'prog-mode-map)) + (set-keymap-parent c-mode-base-map prog-mode-map)) ;; Separate M-BS from C-M-h. The former should remain ;; backward-kill-word. -- 2.12.2 --r5Pyd7+fXNt84Ff3-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 12 13:51:25 2017 Received: (at 26658-done) by debbugs.gnu.org; 12 Jul 2017 17:51:25 +0000 Received: from localhost ([127.0.0.1]:35730 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dVLnJ-00023N-FX for submit@debbugs.gnu.org; Wed, 12 Jul 2017 13:51:25 -0400 Received: from ocolin.muc.de ([193.149.48.4]:42223 helo=mail.muc.de) by debbugs.gnu.org with smtp (Exim 4.84_2) (envelope-from ) id 1dVLnH-00023E-DM for 26658-done@debbugs.gnu.org; Wed, 12 Jul 2017 13:51:23 -0400 Received: (qmail 21802 invoked by uid 3782); 12 Jul 2017 17:51:21 -0000 Received: from acm.muc.de (p548C6B90.dip0.t-ipconnect.de [84.140.107.144]) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 12 Jul 2017 19:51:21 +0200 Received: (qmail 13887 invoked by uid 1000); 12 Jul 2017 17:50:03 -0000 Date: Wed, 12 Jul 2017 17:50:03 +0000 To: Vasilij Schneidermann Subject: Re: bug#26658: 25.2; cc-mode doesn't use prog-mode-map as parent for c-mode-base-map Message-ID: <20170712175003.GA13295@acm> References: <2136449839.36363.1493146365820@office.mailbox.org> <20170427193636.GA2683@acm> <20170502211714.GB717@odonien.localdomain> <20170507112229.GA22721@acm.fritz.box> <20170507135834.GB645@odonien.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170507135834.GB645@odonien.localdomain> User-Agent: Mutt/1.7.2 (2016-11-26) X-Delivery-Agent: TMDA/1.1.12 (Macallan) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 26658-done Cc: 26658-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, Vasilij. On Sun, May 07, 2017 at 15:58:34 +0200, Vasilij Schneidermann wrote: [ .... ] > > Do you have commit access to the Emacs repository? > No and I doubt I'll ever get it because I don't understand the commit > message rules at all. They appear to be loosely based upon GNU > changelog guidelines, but with everyone I send patches to interpreting > them differently, probably because there isn't much substance to them in > the first place. I've resorted to using M-x add-change-log-entry, > copying the result into the commit message and adjusting it describing > my changes, but there's apparently more to it than that. I've committed your patch, slightly altered, and am closing the bug. I suspect that the commit message I used will be yet another variant. ;-( Thanks again for that patch. > Anyway, here's an updated patch. > >>From 1e4a92e05b78edb2f58c138aa7792d39a6d9a9cb Mon Sep 17 00:00:00 2001 > From: Vasilij Schneidermann > Date: Sun, 7 May 2017 15:55:49 +0200 > Subject: [PATCH] Make prog-mode-map the parent of c-mode-base-map > Fixes #26658. > * lisp/progmodes/cc-mode.el (c-mode-base-map): Make prog-mode-map the > parent of c-mode-map if possible. > --- > lisp/progmodes/cc-mode.el | 3 +++ > 1 file changed, 3 insertions(+) > diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el > index 20c63d4dbe..8f9e40bb0d 100644 > --- a/lisp/progmodes/cc-mode.el > +++ b/lisp/progmodes/cc-mode.el > @@ -276,6 +276,9 @@ c-bind-special-erase-keys > nil > (setq c-mode-base-map (make-sparse-keymap)) > + (when (and (cc-bytecomp-fboundp 'set-keymap-parent) > + (boundp 'prog-mode-map)) > + (set-keymap-parent c-mode-base-map prog-mode-map)) > ;; Separate M-BS from C-M-h. The former should remain > ;; backward-kill-word. > -- > 2.12.2 -- Alan Mackenzie (Nuremberg, Germany). From unknown Sat Aug 09 01:10:46 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 10 Aug 2017 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator