This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Check code stype in Emacs: gdb-code-style.el
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 14 Apr 2012 10:44:35 +0300
- Subject: Re: [PATCH] Check code stype in Emacs: gdb-code-style.el
- References: <1334378614-13787-1-git-send-email-yao@codesourcery.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Yao Qi <yao@codesourcery.com>
> Date: Sat, 14 Apr 2012 12:43:34 +0800
>
> gdb-code-style.el gives some checks, and highlight corresponding parts
> if they are violations on a certain rule or convention in gdb development.
> So far, it only has two, and I'd like to push more, if it is the right
> way to go.
Thanks.
> +;; Don't include these files directly.
> +(defun gdb-include-hook ()
> + (font-lock-add-keywords
> + nil
> + '(("\\<include[ ]*\\(<\\(stat\\|dirent\\|wait\\|sys/wait\\|assert\\)\\.h>\\)" 1 font-lock-warning-face t))))
This catches '#include <stat.h>', but doesn't catch '#include "sys/stat.h"'.