- 21 Nov, 2015 4 commits
-
-
Eli Zaretskii authored
-
Eli Zaretskii authored
* 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) <window-size-change-functions>: 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'.
-
Eli Zaretskii authored
* 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.
-
Philipp Stephani authored
* etc/NEWS: Mention the new support for dynamically loaded modules. Copyright-paperwork-exempt: yes
-
- 20 Nov, 2015 17 commits
-
-
Dmitry Gutov authored
* lisp/progmodes/xref.el (xref-backend-functions): Move the default value into a separate `add-hook' call (bug#21964). * lisp/progmodes/elisp-mode.el (emacs-lisp-mode): Don't declare the xref-backend-functions variable. It doesn't make any difference.
-
Paul Eggert authored
* 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.
-
Paul Eggert authored
* 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.
-
Paul Eggert authored
* modules/mod-test/mod-test.c (Fmod_test_return_t) (Fmod_test_sum, Fmod_test_signal, Fmod_test_throw) (Fmod_test_non_local_exit_funcall, Fmod_test_globref_make) (Fmod_test_string_a_to_b, Fmod_test_userptr_make) (Fmod_test_userptr_get, Fmod_test_vector_fill) (Fmod_test_vector_eq): Arg counts are ptrdiff_t, not int. (finalizer): Remove; no longer used.
-
Paul Eggert authored
* 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.
-
Anders Lindgren authored
If a function on the hook `window-size-change-functions' doesn't restore the current buffer, functions that save and restore the current window configuration (like `y-or-no-p') could silently change the current buffer. When `write-file' asked the user confirmation to overwrite a file, `y-or-no-p' changed the current buffer, and the wrong buffer was saved to the file. * lisp/follow.el (follow-windows-start-end): Call `select-frame' using the `norecord' parameter. (follow-window-size-change): Restore current buffer. Call `select-frame' using the `norecord' parameter. Cleanup.
-
John Wiegley authored
-
Stephen Leake authored
-
Paul Eggert authored
* 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 < 0. (module_vec_get): Don’t crash if i < 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.
-
Eli Zaretskii authored
* modules/mod-test/mod-test.c: Include stdlib.h, to avoid warnings about missing prototype of malloc. * modules/mod-test/Makefile (CFLAGS): Add -std=gnu99, to avoid compiler warnings.
-
Eli Zaretskii authored
* src/dynlib.c [WINDOWSNT]: Include errno.h, lisp.h, and w32.h. No need to include windows.h, as w32.h already does that. <dynlib_last_err>: 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.
-
Eli Zaretskii authored
* etc/PROBLEMS: Mention that the issue was fixed in later Windows 10 builds.
-
Paul Eggert authored
* src/dynlib.c, src/emacs-module.c: Include <config.h> 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.
-
Paul Eggert authored
* src/lisp.h (PUSH_HANDLER): Remove. All callers changed to use push_handler directly. * src/eval.c (internal_condition_case) (internal_condition_case_1, internal_condition_case_2) (internal_condition_case_n): Use same pattern as for other invokers of push_handler. (push_handler, push_handler_nosignal): Use call-by-value instead of call-by-reference. All uses changed. (push_handler): Simplify by rewriting in terms of push_handler_nosignal. (push_handler_nosignal): Profile any newly allocated memory.
-
Paul Eggert authored
-
Juanma Barranquero authored
* lisp/version.el (emacs-repository--version-git-1): Do not assume HEAD is at .git/HEAD, it can also be at .git/worktrees/<branch>/HEAD. (emacs-repository-get-version): Grok linked worktrees when EXTERNAL is nil too.
-
Juri Linkov authored
(occur-1, occur-engine): Use it. * lisp/isearch.el (isearch-occur): Propertize regexp with isearch-string and isearch-regexp-function-descr for occur-regexp-descr to display the correct description message in the header (bug#21176, bug#21180).
-
- 19 Nov, 2015 17 commits
-
-
Karl Fogel authored
* lisp/simple.el (open-line): Remove electric indent code. (electric-indent-just-newline): Don't declare. * test/automated/simple-test.el (open-line-indent): Adjust test. This partly reverts Artur Malabarba's change that added electric indent sensitivity to `open-line' (Oct 24 22:26:27 2015 +0100, git commit bd4f04f8), and adjusts a new test he added right afterwards (Sat Oct 24 23:43:06 2015 +0100, git commit 207f235e) accordingly. However, the new INTERACTIVE argument to `open-line', which he also added in the first commit, is not reverted here. See the thread "Questioning the new behavior of `open-line'." on the Emacs Devel mailing list, and in particular this message: From: Artur Malabarba Subject: Re: Questioning the new behavior of `open-line'. To: Karl Fogel Cc: David Kastrup, Pierpaolo Bernardi, emacs-devel Date: Wed, 18 Nov 2015 21:03:58 +0000 Message-ID: \ <CAAdUY-KN06pvCMy5bt3+Buk3yeKjf6n9iB2FaSTTOPpCqPwyhA@mail.gmail.com> https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01707.html
-
Paul Eggert authored
* src/emacs-module.c (Fmodule_load): Simplify and avoid unnecessary initialization of priv member to 0. * src/emacs-module.c: (module_vec_set, module_vec_get, module_vec_size)
-
Paul Eggert authored
Generally speaking, at the C level the Emacs source code prefers signed types like ‘ptrdiff_t’ to unsigned types like ‘size_t’, partly to avoid the usual signedness confusion when comparing values. Change the module API to follow this convention. Use ‘int’ for small values that can’t exceed INT_MAX. * modules/mod-test/mod-test.c (Fmod_test_globref_make) (Fmod_test_string_a_to_b, Fmod_test_vector_fill) (Fmod_test_vector_eq): * src/emacs-module.c (struct emacs_value_frame) (module_make_global_ref, module_free_global_ref) (module_copy_string_contents, module_make_string) (module_vec_set, module_vec_get, module_vec_size): * src/emacs-module.h (struct emacs_runtime, struct emacs_env_25): * src/lread.c (suffix_p): Prefer signed to unsigned integer types.
-
Paul Eggert authored
Remove ‘const’ qualifier from locals that were newly added. We don’t normally bother declaring locals with ‘const’ even though they are not modified, for the same reason we don’t bother declaring them with ‘register’ even though their addresses are not taken; the advantage in compile-time checking isn’t worth the loss of readability. * modules/mod-test/mod-test.c (Fmod_test_non_local_exit_funcall) (Fmod_test_vector_fill, Fmod_test_vector_eq): * src/emacs-module.c (MODULE_SETJMP_1) (module_make_global_ref, module_free_global_ref) (module_non_local_exit_get, module_make_function) (module_extract_integer, module_extract_float) (module_get_user_ptr, module_set_user_ptr) (module_get_user_finalizer, module_set_user_finalizer) (module_vec_get, Fmodule_call) (module_non_local_exit_signal_1) (module_non_local_exit_throw_1, lisp_to_value) (finalize_storage, allocate_emacs_value, mark_modules) (module_handle_signal, module_handle_throw) (module_format_fun_env): * src/eval.c (push_handler, push_handler_nosignal) (init_handler): * src/lread.c (suffix_p): Omit unnecessary ‘const’.
-
Paul Eggert authored
* modules/mod-test/mod-test.c (sum, Fmod_test_sum): * src/emacs-module.c (module_extract_integer) (module_make_integer): * src/emacs-module.h (struct emacs_env_25): Prefer intmax_t to int64_t. This doesn’t change the generated code on any of the machines Emacs currently ports to, but it’s at least in theory more future-proof as C99 doesn’t guarantee that int64_t exists.
-
Paul Eggert authored
* src/emacs-module.c: Rename from src/module.c. * src/emacs-module.h: Rename from src/module.h. All uses changed.
-
Paul Eggert authored
* src/dynlib.c (dynlib_close): #ifdef out for now, as it’s not used. * src/eval.c, src/lisp.h (lisp_eval_depth): Now static. * src/module.c (Fmodule_load): Fix pointer signedness bug. (Fmodule_call): Tell GCC that the default case is unreachable.
-
Paul Eggert authored
This is mostly indenting and spacing changes. Also, remove some unnecessary static decls instead of bothering to reindent them. * src/module.h (EMACS_EXTERN_C_BEGIN): Remove, and do this inline, as most other Emacs files do for this sort of thing.
-
Eli Zaretskii authored
* modules/mod-test/Makefile (EMACS, SO): New variables. (CFLAGS): When SO = dll, don't use -fPIC. (check): New target, runs the test.
-
Eli Zaretskii authored
-
Paul Eggert authored
* .gitignore: Add former contents of modules/.gitignore. * modules/.gitignore: Remove.
-
Paul Eggert authored
Put them in the usual format for GNU Emacs copyright notices.
-
Paul Eggert authored
* src/module.h: Rename from src/emacs_module.h. All uses changed.
-
Juanma Barranquero authored
-
Juanma Barranquero authored
-
Alan Mackenzie authored
-
Dmitry Gutov authored
* lisp/vc/vc.el (vc-deduce-fileset): Prioritize looking inside vc-parent-buffer over log-view-mode fallback (bug#21955).
-
- 18 Nov, 2015 2 commits
-
-
Ken Brown authored
-
Eli Zaretskii authored
* src/module.c: Reformat copyright commentary. (module_vec_get): Use explicit cast to size_t to avoid compiler warning in 32-bit builds. (check_main_thread) [WINDOWSNT]: Fix letter-case in Windows APIs. Compare thread IDs directly, as GetThreadId is not available before Windows Vista. (check_main_thread) [WINDOWSNT]: Duplicate the thread handle without using APIs and constants not available on XP and older systems. Obtain and store the thread ID as well.
-