diff options
| author | Paul Eggert | 2015-02-12 18:20:12 -0800 |
|---|---|---|
| committer | Paul Eggert | 2015-02-12 18:21:32 -0800 |
| commit | 65563fd7714271582d5146c09202c0f7a0631fe5 (patch) | |
| tree | 3da5c2a4dec51d8d53f1b8cc7b7de072bd2577d9 /src | |
| parent | e39d96ebe4c342885433afc28232197ce398fe71 (diff) | |
| download | emacs-65563fd7714271582d5146c09202c0f7a0631fe5.tar.gz emacs-65563fd7714271582d5146c09202c0f7a0631fe5.zip | |
Better support for future plugins
See the thread containing:
http://lists.gnu.org/archive/html/emacs-devel/2015-02/msg00720.html
* lib-src/make-docfile.c (write_globals): Generate code that #defines
Qxxx macros other than Qnil only if DEFINE_NONNIL_Q_SYMBOL_MACROS.
Qnil is safe to define even in plugins, since it must be zero for
other reasons.
* src/lisp.h (DEFINE_LISP_SYMBOL): New macro, replacing and simplifying
DEFINE_LISP_SYMBOL_BEGIN / DEFINE_LISP_SYMBOL_END. All uses changed.
(DEFINE_NONNIL_Q_SYMBOL_MACROS): New macro, defaulting to true.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 7 | ||||
| -rw-r--r-- | src/lisp.h | 13 |
2 files changed, 17 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f8e65d5d91d..6d246fb52c6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2015-02-13 Paul Eggert <eggert@cs.ucla.edu> | ||
| 2 | |||
| 3 | Better support for future plugins | ||
| 4 | * lisp.h (DEFINE_LISP_SYMBOL): New macro, replacing and simplifying | ||
| 5 | DEFINE_LISP_SYMBOL_BEGIN / DEFINE_LISP_SYMBOL_END. All uses changed. | ||
| 6 | (DEFINE_NONNIL_Q_SYMBOL_MACROS): New macro, defaulting to true. | ||
| 7 | |||
| 1 | 2015-02-11 Martin Rudalics <rudalics@gmx.at> | 8 | 2015-02-11 Martin Rudalics <rudalics@gmx.at> |
| 2 | 9 | ||
| 3 | * w32term.c (w32_read_socket): In SIZE_MAXIMIZED and | 10 | * w32term.c (w32_read_socket): In SIZE_MAXIMIZED and |
diff --git a/src/lisp.h b/src/lisp.h index 6c7b51fea06..7795c90e5cc 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -740,11 +740,18 @@ struct Lisp_Symbol | |||
| 740 | /* Declare extern constants for Lisp symbols. These can be helpful | 740 | /* Declare extern constants for Lisp symbols. These can be helpful |
| 741 | when using a debugger like GDB, on older platforms where the debug | 741 | when using a debugger like GDB, on older platforms where the debug |
| 742 | format does not represent C macros. */ | 742 | format does not represent C macros. */ |
| 743 | #define DEFINE_LISP_SYMBOL_BEGIN(name) \ | 743 | #define DEFINE_LISP_SYMBOL(name) \ |
| 744 | DEFINE_GDB_SYMBOL_BEGIN (Lisp_Object, name) | 744 | DEFINE_GDB_SYMBOL_BEGIN (Lisp_Object, name) \ |
| 745 | #define DEFINE_LISP_SYMBOL_END(name) \ | ||
| 746 | DEFINE_GDB_SYMBOL_END (LISP_INITIALLY (XLI_BUILTIN_LISPSYM (i##name))) | 745 | DEFINE_GDB_SYMBOL_END (LISP_INITIALLY (XLI_BUILTIN_LISPSYM (i##name))) |
| 747 | 746 | ||
| 747 | /* By default, define macros for Qt, etc., as this leads to a bit | ||
| 748 | better performance in the core Emacs interpreter. A plugin can | ||
| 749 | define DEFINE_NONNIL_Q_SYMBOL_MACROS to be false, to be portable to | ||
| 750 | other Emacs instances that assign different values to Qt, etc. */ | ||
| 751 | #ifndef DEFINE_NONNIL_Q_SYMBOL_MACROS | ||
| 752 | # define DEFINE_NONNIL_Q_SYMBOL_MACROS true | ||
| 753 | #endif | ||
| 754 | |||
| 748 | #include "globals.h" | 755 | #include "globals.h" |
| 749 | 756 | ||
| 750 | /* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa. | 757 | /* Convert a Lisp_Object to the corresponding EMACS_INT and vice versa. |