GNU bug report logs - #39631
Mention how to remove entire keymaps in Your Init File

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Sun, 16 Feb 2020 04:39:02 UTC

Severity: wishlist

Tags: notabug, wontfix

Done: Stefan Kangas <stefan <at> marxist.se>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: 39631 <at> debbugs.gnu.org
Subject: bug#39631: Mention how to remove entire keymaps in Your Init File
Date: Sun, 16 Feb 2020 12:14:41 +0800
There are insufficient instructions and examples in

Info 49.3.6 Rebinding Keys in Your Init File

as of emacs-version "26.3"

to allow the user to get rid of e.g., (seen with C-h b)
C-,		flyspell-goto-next-error
C-.		flyspell-auto-correct-word
C-;		flyspell-auto-correct-previous-word
C-c $		flyspell-correct-word-before-point

Leaving only
C-M-i		flyspell-auto-correct-word

The user tries everything
(eval-after-load "flyspell-mode"
  '(add-hook
    'flyspell-mode-hook
    (lambda ()
      (setq flyspell-mode-map nil)
      ;;too close to C-/ (undo) and already on ESC TAB:
      ;;(define-key flyspell-mode-map [(control ?\.)] [])
      (define-key flyspell-mode-map (kbd "C-,") (lambda () (interactive))) #<---last time what I was told to try
      (define-key flyspell-mode-map (kbd "C-.") (lambda () (interactive)))
      (define-key flyspell-mode-map [(control ?\,)] (lambda () (interactive)))
      (define-key flyspell-mode-map [(control ?\.)] (lambda () (interactive)))
      (define-key flyspell-mode-map [(control ?\;)] (lambda () (interactive)))
      (global-unset-key [(control ?\,)])
      (global-unset-key [(control ?\.)])
      (global-unset-key [(control ?\;)])
      (setq flyspell-mode-map nil)
      )))
(global-unset-key [(control ?\,)])
(global-unset-key [(control ?\.)])
(global-unset-key [(control ?\;)])
(defvar flyspell-mode-map "")
(add-hook 'flyspell-mode-hook
	  (lambda ()
	    (define-key flyspell-mode-map (kbd "C-M-i")
                    'flyspell-auto-correct-word)))
(setq flyspell-mode-map nil)
(global-set-key (kbd "C-M-i") 'flyspell-auto-correct-word)

Alas nothing will give the user the aforementioned desired result.
Please put examples in
Info 49.3.6 Rebinding Keys in Your Init File
showing how to remove entire keymaps with one line,
and then how to sparsely populate them back. Thanks.




This bug report was last modified 5 years and 78 days ago.

Previous Next


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