aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS40
1 files changed, 33 insertions, 7 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 8ed8133beae..dce02c31e59 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -305,13 +305,39 @@ header.
305which specifies an alternative printing method which is faster when 305which specifies an alternative printing method which is faster when
306few or no entries have changed. 306few or no entries have changed.
307 307
308** Emacs can now load shared/dynamic libraries (modules) that expose a 308** Emacs can now load shared/dynamic libraries (modules).
309C interface. Such modules can provide additional functions or 309A dynamic Emacs module is a shared library that provides additional
310otherwise interact with Emacs just like Lisp code. Modules have to 310functionality for use in Emacs Lisp programs, just like a package
311export a function `emacs_module_init' and conform to the API laid out 311written in Emacs Lisp would. The functions `load' and `require' were
312in emacs-module.h. Modules are disabled by default and need to be 312extended to load such modules, as they do with Emacs Lisp packages.
313enabled using the --with-modules configure flag. They are 313
314experimental and subject to change. 314A module should export a C-callable function named
315`emacs_module_init', which Emacs will call as part of the call to
316`load' or `require' which loads the module. It should also export a
317symbol named `plugin_is_GPL_compatible' to indicate that its code is
318released under the GPL or compatible license; Emacs will refuse to
319load modules that don't export such a symbol.
320
321If a module needs to call Emacs functions, it should do so through the
322API defined and documented in the header file `emacs-module.h'. Note
323that any module that provides Lisp-callable functions will have to use
324Emacs functions such as `fset' and `funcall', in order to register its
325functions with the Emacs Lisp interpreter.
326
327Modules can create `user-ptr' Lisp objects that embed pointers to C
328struct's defined by the module. This is useful for keeping around
329complex data structures created by a module, to be passed back to the
330module's functions. User-ptr objects can also have associated
331"finalizers" -- functions to be run when the object is GC'ed; this is
332useful for freeing any resources allocated for the underlying data
333structure, such as memory, open file descriptors, etc. A new
334predicate `user-ptr-p' returns non-nil if its argument is a `usr-ptr'
335object.
336
337Loadable modules in Emacs are an experimental feature, and subject to
338change in future releases. For that reason, their support is disabled
339by default, and must be enabled by using the `--with-modules' option
340at configure time.
315 341
316 342
317* Editing Changes in Emacs 25.1 343* Editing Changes in Emacs 25.1