<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/src, branch fix/not-defined-at-runtime</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Simplify recording of main thread's ID on MS-Windows</title>
<updated>2015-11-21T17:44:02+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2015-11-21T17:44:02+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=d696d62fea48096680d6d511a71c4df56d00a51f'/>
<id>d696d62fea48096680d6d511a71c4df56d00a51f</id>
<content type='text'>
* src/w32term.c (w32_initialize):
* src/w32console.c (initialize_w32_display):
* src/w32fns.c (globals_of_w32fns): Don't record the main thread
ID independently for each type of session (GUI, TTY, batch).
* src/w32term.c (w32_init_main_thread): New function, records the
main thread's thread ID.
* src/w32term.h: Add prototype for w32_init_main_thread.
* src/emacs.c (main) [WINDOWSNT]: Call w32_init_main_thread.

* src/emacs-module.c [WINDOWSNT]: Rename main_thread_id to
main_thread, for consistency with other threading libraries.  All
users changed.  Include w32term.h.
(check_main_thread) [WINDOWSNT]: Simplify the test: no need to
make sure the main thread is alive, as we hold a handle on it
opened by w32_init_main_thread.
(module_init) [WINDOWSNT]: Reuse the thread ID recorded by
w32_init_main_thread, instead of calling the requisite APIs once
more.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/w32term.c (w32_initialize):
* src/w32console.c (initialize_w32_display):
* src/w32fns.c (globals_of_w32fns): Don't record the main thread
ID independently for each type of session (GUI, TTY, batch).
* src/w32term.c (w32_init_main_thread): New function, records the
main thread's thread ID.
* src/w32term.h: Add prototype for w32_init_main_thread.
* src/emacs.c (main) [WINDOWSNT]: Call w32_init_main_thread.

* src/emacs-module.c [WINDOWSNT]: Rename main_thread_id to
main_thread, for consistency with other threading libraries.  All
users changed.  Include w32term.h.
(check_main_thread) [WINDOWSNT]: Simplify the test: no need to
make sure the main thread is alive, as we hold a handle on it
opened by w32_init_main_thread.
(module_init) [WINDOWSNT]: Reuse the thread ID recorded by
w32_init_main_thread, instead of calling the requisite APIs once
more.
</pre>
</div>
</content>
</entry>
<entry>
<title>; * src/lread.c (Fload): Fix last change.</title>
<updated>2015-11-21T12:01:25+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2015-11-21T12:01:25+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=3c407d2919f972a6b03bdb3f30d14cdfa7de06fe'/>
<id>3c407d2919f972a6b03bdb3f30d14cdfa7de06fe</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Call 'window-size-change-functions' for mini-windows</title>
<updated>2015-11-21T11:30:30+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2015-11-21T11:30:30+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=3ca44a1ad414c5e5b07f35959ce21f01064476a8'/>
<id>3ca44a1ad414c5e5b07f35959ce21f01064476a8</id>
<content type='text'>
* src/window.c (grow_mini_window, shrink_mini_window): Set the
frame's 'window_sizes_changed' flag.
* src/xdisp.c (redisplay_internal): Call the hooks on
'window-size-change-functions' if the call to 'echo_area_display'
sets the frame's 'window_sizes_changed' flag.
(syms_of_xdisp) &lt;window-size-change-functions&gt;:
Update doc string to indicate the mini-window resizes trigger a
call to the hooks, and don't promise that will happen "before
redisplay".  (Bug#19576, Bug#21333)

* doc/lispref/windows.texi (Window Hooks): Update the description
of 'window-size-change-functions'.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/window.c (grow_mini_window, shrink_mini_window): Set the
frame's 'window_sizes_changed' flag.
* src/xdisp.c (redisplay_internal): Call the hooks on
'window-size-change-functions' if the call to 'echo_area_display'
sets the frame's 'window_sizes_changed' flag.
(syms_of_xdisp) &lt;window-size-change-functions&gt;:
Update doc string to indicate the mini-window resizes trigger a
call to the hooks, and don't promise that will happen "before
redisplay".  (Bug#19576, Bug#21333)

* doc/lispref/windows.texi (Window Hooks): Update the description
of 'window-size-change-functions'.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve documentation of dynamic modules</title>
<updated>2015-11-21T10:49:57+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2015-11-21T10:49:57+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=3858b7949fdf5af8dd94cefc5a2684ad285e2cdf'/>
<id>3858b7949fdf5af8dd94cefc5a2684ad285e2cdf</id>
<content type='text'>
* src/fns.c (Frequire): Doc fix to include the dynamic module
support.
* src/lread.c (Fload, Vload_suffixes): Doc fixes to include the
dynamic module support.
(Fload): Treat the module suffix the same as '*.el' and '*.elc'
wrt the MUST-SUFFIX argument.

