From: Po Lu Date: Fri, 9 Jun 2023 07:55:19 +0000 (+0800) Subject: Initialize text conversion hooks for each C Mode buffer X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a5b74e2ff62faccea19c00783e62bc328c30f92a;p=emacs.git Initialize text conversion hooks for each C Mode buffer * lisp/progmodes/cc-mode.el (c-initialize-cc-mode): Always add text conversion hooks. --- diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 1364117bdc8..88e0aebb9a2 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -251,13 +251,14 @@ control). See \"cc-mode.el\" for more info." (when (fboundp 'electric-indent-local-mode) (add-hook 'electric-indent-mode-hook 'c-electric-indent-mode-hook) (add-hook 'electric-indent-local-mode-hook - 'c-electric-indent-local-mode-hook)) - ;; Set up text conversion, for Emacs >= 30.0 - (when (boundp 'post-text-conversion-hook) - (add-hook 'post-text-conversion-hook #'c-post-text-conversion))) + 'c-electric-indent-local-mode-hook))) ;; Will try initialization hooks again if they failed. (put 'c-initialize-cc-mode initprop c-initialization-ok)))) + ;; Set up text conversion, for Emacs >= 30.0 + (when (boundp 'post-text-conversion-hook) + (add-hook 'post-text-conversion-hook #'c-post-text-conversion)) + (unless new-style-init (c-init-language-vars-for 'c-mode)))