[Top][All Lists]

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

showing argument list in mini-buffer of c/c++ func

From: axa
Subject: showing argument list in mini-buffer of c/c++ func
Date: Sun, 25 Apr 2004 02:25:09 +0200 (CEST)


Ive switched from Win32 programming environment to Linux, and Ive had no
problems writing small programs in either emacs or vim (preferably
emacs) until now. But now, for a slightly bigger program, there are
some big unpleasantness regarding emacs and (as others told me) CEDET
(particularly semantic) package.
Im new in working with emacs, however I think that, things Im
trying to accomplish are not "so advanced and beyond new users need", and
really hope, that with you'll help me to solve these problems easily,
since I really don't feel like learning one programming language
(elisp) so I could do programming in c/c++, using one well featured tool
like emacs. So, to start.
First, Ive been trying to _somehow_ make emacs show automatically (or at
least one-shortcut_away) in mini-buffer, argument list of c/c++ function,
when I type name of function (in .c file) and open first brace, or
when cursor is over some c/c++ function name (but primarily first thing).
For example, if in one .c file I type:
/* then emacs would show in mini-buffer, its (printf) argument list,
   something like the following: */
printf(char*, ...)

Yes, maybe I get used to this feature in MSVC back when I was programming
in Win32 environment, but anyway this is really big convenience for me,
when writing more that 200 lines of code. I think many would agree to
The second problem I have, which is slightly less important than first
problem, to me) is to somehow get list of structure members. For example,
if I have
something like this in one .c file:
struct timeval tv;
/* and I type */
/* then emacs in mini-buffer shows, something like the following
   comlpetition list */
time_t tv_sec;
suseconds_t tv_usec;

First I tried to solve this with with tags, but solution is not very
efficient and not automatic. Then, someone, recommended me to
download and install CEDET and ECB packages. Which I did but with no
expected result. I installed these packages (cedet-1.0beta2a and ecb-2.23)
just like INSTALL file suggests, that is, make (compile) and add some
lines in my ~/.emacs file. The packages resides in my home tree
(both cedet and ecb).
So my ~/.emacs file looks like the following (its short):
(setq-default transient-mark-mode t)
(setq-default case-fold-search t)
(setq c-default-style
      '((c-mode . "stroustrup") (c++-mode . "stroustrup") (other .

setq c-indent-level 3)
(setq c-tab-always-indent nil)
(global-font-lock-mode t)
(setq font-lock-maximum-decoration
      '((c-mode . 2) (c++-mode . 2)))
(setq tags-table-list

(require 'eldoc)

;; Configuration variables here:
(setq semantic-load-turn-useful-things-on t)
;; Load CEDET
(load-file "~/test/emacs-tools/cedet-1.0beta2a/common/cedet.el")
(add-to-list 'load-path
(load-file "~/test/emacs-tools/cedet-1.0beta2a/semantic/semantic-load.el")
(require 'ecb)
(require 'semantic-sb)
#--- EOF ---

Ive also created TAGS file with the following command:
find /usr/include -name "*.[chCH]" -print | etags -

And later in emacs loaded it with 'M-x visit-tags-table', but after
all this done, when I position cursor over (for example) 'printf'
function name in some .c file, emacs doesn't show anything in
mini-buffer. And when I type:

I get the following message:
Update Tag Table: main

And, again, when I open first brace after function name, like:

I get, message in mini-buffer, saying:
Buffer not currently parsable.

I really hope that you will help me to solve these problem(s), with
not too much effort from you.

Henceforth, thank you
Best regards, axa

reply via email to

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