* etc/NEWS: Expand documentation of dynamically loaded modules.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/fns.c (Frequire): Doc fix to include the dynamic module
support.
* src/lread.c (Fload, Vload_suffixes): Doc fixes to include the
dynamic module support.
(Fload): Treat the module suffix the same as '*.el' and '*.elc'
wrt the MUST-SUFFIX argument.

* etc/NEWS: Expand documentation of dynamically loaded modules.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix double-decrement bug when freeing global refs</title>
<updated>2015-11-20T21:49:16+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2015-11-20T21:48:54+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=033811ceec6a2b1cb12c14cb932c0bf583e79020'/>
<id>033811ceec6a2b1cb12c14cb932c0bf583e79020</id>
<content type='text'>
* src/emacs-module.c (module_free_global_ref): Add a FIXME
comment about error reporting.  Fix a recently-introduced typo
that double-decremented the refcount.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/emacs-module.c (module_free_global_ref): Add a FIXME
comment about error reporting.  Fix a recently-introduced typo
that double-decremented the refcount.
</pre>
</div>
</content>
</entry>
<entry>
<title>Declare emacs_module_init in the module API</title>
<updated>2015-11-20T20:21:18+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2015-11-20T20:20:26+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=d0e07e0e2239771fd21b9525ea421cf7ba1cc97c'/>
<id>d0e07e0e2239771fd21b9525ea421cf7ba1cc97c</id>
<content type='text'>
* src/emacs-module.h (emacs_module_init): New decl.
Without it, GCC might complain about a module that defines
emacs_module_init without using it.  This also checks the
API better.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/emacs-module.h (emacs_module_init): New decl.
Without it, GCC might complain about a module that defines
emacs_module_init without using it.  This also checks the
API better.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix reindent-introduced typo in module code</title>
<updated>2015-11-20T20:15:53+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2015-11-20T20:15:22+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=95f69f2c5999be4b9444861b6d4ae1bd3ab87f83'/>
<id>95f69f2c5999be4b9444861b6d4ae1bd3ab87f83</id>
<content type='text'>
* src/emacs-module.c (MODULE_SETJMP_1): Fix typo that I
introduced while reindenting the code earlier, and add a
comment explaining the unusual use of do-while here.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/emacs-module.c (MODULE_SETJMP_1): Fix typo that I
introduced while reindenting the code earlier, and add a
comment explaining the unusual use of do-while here.
</pre>
</div>
</content>
</entry>
<entry>
<title>Module function arg counts are ptrdiff_t, not int</title>
<updated>2015-11-20T16:51:42+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2015-11-20T16:51:13+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=e61f1c3c8bd852ea8357047a408c8af56bc9918c'/>
<id>e61f1c3c8bd852ea8357047a408c8af56bc9918c</id>
<content type='text'>
* src/emacs-module.c (struct module_fun_env)
(module_make_function, module_funcall, Fmodule_call):
* src/emacs-module.h (struct emacs_runtime, struct emacs_env_25):
Use ptrdiff_t, not int, for arg counts.
* src/emacs-module.c (module_make_function): Don’t bother
checking arity against MOST_POSITIVE_FIXNUM, as that’s
unnecessary here.  Make the checking clearer by negating it.
(module_make_function, Fmodule_call): No need to use xzalloc
since the storage doesn’t need to be cleared.
(module_funcall): Don’t use VLA, since C11 doesn’t guarantee support
for it, and many implementations are buggy with large VLAs anyway.
Use SAFE_ALLOCA_LISP instead.
(module_vec_set): Don’t crash if i &lt; 0.
(module_vec_get): Don’t crash if i &lt; MOST_NEGATIVE_FIXNUM.
(module_vec_set, module_vec_get): Do fixnum checks only when
i is out of array bounds, for efficiency in the usual case.
(Fmodule_load): Simplify fixnum range check.
(Fmodule_call): Simplify arity check.  Use xnmalloc to detect
integer overflow in array allocation size.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/emacs-module.c (struct module_fun_env)
(module_make_function, module_funcall, Fmodule_call):
* src/emacs-module.h (struct emacs_runtime, struct emacs_env_25):
Use ptrdiff_t, not int, for arg counts.
* src/emacs-module.c (module_make_function): Don’t bother
checking arity against MOST_POSITIVE_FIXNUM, as that’s
unnecessary here.  Make the checking clearer by negating it.
(module_make_function, Fmodule_call): No need to use xzalloc
since the storage doesn’t need to be cleared.
(module_funcall): Don’t use VLA, since C11 doesn’t guarantee support
for it, and many implementations are buggy with large VLAs anyway.
Use SAFE_ALLOCA_LISP instead.
(module_vec_set): Don’t crash if i &lt; 0.
(module_vec_get): Don’t crash if i &lt; MOST_NEGATIVE_FIXNUM.
(module_vec_set, module_vec_get): Do fixnum checks only when
i is out of array bounds, for efficiency in the usual case.
(Fmodule_load): Simplify fixnum range check.
(Fmodule_call): Simplify arity check.  Use xnmalloc to detect
integer overflow in array allocation size.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve MS-Windows implementation in dynlib.c</title>
<updated>2015-11-20T11:34:15+00:00</updated>
<author>
<name>Eli Zaretskii</name>
</author>
<published>2015-11-20T11:34:15+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=24be1c8460895ccec8a84e53966b324e35cac6c9'/>
<id>24be1c8460895ccec8a84e53966b324e35cac6c9</id>
<content type='text'>
* src/dynlib.c [WINDOWSNT]: Include errno.h, lisp.h, and w32.h.
No need to include windows.h, as w32.h already does that.
&lt;dynlib_last_err&gt;: New static variable.
(dynlib_reset_last_error): New function.
(dynlib_open): Convert forward slashes to backslashes.  Convert
file names from UTF-8 to either UTF-16 or the current ANSI
codepage, and call either LoadLibraryW or LoadLibraryA.  If the
argument is NULL, return a handle to the main module, like
'dlopen' does.  Record the error, if any, for use by dynlib_error.
(dynlib_sym): Check the handle for validity. Record the error, if
any, for use by dynlib_error.
(dynlib_error): Call w32_strerror to produce the error string, and
zero out the last error code, like dlerror does.
(dynlib_close): Check the handle for validity.  Record the error,
if any, for use by dynlib_error.  Don't call FreeLibrary with a
handle for the main module.
* src/w32.c (globals_of_w32): Call dynlib_reset_last_error.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/dynlib.c [WINDOWSNT]: Include errno.h, lisp.h, and w32.h.
No need to include windows.h, as w32.h already does that.
&lt;dynlib_last_err&gt;: New static variable.
(dynlib_reset_last_error): New function.
(dynlib_open): Convert forward slashes to backslashes.  Convert
file names from UTF-8 to either UTF-16 or the current ANSI
codepage, and call either LoadLibraryW or LoadLibraryA.  If the
argument is NULL, return a handle to the main module, like
'dlopen' does.  Record the error, if any, for use by dynlib_error.
(dynlib_sym): Check the handle for validity. Record the error, if
any, for use by dynlib_error.
(dynlib_error): Call w32_strerror to produce the error string, and
zero out the last error code, like dlerror does.
(dynlib_close): Check the handle for validity.  Record the error,
if any, for use by dynlib_error.  Don't call FreeLibrary with a
handle for the main module.
* src/w32.c (globals_of_w32): Call dynlib_reset_last_error.
</pre>
</div>
</content>
</entry>
<entry>
<title>Include-file tweaks for modules</title>
<updated>2015-11-20T08:41:21+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2015-11-20T08:40:45+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=c69cec404cbc6b1570c42ca03e0cb42b410d7690'/>
<id>c69cec404cbc6b1570c42ca03e0cb42b410d7690</id>
<content type='text'>
* src/dynlib.c, src/emacs-module.c: Include &lt;config.h&gt; first.
* src/dynlib.h: Do not include config.h.
It’s every .c file’s responsibility to include config.h first.
* src/emacs-module.c: Include emacs-module.h immediately after
config.h, to test that emacs-module.h doesn’t depend on
include files other than config.h.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/dynlib.c, src/emacs-module.c: Include &lt;config.h&gt; first.
* src/dynlib.h: Do not include config.h.
It’s every .c file’s responsibility to include config.h first.
* src/emacs-module.c: Include emacs-module.h immediately after
config.h, to test that emacs-module.h doesn’t depend on
include files other than config.h.
</pre>
</div>
</content>
</entry>
</feed>
