From 2b1664283d782dfe7d5f9c3857060d8f137bf767 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 25 Aug 2021 17:38:59 -0500 Subject: Change typo logic on ' I should set up a typo-repeater or w/e to go from ' to ′ to ″. --- init.el | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'init.el') diff --git a/init.el b/init.el index c9444c9..5bf7077 100644 --- a/init.el +++ b/init.el @@ -1654,8 +1654,23 @@ successive invocations." (:hook-into prog-mode)) (setup (:straight typo) + + ;; jlf & cvandusen on #emacs make a great point: ’ (RIGHT SINGLE QUOTATION + ;; MARK) is /not/ an apostrophe. Making it curly is a typographical + ;; consideration, not an input consideration. (I suppose you could make the + ;; argument that all of these are typographical considerations, but .. bleh.) + (:bind "'" self-insert-command + "`" self-insert-command) + + ;; Enable C-c 8 map in all buffers + (typo-global-mode +1) + (add-hook 'text-mode-hook (defun text-mode@typo-unless () + ;; I use this /instead/ of the provided + ;; `typo-disable-electricity-functions' because the latter checks + ;; on every pertinent keypress. I know I want /no/ typo-ing in + ;; these certain buffers, so I won't even turn on the mode. "Start `typo-mode' UNLESS the buffer matches a predicate." (unless (or ; predicates here (string-match-p "COMMIT_EDITMSG" buffer-file-name)) -- cgit 1.4.1-21-gabe81