diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el index 7458a660c..51663a8e1 100644 --- a/Auxiliary/cmake-mode.el +++ b/Auxiliary/cmake-mode.el @@ -259,7 +259,9 @@ the indentation. Otherwise it retains the same position on the line" (setq comment-start "#") ; Run user hooks. - (run-hooks 'cmake-mode-hook)) + (if (boundp 'prog-mode-hook) + (run-hooks 'prog-mode-hook 'cmake-mode-hook) + (run-hooks 'cmake-mode-hook))) ; Help mode starts here