From 55ba8c022b493b494bea257e4f523758154e0fdd Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 16 Oct 2015 14:54:09 -0700 Subject: Make src headers idempotent and standalone Redo src/*.h so that each include file is idempotent (that is, can be included multiple times with the latter inclusions having no effect) and standalone (that is, can be included by itself, with no include file other than config.h needed as a prerequisite). This is standard practice in GNU programs nowadays. * lwlib/lwlib-widget.h, src/buffer.h, src/category.h, src/character.h: * src/charset.h, src/coding.h, src/commands.h, src/disptab.h: * src/fontset.h, src/gnutls.h, src/indent.h, src/keymap.h, src/macros.h: * src/regex.h [emacs]: * src/syntax.h, src/systty.h, src/termhooks.h: Include lisp.h, for Lisp_Object. * src/buffer.h, src/category.h, src/cm.h, src/commands.h, src/disptab.h: * src/indent.h, src/intervals.h, src/keyboard.h, src/macros.h: * src/process.h, src/puresize.h, src/region-cache.h, src/syntax.h: * src/syssignal.h, src/sysstdio.h, src/systty.h, src/termchar.h: * src/termopts.h, src/tparam.h, src/unexec.h: Protect against multiple inclusion. * src/buffer.h: Include character.h, for STRING_CHAR. * src/emacsgtkfixed.h (struct frame): * src/fontset.h (struct face): * src/region-cache.h (struct buffer): * src/termhooks.h (struct glyph): * src/xsettings.h (struct x_display_info): Add possibly-forward decl. * src/syntax.h: Include buffer.h, for BVAR. * src/sysselect.h: Include lisp.h, for eassume. * src/termchar.h: Include , for FILE. * src/widget.h: Include , for Widget. * src/xsettings.h: Include , for XEvent. --- src/keyboard.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/keyboard.h') diff --git a/src/keyboard.h b/src/keyboard.h index 0402e0a582c..67afc3bc2be 100644 --- a/src/keyboard.h +++ b/src/keyboard.h @@ -17,6 +17,9 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Emacs. If not, see . */ +#ifndef EMACS_KEYBOARD_H +#define EMACS_KEYBOARD_H + #include "systime.h" /* for struct timespec, Time */ #include "coding.h" /* for ENCODE_UTF_8 and ENCODE_SYSTEM */ #include "termhooks.h" @@ -483,3 +486,5 @@ extern const char *const lispy_function_keys[]; #endif INLINE_HEADER_END + +#endif /* EMACS_KEYBOARD_H */ -- cgit v1.2.1