summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-05-23 09:10:28 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-05-23 13:36:14 -0700
commit5e92a49d954b52dd274cf5f35fa947758271a038 (patch)
tree3d50f05316ae61d6c05885d2349e69c4f93d1329
parentd98b9c59dcaca13fad270f61ab95b21b12cc17ef (diff)
downloaddotfiles-5e92a49d954b52dd274cf5f35fa947758271a038.tar.gz
make M-a skip forward over beginnings of comments
-rw-r--r--.emacs.d/init.el6
1 files changed, 6 insertions, 0 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index a86f700f..33344b4a 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -1251,6 +1251,12 @@ don't consider windows satisfying the predicate EXCLUDE."
;; often it does the wrong thing.
(setq-default electric-indent-inhibit t)
+;; Make it easy to use M-a to reach beginning of first sentence of a comment.
+(defun spw/backward-sentence-skip-forward ()
+ (interactive)
+ (call-interactively #'backward-sentence) (skip-syntax-forward " <"))
+(global-set-key [remap backward-sentence] #'spw/backward-sentence-skip-forward)
+
;;;; TRAMP