Skip to main content

Timeline for before-save-hook for cc-mode

Current License: CC BY-SA 3.0

3 events
when toggle format what by license comment
Dec 17, 2014 at 17:01 comment added Dan First, did you mean c-mode-common-hook? Second, it looks like it will add the function to before-save-hook the first time you enter a C-related language, but then that function will be called just before every save on every buffer. What OP needs to do is run the function conditional on the buffer being in a specific mode (see @Constantine's comment for how).
Dec 17, 2014 at 16:41 review First posts
Dec 17, 2014 at 17:41
Dec 17, 2014 at 16:41 history answered user3672638 CC BY-SA 3.0