From 71796940395596955d99bf4fa385aeaebd7d6138 Mon Sep 17 00:00:00 2001 From: Daniel Pfeiffer Date: Tue, 26 Oct 2004 21:39:34 +0000 Subject: (cc-other-file-alist): Bring it in line with cc-mode's auto-mode-alist entries and use \' instead of $. --- lisp/find-file.el | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'lisp') 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, -- cgit v1.2.3