Emacs : eldoc mode and c-eldoc mode

by

eldoc mode as the name suggests provides documentation for Elisp files. This is a very useful and cool mode and shows the function signature in the mode-line when your cursor is on a particular function.  It also provides info on the variables. Check out the screen-shots below.

eldoc : Function signatures

eldoc : Variables description

To start eldoc mode, add the following to your .emacs file

;;Turn on documentation in elisp mode
(add-hook 'emacs-lisp-mode-hook
          '(lambda ()
	     (turn-on-eldoc-mode)))

c-eldoc mode is eldoc mode for c. It displays the arguments of C functions while one is programming.

c-eldoc

To add c-eldoc mode, get the latest c-eldoc.el, copy it in your load-path and then add then following to your .emacs file.

(add-hook 'c-mode-hook 'c-turn-on-eldoc-mode)
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: