all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "積丹尼 Dan Jacobson" <jidanni@jidanni.org>
To: 39631@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	[thread overview]
Message-ID: <87ftfbf9se.5.fsf@jidanni.org> (raw)

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.





         reply	other threads:[~2020-02-16  4:14 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-16  3:28 bug#39630: Mention how to unset keys in Your Init File 積丹尼 Dan Jacobson
     [not found] ` <handler.39630.C.15829502435362.notifdonectrl.0@debbugs.gnu.org>
2020-02-16  4:14   ` 積丹尼 Dan Jacobson [this message]
2020-02-16 15:20     ` bug#39631: Mention how to remove entire keymaps " Eli Zaretskii
2020-02-16 16:30       ` 積丹尼 Dan Jacobson
2020-02-16 16:37       ` 積丹尼 Dan Jacobson
2020-02-29  4:28       ` Stefan Kangas
2020-02-29  4:51     ` bug#39631: Actually 39802 solves the need for 39630 and 39631 積丹尼 Dan Jacobson
2020-02-29  5:17     ` bug#39631: Zapping a whole keymap 積丹尼 Dan Jacobson
2020-02-16 15:19 ` bug#39630: Mention how to unset keys in Your Init File Eli Zaretskii
2020-02-16 16:28   ` 積丹尼 Dan Jacobson
2020-02-16 16:44   ` 積丹尼 Dan Jacobson
2020-02-29  4:23   ` Stefan Kangas
2020-02-29  5:00     ` Noam Postavsky
2020-02-29  5:22       ` bug#39802: " Stefan Kangas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ftfbf9se.5.fsf@jidanni.org \
    --to=jidanni@jidanni.org \
    --cc=39631@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.