Copyright © 2002 Zack Rusin and KDE Development Team

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "Documentation License".

KDE Emacs
*********

KDE Emacs is an Emacs package with tons of useful features which ease KDE development process. KDE Emacs usefull programming tips.

Introduction
************

Getting Connected
*****************

Installation
============

Files
=====

Keybindings
===========

Generating stubs
****************

Tips
****

Q. How do I hide #ifdef's in source files without actually changing them?

A.  Use hide-ifdef-mode which supports hiding of ifdef blocks without actually changing the file. In this mode C-c @ C-d hides ifdef block and C-c @ C-s shows it again.

Q. How do I get more information about the keybindings of the currently active modes?

A. Type M-x describe-mode.

Q. How do I get automatic syntax higlighting of my custom types?

A. Use a package named ctypes.el which does exactly that.

Q. Is it possible to highlight dangerous syntax, just like Borland JBuilder does it?

A. Yes, use the cwarn.el package.

Q. How do I easily customize Emacs faces/colors?

A. Use the color-theme.el package.

Q. How do I set the taskbar Emacs identification string?

A. To your .emacs add a line like:

     (setq frame-title-format "%b (%m)")

which will display ``filename (mode)'' type of string in the taskbar. Type C-h v frame-title-format  to get more info.

Q. Can I make Emacs jump to the matching parenthesis with % just like vi?

A. Yes, just add to your .emacs something like:

     ;; Make the % key jump to the matching {}[]() if on another, like VI
     (global-set-key "%" 'match-paren)

     (defun match-paren (arg)
       "Go to the matching parenthesis if on parenthesis otherwise insert %."
       (interactive "p")
       (cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
             ((looking-at "\\s\)") (forward-char 1) (backward-list 1))
             (t (self-insert-command (or arg 1)))))

Q. Can I have words like FIXME, TODO, HACK or NOTE higlighted in documentation strings?

A. Yes, either use code-keywords.el package or wait till I'll add it to KDE Emacs.

Q. I really, really hate identifiersNamedLikeThis. I'd like to change them to identifiers_named_like_this but the maintainer of the application/library that I'm hacking on doesn't agree with me. What can I do?

A. Use the glasses.el package which changes identifiersNamedLikeThis to identifiers_named_like_this in the buffers you're editing and switches them back to their original form once you save those buffers.

Q. Is it possible to get function completion or signature display in Emacs? Will it ever be done?

A. Yes and yes. I've been planning on doing this for quite a while and hopefully will have this finished pretty soon (no dates though :) ) The first thing that should be done is writing a few fixes for the Semantic package (c.bnf to be more exact), because Semantic doesn't handle templates, member function declared as const or KDE access specifiers, once this is done all that will be left is using semanticdb package which efficiently stores and retrieves large amounts of tokens and then displaying tokens belonging to types at point which match current context.

Q. Is there a package that would highlight changes that I made to a certain file?

A. I wouldn't be writing this if there wouldn't - try M-x highlight-changes-mode.

Q. How to get a diff between the stuff I have in my local buffer and the file on disk?

A. Use ibuffer package. After M-x ibuffer typing = over a file will display a diff between the buffer and the file on the disk.

Q. I want to temporarily highlight certain variable in a file, how to do it?

A. Type M-x hi-lock-mode, now C-x w h regexp RET face RET highlights regexp with face in the current file and C-x w r regexp RET unhighlights it.

GNU Free Documentation License
******************************

     [file fdl.texi not included]