bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#20192: [PATCH] for C or C++ sources (ff-find-other-file) now has a s


From: Lars Ingebrigtsen
Subject: bug#20192: [PATCH] for C or C++ sources (ff-find-other-file) now has a symmetric mapping
Date: Tue, 23 Feb 2016 21:44:43 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Dima Kogan <dima@secretsauce.net> writes:

> `cc-other-file-alist' has a mapping of file extensions to switch
> between headers and sources, but the mappings weren't completely
> symmetric.  In particular .cpp would map to .hh, but .hh would NOT map
> to .cpp.  This patch updates the mappings to always contain symmetric
> pairs so that repeated invocations of (ff-find-other-file) can toggle
> between all pairs of sources/headers.

I think this sounds like a reasonable addition, but that's not a
function I've ever used, so I can't really say.  Does anybody object to
this change?

--- a/lisp/find-file.el
+++ b/lisp/find-file.el
@@ -242,11 +242,11 @@ the preceding slash.  The star represents all the 
subdirectories except
 
 (defcustom cc-other-file-alist
   '(("\\.cc\\'"  (".hh" ".h"))
-    ("\\.hh\\'"  (".cc" ".C"))
+    ("\\.hh\\'"  (".cc" ".C" ".CC" ".cxx" ".cpp" ".c++"))
 
     ("\\.c\\'"   (".h"))
     ("\\.m\\'"   (".h"))
-    ("\\.h\\'"   (".c" ".cc" ".C" ".CC" ".cxx" ".cpp" ".m"))
+    ("\\.h\\'"   (".c" ".cc" ".C" ".CC" ".cxx" ".cpp" ".c++" ".m"))
 
     ("\\.C\\'"   (".H"  ".hh" ".h"))
     ("\\.H\\'"   (".C"  ".CC"))


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





reply via email to

[Prev in Thread] Current Thread [Next in Thread]