X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/09d9db2c4921cb2eb0974892164dd03d6bffdd80..bb5aa5d6c3a0138c36e2879a78d9cdb22e6f410e:/lisp/progmodes/cc-styles.el diff --git a/lisp/progmodes/cc-styles.el b/lisp/progmodes/cc-styles.el index e161eb6d0f..96cb15f2a7 100644 --- a/lisp/progmodes/cc-styles.el +++ b/lisp/progmodes/cc-styles.el @@ -650,6 +650,15 @@ any reason to call this function directly." (setq c-style-variables-are-local-p t)) )) +(defun cc-choose-style-for-mode (mode default-style) + "Return suitable style for MODE from DEFAULT-STYLE. +DEFAULT-STYLE has the same format as `c-default-style'." + (if (stringp default-style) + default-style + (or (cdr (assq mode default-style)) + (cdr (assq 'other default-style)) + "gnu"))) + (cc-provide 'cc-styles)