(load-file "<YOUR-PATH-TO-CURL>/curl-style.el")
(add-hook 'c-mode-common-hook 'curl-c-mode-common-hook)
(defvar my-style-selective-mode-hook nil
"Holds a list of predicate and hooks pairs. (list (PREDICATE . HOOK)
...) It is used by my-mode-selective-mood-hook-function for choosing
the right hook to run.")
(defun my-style-selective-mode-hook-function ()
"Run each PREDICATE in `my-style-selective-mode-hook' to see if the
HOOK in the pair should be executed. If the PREDICATE evaluate to non
nil HOOK is executed and the rest of the hooks are ignored."
(let ((h my-style-selective-mode-hook))
(while (not (eval (caar h)))
(setq h (cdr h)))
(funcall (cdar h))))
(add-hook 'c-mode-common-hook 'my-style-selective-mode-hook-function)
(add-hook 'my-style-selective-mode-hook
'((string-match "curl" (buffer-file-name)) . curl-c-mode-common-hook))
(add-hook 'my-style-selective-mode-hook
'((string-match "other" (buffer-file-name)) . other-c-mode-common-hook))
(add-hook 'my-style-selective-mode-hook '(t . my-c-mode-common-hook) t)