@ -568,7 +568,8 @@
(:global "M-=" count-words)
(:global "M-=" count-words
;; Remap C-h to DEL -- <f1> can be the "help" key
(define-key key-translation-map [?\C-h] [?\C-?])
@ -29,6 +29,8 @@
;;; Utility functions
;; I don't prefix these because ... reasons. Honestly I probably should prefix
(defun dos2unix (buffer)
"Replace \r\n with \n in BUFFER."
@ -58,6 +60,13 @@ each hook in HOOKS."
,@(dolist (hook hook-list hook-defun-add-hook-list)
(push `(add-hook ',hook #',func-name) hook-defun-add-hook-list)))))
(defun kill-region-or-backward-word (arg)
"Kill region if active, or backward word if not."
(kill-region (region-beginning) (region-end))
(defmacro when-unfocused (name &rest forms)
"Define a function NAME, executing FORMS, that fires when Emacs