GNU bug report logs - #32212
26; `subword-mode' doc string shows empty key-binding list

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Thu, 19 Jul 2018 15:12:01 UTC

Severity: minor

Tags: confirmed, fixed, patch

Found in version 25.1

Fixed in version 26.2

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #18 received at 32212 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Berman <stephen.berman <at> gmx.net>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Noam Postavsky <npostavs <at> gmail.com>, 32212 <at> debbugs.gnu.org
Subject: Re: bug#32212: 26;
 `subword-mode' doc string shows empty key-binding list
Date: Fri, 20 Jul 2018 10:38:17 +0200
On Fri, 20 Jul 2018 10:01:04 +0300 Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Noam Postavsky <npostavs <at> gmail.com>
>> Date: Thu, 19 Jul 2018 20:58:52 -0400
>> Cc: 32212 <at> debbugs.gnu.org
>> 
>> > emacs -Q
>> >
>> > C-h f subword-mode
>> >
>> > You see this at the end of buffer *Help*:
>> >
>> > key             binding
>> > ---             -------
>> >
>> >
>> > It's not just about this appearing before the library is loaded.
>> > Loading the library does not populate the list of keys and their
>> > bindings.  You always get such a heading, with no keys shown.
>> 
>> 
>> Seems to be a regression in 25.1, in 24.5 I see
>> 
>> key             binding
>> ---             -------
>> 
>> <remap>        Prefix Command
>> 
>> <remap> <backward-kill-word>    subword-backward-kill
>
> ISTR that the implementation changed radically, so perhaps this is the
> (unintended) consequence.

Maybe due to this change:

commit 6ddc44225e743e2b2a0d5c192f50aefd7a4a915b
Author: Daniel Colascione <dancol <at> dancol.org>
Date:   Sun Mar 23 00:36:26 2014 -0700

    Merge capitalized-words-mode and subword-mode

diff --git a/lisp/progmodes/subword.el b/lisp/progmodes/subword.el
--- a/lisp/progmodes/subword.el
+++ b/lisp/progmodes/subword.el
@@ -104,12 +82,6 @@
 (defvar subword-mode-map
-  (let ((map (make-sparse-keymap)))
-    (dolist (cmd '(forward-word backward-word mark-word kill-word
-				backward-kill-word transpose-words
-                                capitalize-word upcase-word downcase-word
-                                left-word right-word))
-      (let ((othercmd (let ((name (symbol-name cmd)))
-                        (string-match "\\([[:alpha:]-]+\\)-word[s]?" name)
-                        (intern (concat "subword-" (match-string 1 name))))))
-        (define-key map (vector 'remap cmd) othercmd)))
-    map)
+  ;; We originally remapped motion keys here, but now use Emacs core
+  ;; hooks.  Leave this keymap around so that user additions to it
+  ;; keep working.
+  (make-sparse-keymap)
   "Keymap used in `subword-mode' minor mode.")

Steve Berman




This bug report was last modified 6 years and 300 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.