[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 08848e3: Make ff-find-other-file symmetric for C++
From: |
Noam Postavsky |
Subject: |
[Emacs-diffs] master 08848e3: Make ff-find-other-file symmetric for C++ (Bug#20192) |
Date: |
Sun, 21 May 2017 19:23:04 -0400 (EDT) |
branch: master
commit 08848e33baf16d3137b171205f51839d8fcf7d06
Author: Dima Kogan <address@hidden>
Commit: Noam Postavsky <address@hidden>
Make ff-find-other-file symmetric for C++ (Bug#20192)
`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.
* lisp/find-file.el (cc-other-file-alist): Map ".hh" and ".h" to all
C++ extensions to make them symmetric with the C++ extensions that map
to them. This lets repeated invocations of `ff-find-other-file'
toggle between all pairs of sources/headers.
---
lisp/find-file.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/find-file.el b/lisp/find-file.el
index e02bea0..d369169 100644
--- 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"))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 08848e3: Make ff-find-other-file symmetric for C++ (Bug#20192),
Noam Postavsky <=