[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: navigate in C
From: |
Kevin Rodgers |
Subject: |
Re: navigate in C |
Date: |
Thu, 26 Oct 2006 09:51:38 -0600 |
User-agent: |
Thunderbird 1.5.0.7 (Windows/20060909) |
Pedro Sa da Costa wrote:
1 - Is there a way in C mode to, by selecting the .h file or a method
and press a shortcut key, go that file or function?
For example:
#include "header.h"
by pressing F3 in the selected "header.h", or simply have the cursor of
the header file, open the file.
,----[ C-h f ff-find-related-file RET ]
| ff-find-related-file is an alias for `ff-find-other-file' in
`find-file.el'.
| (ff-find-related-file &optional in-other-window ignore-include)
|
| Find the header or source file corresponding to this file.
| Being on a `#include' line pulls in that file.
|
| If optional in-other-window is non-nil, find the file in the other window.
| If optional ignore-include is non-nil, ignore being on `#include' lines.
|
| Variables of interest include:
|
| - `ff-case-fold-search'
| Non-nil means ignore cases in matches (see `case-fold-search').
| If you have extensions in different cases, you will want this to be
nil.
|
| - `ff-always-in-other-window'
| If non-nil, always open the other file in another window, unless an
| argument is given to `ff-find-other-file'.
|
| - `ff-ignore-include'
| If non-nil, ignores #include lines.
|
| - `ff-always-try-to-create'
| If non-nil, always attempt to create the other file if it was not
found.
|
| - `ff-quiet-mode'
| If non-nil, traces which directories are being searched.
|
| - `ff-special-constructs'
| A list of regular expressions specifying how to recognize special
| constructs such as include files etc, and an associated method for
| extracting the filename from that construct.
|
| - `ff-other-file-alist'
| Alist of extensions to find given the current file's extension.
|
| - `ff-search-directories'
| List of directories searched through with each extension specified in
| `ff-other-file-alist' that matches this file's extension.
|
| - `ff-pre-find-hook'
| List of functions to be called before the search for the file starts.
|
| - `ff-pre-load-hook'
| List of functions to be called before the other file is loaded.
|
| - `ff-post-load-hook'
| List of functions to be called after the other file is loaded.
|
| - `ff-not-found-hook'
| List of functions to be called if the other file could not be found.
|
| - `ff-file-created-hook'
| List of functions to be called if the other file has been created.
|
| [back]
`----
and
int test(){
call_test();
}
have the cursor above "call_test()" call and pressing F3, goes to the
function.
I think you need to create a tags table file, select it, then find the
call_test tag. See the "Tags Tables" section of the Emacs manual.
--
Kevin
- navigate in C, Pedro Sa da Costa, 2006/10/26
- Re: navigate in C,
Kevin Rodgers <=