Variable: cc-other-file-alist
cc-other-file-alist is a customizable variable defined in
find-file.el.gz.
Value
(("\\.cc\\'" (".hh" ".h"))
("\\.hh\\'" (".cc" ".C" ".CC" ".cxx" ".cpp" ".c++"))
("\\.c\\'" (".h")) ("\\.m\\'" (".h"))
("\\.h\\'" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp" ".c++" ".m"))
("\\.C\\'" (".H" ".hh" ".h")) ("\\.H\\'" (".C" ".CC"))
("\\.CC\\'" (".HH" ".H" ".hh" ".h")) ("\\.HH\\'" (".CC"))
("\\.c\\+\\+\\'" (".h++" ".hh" ".h")) ("\\.h\\+\\+\\'" (".c++"))
("\\.cpp\\'" (".hpp" ".hh" ".h")) ("\\.hpp\\'" (".cpp"))
("\\.cxx\\'" (".hxx" ".hh" ".h")) ("\\.hxx\\'" (".cxx")))
Documentation
Alist of extensions to find given the current file's extension.
This list should contain the most used extensions before the others,
since the search algorithm searches sequentially through each directory
specified in ff-search-directories. If a file is not found, a new one
is created with the first matching extension (.cc yields .hh).
This variable was added, or its default value changed, in Emacs 24.4.
Source Code
;; Defined in /usr/src/emacs/lisp/find-file.el.gz
(defcustom cc-other-file-alist
'(("\\.cc\\'" (".hh" ".h"))
("\\.hh\\'" (".cc" ".C" ".CC" ".cxx" ".cpp" ".c++"))
("\\.c\\'" (".h"))
("\\.m\\'" (".h"))
("\\.h\\'" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp" ".c++" ".m"))
("\\.C\\'" (".H" ".hh" ".h"))
("\\.H\\'" (".C" ".CC"))
("\\.CC\\'" (".HH" ".H" ".hh" ".h"))
("\\.HH\\'" (".CC"))
("\\.c\\+\\+\\'" (".h++" ".hh" ".h"))
("\\.h\\+\\+\\'" (".c++"))
("\\.cpp\\'" (".hpp" ".hh" ".h"))
("\\.hpp\\'" (".cpp"))
("\\.cxx\\'" (".hxx" ".hh" ".h"))
("\\.hxx\\'" (".cxx")))
"Alist of extensions to find given the current file's extension.
This list should contain the most used extensions before the others,
since the search algorithm searches sequentially through each directory
specified in `ff-search-directories'. If a file is not found, a new one
is created with the first matching extension (`.cc' yields `.hh')."
:version "24.4" ; add .m
:type '(repeat (list regexp (choice (repeat string) function))))