This is a simplified version of information extracted from the accepted answer promoting much code which does not work due to an undefined function called kmu-parse-key-description.
(defun remove-key (keymap key)
(define-key keymap key nil)
(setq key (cl-mapcan (lambda (k)
(if (and (integerp k)
The (currently) latest documentation for AUCTEX can be found here:
The directory contains the manual (auctex.pdf) and reference card (tex-ref.pdf). When a newer version is out by the time you read this, it can probably be found by clicking on Parent Directory and selecting the latest directory called something like ...
I'd consider calling (define-key mymode-map [remap fill-paragraph] #'myfun) from mymode-hook rather than defining it in the minor mode.
(defun remap-fill-paragraph ()
(define-key mymode-map [remap fill-paragraph] #'myfun))
(add-hook 'mymode-hook #'remap-fill-paragraph)
This means you don't have to remember to change the minor-mode mapping if you ever ...
I found an easy solution from https://stackoverflow.com/questions/59251402/how-to-set-up-custom-automatic-character-replacement-in-emacs-ess.
(define-key ess-mode-map (kbd "C-%") "%>%")
(define-key inferior-ess-mode-map (kbd "C-%") "%>%")
Note C-M causes a problem.
There are two problems in the code above:
The code was bound to the non-existing q function key (see Gilles' answer).
In order to be added to a keymap, functions must be commands (i.e. interactive).
The following code works and solves both problems:
(defun myfun ()
(message "myfun called"))
Contrast M-f1 for a function key with ?\M-f for a character. You've bound myfun to [M-q] which means the one-key sequence where the key is the function key called q (which does not exist) with the modifier whose prefix is M (which is meta). Instead of referencing a function key q, you need to reference the character q. You can write this [?\M-q], or in ...
If you look at the doc string of kbd (C-h f kbd)), it mentions that there is an approximate inverse function called key-description. If you apply this function to the vector, you get
(key-description [27 213909545])
Note the different order!
The explanation is that these represent modifier keys: that's ESC followed by the key ...
I faced this exact problem and solved it by using evil-collection just on refTeX. Installed it as an additional package in my dotspacemacs/layers()
And initialised it only for refTeX in my user-config() through
C-h b lists all the keybindings currently in effect, and groups them by mode.
Similarly, C-h m displays a short description of the current major mode, and all active minor modes. This includes the keys bound to the maps for each mode. It doesn't include keys bound in the global keymap, so if you don't find your key here, that might be why.
The output from ...