If you are writing C/C++/Java/Emacs Lisp/Python, then semantic-sticky-func-mode will do what you want.
NOTE: This seems to be working with CEDET from Git, not stock CEDET currently in Emacs 24.4. To get Emacs from Git:
git clone http://git.code.sf.net/p/cedet/git cedet
And load CEDET first above everything else in your init file:
(load-file (concat user-emacs-directory "/cedet/cedet-devel-load.el"))
(add-to-list 'load-path (concat user-emacs-directory "cedet/contrib"))
(load-file (concat user-emacs-directory "cedet/contrib/cedet-contrib-load.el"))
When enable, this mode shows the function point is currently in at the first line of the current buffer. This is useful when you have a very long function that spreads more than a screen, and you don't have to scroll up to read the function name and then scroll down to original position.
It displays full function interface (return type, function name and parameters), not just function name.
To enable it, put this code in your init file:
UPDATE: One of the problem with current
semantic-stickyfunc-mode is that it does not display all parameters that are scattered on multiple lines. To solve this problem, I created the package stickyfunc-enhance.
Here is a demo in C:
Here is a demo in Emacs Lisp:
UPDATE: Alternatively, you can use helm-semantic-or-imenu. When you are inside a function and run the command, the cursor is placed right at the function in the list, so you can always see the full function interface. DEMO:
First, I use
helm-semantic-or-imenu to move to the function
helm-define-key-with-subkeys and move point there.
Then, I start
helm-semantic-or-imenu again and
helm-define-key-with-subkeys is pre-selected.
Then, I move point to the variable helm-map and execute
helm-semantic-or-imenu again on two function: helm-next-source and helm-previous-source. This time, instead of showing the current semantic tag I'm operating in (which is helm-map), it shows the other two tags in Helm Semantic buffer. This is because I supplied a prefix argument before running the command.
Also this demo is in Emacs Lisp, it works for C/C++ as well and it's more flexible if you got a really long function interface.