reddit / emacs

Emergency Emacs (Stevey’s Tech Talk Emmacs Part 2)

sverrejoh · 2022-03-26 20:45
00-11 · 2022-03-27 19:11
Useful, as usual from Steve Y. ---- A few very minor comments: * Instead of (1) let-binding a local "backup" var to the value of a global var/option (such as `case-fold-search`), and then, in the `let` body, (2) *setting* the var/option to a different value at the outset, and (3) restoring (*setting*) the var/option to the "backup" value at the end: Just *bind* the var/option to the value you want it to have in the body. Let-binding does the equivalent of using a temporary variable to save, set, and restore - and without any assignment. * It looks like Steve's `show-kill-ring.el` does (some of) what [`browse-kill-ring.el`](https://www.emacswiki.org/emacs/BrowseKillRing) does. * It looks like Steve's `(for|back)ward-word-component` etc. commands essentially do, in a less general way, what minor mode `subword-mode` does. That mode changes all word commands to act only on word components (which means that it applies also to commands such as `backward-kill-word`). In effect, it redefines "word" to "word component". * `C-u` with `comment-region` does `uncomment-region`. IOW, you already have two bindings for those two. And if you bind `comment-region` to `C-<some-key>` then you just hold Control while hitting `u` and `<some-key>`.