- 27 Nov, 2020 12 commits
-
-
Philipp Stephani authored
We used to store module runtime and environment pointers in the static lists Vmodule_runtimes and Vmodule_environments. However, this is incorrect because these objects have to be kept per-thread. With this naive approach, interleaving module function calls in separate threads leads to environments being removed in the wrong order, which in turn can cause local module values to be incorrectly garbage-collected. The fix isn't completely trivial: specbinding the lists wouldn't work either, because then the garbage collector wouldn't find the environments in other threads than the current ones, again leading to objects being garbage-collected incorrectly. While introducing custom pseudovector types would fix this, it's simpler to put the runtime and environment pointers into the specbinding list as new specbinding kinds. This works since we need to unwind them anyway, and we only ever treat the lists as a stack. The thread switching machinery ensures that the specbinding lists are thread-local, and that all elements of the specbinding lists in all threads are marked during garbage collection. Module assertions now have to walk the specbinding list for the current thread, which is more correct since they now only find environments for the current thread. As a result, we can now remove the faulty Vmodule_runtimes and Vmodule_environments variables entirely. Also add a unit test that exemplifies the problem. It interleaves two module calls in two threads so that the first call ends while the second one is still active. Without this change, this test triggers an assertion failure. * src/lisp.h (enum specbind_tag): Add new tags for module runtimes and environments. * src/eval.c (record_unwind_protect_module): New function to record a module object in the specpdl list. (do_one_unbind): Unwind module objects. (backtrace_eval_unrewind, default_toplevel_binding, lexbound_p) (Fbacktrace__locals): Deal with new specbinding types. (mark_specpdl): Mark module environments as needed. * src/alloc.c (garbage_collect): Remove call to 'mark-modules'. Garbage collection of module values is now handled as part of marking the specpdl of each thread. * src/emacs-module.c (Fmodule_load, funcall_module): Use specpdl to record module runtimes and environments. (module_assert_runtime, module_assert_env, value_to_lisp): Walk through specpdl list instead of list variables. (mark_module_environment): Rename from 'mark_modules'. Don't attempt to walk though current thread's environments only, since that would miss other threads. (initialize_environment, finalize_environment): Don't change Vmodule_environments variable; environments are now in the specpdl list. (finalize_environment_unwind, finalize_runtime_unwind): Make 'extern' since do_one_unbind now calls them. (finalize_runtime_unwind): Don't change Vmodule_runtimes variable; runtimes are now in the specpdl list. (syms_of_module): Remove Vmodule_runtimes and Vmodule_environments. * test/data/emacs-module/mod-test.c (Fmod_test_funcall): New test function. (emacs_module_init): Bind it. * test/src/emacs-module-tests.el (emacs-module-tests--variable): New helper type to guard access to state in a thread-safe way. (emacs-module-tests--wait-for-variable) (emacs-module-tests--change-variable): New helper functions. (emacs-module-tests/interleaved-threads): New unit test.
-
Philipp Stephani authored
-
Stefan Monnier authored
-
Mattias Engdegård authored
When 'omake' is included in compilation-error-regexp-alist, which it still is by default, then all other rules are modified to match with an extra leading 6 spaces as well. The 'cucumber' pattern relied on this in order to work as intended. * lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Extend the 'cucumber' pattern so that it works even when 'omake' is not included. Move it below the 'gnu' rule so that it doesn't match anything else.
-
Mattias Engdegård authored
* etc/tutorials/TUTORIAL.de: * etc/tutorials/TUTORIAL.fr: Follow recent changes in TUTORIAL.
-
Stefan Monnier authored
-
Stefan Kangas authored
* etc/tutorials/TUTORIAL.es: A followup to recent changes in TUTORIAL.
-
Stefan Kangas authored
* etc/tutorials/TUTORIAL.sv: A followup to recent changes in TUTORIAL. Minor tweaks for grammar and style.
-
Juri Linkov authored
* lisp/international/mule-cmds.el (mule--ucs-names-affixation): Replace mule--ucs-names-annotation to display chars in prefixes that implements two FIXME items. (read-char-by-name): Let-bind completion-tab-width to 4. Use affixation-function instead of annotation-function. * lisp/minibuffer.el (completion-tab-width): New variable. (completion--insert-strings): Align colwidth to tab positions when completion-tab-width is non-nil. * lisp/simple.el (completion-setup-function): Set tab-width to completion-tab-width when completion-tab-width is non-nil. https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg01263.html
-
Juri Linkov authored
-
Eli Zaretskii authored
* etc/tutorials/TUTORIAL.he: A followup to recent changes in TUTORIAL.
-
Lars Ingebrigtsen authored
* lisp/server.el (server-start): Only delete the server directory if it's in /tmp (bug#44644).
-
- 26 Nov, 2020 7 commits
-
-
Dario Gjorgjevski authored
* lisp/cus-edit.el (custom-variable-modified-p): Quote the value when custom form is 'lisp (or 'mismatch) prior to comparing in order to accommodate `custom-variable-value-create' (bug#44852).
-
Mattias Engdegård authored
* etc/tutorials/TUTORIAL: Don't keep referring to EDIT as if it were a common name for the Meta key; since a few decades back it's labelled Alt (or Option or ⌥ but those keys usually also have 'alt' engraved on them). Similarly, CTL is practically extinct and not worth mentioning.
-
Mattias Engdegård authored
For certain patterns, re-matching the same regexp on the matched substring does not produce correctly translated match data (bug#15107 and bug#44861). Using a new builtin function also improves performance since the number of calls to string-match is halved. Reported by Kevin Ryde and Shigeru Fukaya. * lisp/subr.el (replace-regexp-in-string): Translate the match data using match-data--translate instead of trusting a call to string-match on the matched string to do the job. * test/lisp/subr-tests.el (subr-replace-regexp-in-string): Add test cases. * src/search.c (Fmatch_data__translate): New internal function. (syms_of_search): Register it as a subroutine.
-
Lars Ingebrigtsen authored
* lisp/emacs-lisp/eldoc.el (eldoc-display-in-echo-area): Use 'save-excursion' to keep point position in *eldoc* buffer. Suggested by Andrii Kolomoiets <andreyk.mad@gmail.com>.
-
Lars Ingebrigtsen authored
* doc/lispref/compile.texi (Compilation Functions): Document it. * lisp/emacs-lisp/bytecomp.el (byte-recompile-directory): Allow following symlinks (bug#10292).
-
Stefan Kangas authored
-
Stefan Kangas authored
-
- 25 Nov, 2020 16 commits
-
-
Eric Abrahamsen authored
* lisp/gnus/gnus-search.el (gnus-search-imap-handle-flag): This allows "mark:A" to be translated into "ANSWERED" and "-mark:A" to be translated into "UNANSWERED".
-
Eric Abrahamsen authored
This behavior both better matches the previous nnir behavior, reducing confusion for new users, and matches behavior when using parsed queries. * lisp/gnus/gnus-search.el (gnus-search-imap-search-keys): Make sure this variable contains all known IMAP search keys. (gnus-search-run-search): If the search query doesn't start with a known search key, prepend "TEXT " to the query.
-
Michael Albinus authored
* lisp/filesets.el (filesets-select-command): * lisp/shell.el (shell-mode): * lisp/term.el (term-exec-1): * lisp/wdired.el (wdired-do-symlink-changes): * lisp/cedet/ede/pmake.el (ede-proj-makefile-create): * lisp/eshell/esh-io.el (eshell-set-output-handle): * lisp/gnus/gnus-fun.el (gnus-grab-cam-x-face): * lisp/gnus/mml2015.el (mml2015-epg-key-image): * lisp/gnus/smime.el (smime-noverify-region): * lisp/org/ob-picolisp.el (org-babel-execute:picolisp): * lisp/org/ob-screen.el (org-babel-prep-session:screen) (org-babel-prep-session:screen): * lisp/play/fortune.el (fortune-quiet-strfile-options): * lisp/progmodes/cperl-mode.el (cperl-pod2man-build-command): * lisp/progmodes/sh-script.el (sh-tmp-file): * lisp/vc/diff-mode.el (diff-add-log-current-defuns) (diff--font-lock-prettify): * lisp/vc/ediff-mult.el (ediff-patch-file-form-meta): * lisp/vc/ediff-ptch.el (ediff-map-patch-buffer) (ediff-fixup-patch-map, ediff-dispatch-file-patching-job): * lisp/vc/vc.el (vc-diff-internal): Use null-device or (null-device), respectively. (Bug#3736)
-
Juri Linkov authored
* lisp/minibuffer.el (completion--insert-strings): Support 'one-column'. * lisp/simple.el (read-from-kill-ring): Truncate strings at frame-width.
-
Stefan Monnier authored
* src/eval.c (lexbound_p): New function. (Finternal__define_uninitialized_variable): Use it.
-
Mattias Engdegård authored
* test/lisp/subr-tests.el (subr-replace-regexp-in-string): New.
-
Mattias Engdegård authored
-
Michael Albinus authored
Use `tramp--test-windows-nt-p'.
-
Michael Albinus authored
6442cdc0 Revert extra focus redirection in do_switch_frame (Bug#24803) fc4379f1 Minor cleanup of tramp-tests.el on MS Windows dea3d6aa Fix handling of defcustom :local tag
-
Michael Albinus authored
The following commit was skipped: b2ee6650 CC Mode. Fix an off by one error. Fixes bug #41809
-
Michael Albinus authored
f425a774 Fix display artifacts when 'display' properties cover newl...
-
Martin Rudalics authored
* src/frame.c (do_switch_frame): Do not also redirect frame focus when FRAME has its minibuffer window on the selected frame which was intended to fix Bug#24500. It may cause Bug#24803 and lead to a nasty state where no active cursor is shown on any frame, see https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg01137.html.
-
Juri Linkov authored
* doc/lispref/minibuf.texi (Completion Variables) (Programmed Completion): Add affixation-function. * lisp/help-fns.el (help--symbol-completion-table-affixation): New function. (help--symbol-completion-table): Set affixation-function when completions-detailed is non-nil. * lisp/minibuffer.el (completion-metadata): Add affixation-function to docstring. (completions-annotations): Inherit from shadow with italic. (completions-detailed): New defcustom. (completion--insert-strings): Count string-width on all strings in completion list. Insert prefix and suffix. (completion-extra-properties): Add affixation-function to docstring. (minibuffer-completion-help): Call affixation-function. (minibuffer-default-prompt-format): Move down closer to its use. https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00613.html
-
Michael Albinus authored
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process): Do not test remote pty on MS Windows.
-
Lars Ingebrigtsen authored
* lisp/face-remap.el (text-scale--refresh): Move code to avoid compilation warning. In text-scale--refresh: face-remap.el:241:14: Warning: reference to free variable ‘text-scale-mode’
-
Stefan Kangas authored
* lisp/face-remap.el (text-scale-remap-header-line-face): New buffer local variable. (text-scale-mode): Adjust header line if above variable is non-nil. (face-remap--clear-remappings, face-remap--remap-face): New defuns. * lisp/face-remap.el: Arrange to watch text-scale-mode-remapping. (text-scale--refresh): New function. * lisp/emacs-lisp/tabulated-list.el (tabulated-list-mode): Use text-scale-remap-header-line. (Bug#41852)
-
- 24 Nov, 2020 5 commits
-
-
Juri Linkov authored
* doc/emacs/killing.texi (Earlier Kills): Document standalone M-y. * doc/emacs/search.texi (Isearch Yank): Explain standalone M-y. * doc/lispref/text.texi (Yank Commands): Soften the wording of yank after another yank. * lisp/delsel.el: Put 'yank' property on yank-pop and yank-from-kill-ring. * lisp/isearch.el (isearch-yank-pop): Use with-isearch-suspended and read-from-kill-ring to read a string from the kill-ring and append it to the search string. * lisp/simple.el (yank-pop): Call yank-from-kill-ring and read-from-kill-ring when last-command is not 'yank' instead of signaling an error. Remove "*" from interactive spec. Update docstring. (read-from-kill-ring): New function. (yank-from-kill-ring): New command. https://lists.gnu.org/archive/html/emacs-devel/2020-11/msg00801.html
-
Stefan Kangas authored
-
Philipp Stephani authored
* test/lisp/emacs-lisp/ert-tests.el (ert-test-with-demoted-errors): New (broken) unit test.
-
Stefan Kangas authored
-
Stefan Kangas authored
* lisp/progmodes/idlw-help.el (idlwave-do-context-help) (idlwave-help-show-help-frame): Remove XEmacs compat code.
-