This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-down-sexp-with-mark (arg) | |
"Like `down-list', but with some differences. | |
- Enter strings in addition to lists. | |
- Mark inner of the list or string reached. | |
- Traverse beyond the lowest level in a list or string and descend | |
into the next top-level list or string when necessary. | |
- Move up and select contents of the string or list reached when | |
prefix is negative. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; This is based on a Dvorak keyboard layout and isn't | |
;; very comprehensive. The purpose is just to demonstrate | |
;; that you can create your own modal editing system in Emacs | |
;; using only a little bit of code. | |
;; | |
;; After loading this file, you can use "M-\" to enter command | |
;; mode (aka "normal-state"). | |
;; | |
;; To exit back to "insert-state", press "i". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; There seems to be no built-in mechanism to swap modifier keys in | |
;; Emacs, but it can be accomplished (for the most part) by | |
;; translating a near-exhaustive list of modifiable keys. In the case | |
;; of 'control and 'meta, some keys must be omitted to avoid errors or | |
;; other undesired effects. | |
(defun my/make-key-string (modsymbol basic-event) | |
"Convert the combination of MODSYMBOL and BASIC-EVENT. | |
BASIC-EVENT can be a character or a function-key symbol. The | |
return value can be used with `define-key'." | |
(vector (event-convert-list `(,modsymbol ,basic-event)))) |