New answers tagged

0

You can define your mode map like this: (defvar dnd-mode-map (let ((map (make-sparse-keymap))) (prog1 map (define-key map "q" 'dnd-quit) (when (eq this-command 'eval-defun) (let ((mmap (assq 'dnd-mode minor-mode-map-alist))) (when mmap (setcdr mmap map))))))) Now you are able to reevaluate the map definition ...


2

To self-insert the key in the source block: (defun my-org-mode-hook () "Custom `org-mode' behaviours." (typo-mode 1) (add-hook 'typo-disable-electricity-functions 'org-in-src-block-p nil :local)) (add-hook 'org-mode-hook 'my-org-mode-hook) Documentation: *A list of functions to call before an electric key binding is used. If one of the functions ...


3

There are several things wrong with the code: You need #', (or just ',) in front of func. Inside a backquote expression, just func would result in the literal symbol func, not its value as a variable. Use comma (, to evaluate it. But then quote that evaluated result. You need to use kbd, or else you are trying to bind the key sequence C-x SPC k. You need ...


Top 50 recent answers are included