From: Stefan Monnier Date: Sat, 9 Dec 2023 23:03:48 +0000 (-0500) Subject: Tweak doc of `analyze-text-conversion` vs `post-self-insert-hook` X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=213d30b3eaad4ffbe9685005ecc92201ab8cb806;p=emacs.git Tweak doc of `analyze-text-conversion` vs `post-self-insert-hook` * lisp/simple.el (analyze-text-conversion): Fix typo. * lisp/progmodes/cc-mode.el (c-initialize-cc-mode): Add comment about `post-text-conversion-hook`. --- diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 227a6af2a6b..4842de15164 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -256,6 +256,9 @@ control). See \"cc-mode.el\" for more info." (put 'c-initialize-cc-mode initprop c-initialization-ok)))) ;; Set up text conversion, for Emacs >= 30.0 + ;; This is needed here because CC-mode's implementation of + ;; electricity does not rely on `post-self-insert-hook' (which is + ;; already handled adequately by `analyze-text-conversion'). (when (boundp 'post-text-conversion-hook) (add-hook 'post-text-conversion-hook #'c-post-text-conversion nil t)) diff --git a/lisp/simple.el b/lisp/simple.el index fab6b279189..d60acf5477a 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -11181,7 +11181,7 @@ For each insertion: and delete the adjascent pair if `electric-pair-delete-adjacent-pairs'. - - Run `post-self-insert-functions' for the last character of + - Run `post-self-insert-hook' for the last character of any inserted text so that modes such as `electric-pair-mode' can work.