aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Pfeiffer <[email protected]>2004-10-26 21:39:34 +0000
committerDaniel Pfeiffer <[email protected]>2004-10-26 21:39:34 +0000
commit71796940395596955d99bf4fa385aeaebd7d6138 (patch)
tree32e71dc76a653efc600ffdfbf8a8d3c74b9f6e37
parent4456f9649b1b92d39f50b1512900c6c57171785e (diff)
(cc-other-file-alist): Bring it in line with cc-mode's auto-mode-alist entries and use \' instead of $.
-rw-r--r--lisp/find-file.el30
1 files changed, 17 insertions, 13 deletions
diff --git a/lisp/find-file.el b/lisp/find-file.el
index 4805d08400..d85d2ab0f5 100644
--- a/lisp/find-file.el
+++ b/lisp/find-file.el
@@ -57,7 +57,7 @@
;; format above can be changed to include a function to be called when the
;; current file matches the regexp:
;;
-;; '(("\\.cc$" cc-function)
+;; '(("\\.cc$" cc--function)
;; ("\\.hh$" hh-function))
;;
;; These functions must return a list consisting of the possible names of the
@@ -239,22 +239,26 @@ the preceding slash. The star represents all the subdirectories except
:group 'ff)
(defcustom cc-other-file-alist
- '(
- ("\\.cc$" (".hh" ".h"))
- ("\\.hh$" (".cc" ".C"))
+ '(("\\.cc\\'" (".hh" ".h"))
+ ("\\.hh\\'" (".cc" ".C"))
- ("\\.c$" (".h"))
- ("\\.h$" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp"))
+ ("\\.c\\'" (".h"))
+ ("\\.h\\'" (".c" ".cc" ".C" ".CC" ".cxx" ".cpp"))
- ("\\.C$" (".H" ".hh" ".h"))
- ("\\.H$" (".C" ".CC"))
+ ("\\.C\\'" (".H" ".hh" ".h"))
+ ("\\.H\\'" (".C" ".CC"))
- ("\\.CC$" (".HH" ".H" ".hh" ".h"))
- ("\\.HH$" (".CC"))
+ ("\\.CC\\'" (".HH" ".H" ".hh" ".h"))
+ ("\\.HH\\'" (".CC"))
- ("\\.cxx$" (".hh" ".h"))
- ("\\.cpp$" (".hh" ".h"))
- )
+ ("\\.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,