aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Don't retry reading after receiving EINVALPip Cet2020-09-141-1/+3
| | | | | * src/process.c (wait_reading_process_output): Don't retry reading from an fd after an unknown error (bug#6074).
* Fix builds without modulesGlenn Morris2020-09-132-0/+4
| | | | | * src/data.c (Finteractive_form): * src/eval.c (Fcommandp): Fix builds without modules.
* Add facility to make module functions interactive (Bug#23486).Philipp Stephani2020-09-135-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/module-env-28.h: Add field for 'make_interactive' function. * src/emacs-module.c (Lisp_Module_Function): Add new field holding the interactive form. (allocate_module_function): Adapt to structure layout change. (module_make_interactive, module_function_interactive_form): New functions. (initialize_environment): Use them. * src/eval.c (Fcommandp): * src/data.c (Finteractive_form): Also handle interactive module functions. * test/data/emacs-module/mod-test.c (Fmod_test_identity): New test function. (emacs_module_init): Create two interactive module test functions. * test/src/emacs-module-tests.el (module/interactive/return-t) (module/interactive/return-t-int, module/interactive/identity): New unit tests. * doc/lispref/internals.texi (Module Functions): Document new function. Rework paragraph about wrapping module functions, as the example no longer applies. * etc/NEWS: Document new facility.
* Improve frame-title-format and icon-title-formatStefan Kangas2020-09-131-2/+1
| | | | | | * src/xdisp.c (syms_of_xdisp): Replace 'invocation-name' with the text "%b - GNU Emacs" and replace "@" with " at ". (Bug#41147) * etc/NEWS: Announce the above change.
* Doc string clarification in file-directory-pLars Ingebrigtsen2020-09-131-0/+5
| | | | | * src/fileio.c (Ffile_directory_p): Mention that "" is a special case (bug#43375).
* Fix toggle-frame-fullscreen on w32 buildsMartin Rudalics2020-09-121-3/+3
| | | | | | * src/w32term.c (w32_read_socket): Set 'fullscreen' to 'maximized' if Windows sends SIZE_MAXIMIZED and either the top or the left of the frame is outside the screen. (Bug#25542)
* Avoid unneeded recentering when header-line is usedEli Zaretskii2020-09-121-4/+5
| | | | | | * src/xdisp.c (try_window): Account for header-line height only in the scroll-margin at the window's top, but not at its bottom. (Bug#42653)
* Implement D-Bus properties with compound type.Michael Albinus2020-09-101-4/+5
| | | | | | | | | | | | | * lisp/net/dbus.el (dbus-set-property): Fix thinko. (dbus-register-property, dbus-property-handler): Support compound properties. * src/dbusbind.c (dbus-registered-objects-table): Fix docstring. * test/lisp/net/dbus-tests.el (dbus--test-interface): Make it different to `dbus--test-service'. (dbus-test05-register-property) (dbus-test05-register-property-several-paths): Adapt tests.
* Merge from origin/emacs-27Glenn Morris2020-09-091-10/+14
|\ | | | | | | | | | | 366a97c980 (origin/emacs-27) Avoid crashes when trying to load bad GI... 7938713105 C++ Mode: handle comma separated brace initializers. 2b95300cf8 * lisp/display-fill-column-indicator.el: Fix bug#41145
| * Avoid crashes when trying to load bad GIF filesEli Zaretskii2020-09-081-10/+14
| | | | | | | | | | * src/image.c (gif_load): Handle the case when GifErrorString returns NULL. (Bug#43281)
| * Fix replace-region-contents performance bugPaul Eggert2020-08-251-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Backport from master. * src/editfns.c (rbc_quitcounter): Remove; the quitcounter is now part of the context. (EXTRA_CONTEXT_FIELDS): Remove unused member early_abort_tests. Add jmp, quitcounter. (Freplace_buffer_contents): Use setjmp/longjmp to recover from a compareseq that runs too long. Omit unnecessary rarely_quit call. (buffer_chars_equal): Occasionally check for early abort and longjmp out if so (Bug#43016).
* | Fix crash from clicking on menu bar (bug#34762, bug#26982)Win Treese2020-09-081-6/+0
| | | | | | | | | | * src/nsmenu.m (ns_update_menubar): Remove extraneous use of autorelease pool.
* | Implement typed D-Bus properties (Bug#43252)Michael Albinus2020-09-081-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/dbus.texi (Properties and Annotations) (Receiving Method Call): Document optional type symbol in `dbus-set-property' and `dbus-register-property'. * lisp/net/dbus.el (dbus-error-unknown-interface) (dbus-error-unknown-method, dbus-error-unknown-object) (dbus-error-unknown-property): New defconsts. (dbus-peer-handler): Improve error handling. (dbus-introspect-get-signature): Handle also properties. (dbus-set-property, dbus-register-property): Allow optional TYPE symbol for VALUE. (Bug#43252) (dbus-property-handler): Implement property types. Improve error handling. * src/dbusbind.c (dbus-message-internal, dbus-registered-objects-table): Fix docstring. * test/lisp/net/dbus-tests.el (dbus-test05-register-property): Extend test. (dbus-test05-register-property-several-paths): New test.
* | More work on D-Bus error messagesMichael Albinus2020-09-061-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/net/dbus.el (dbus-get-property): Adapt docstring. (dbus-set-property): Handle case of `:write' access type. (dbus-get-other-registered-properties): Rename from `dbus-get-other-registered-property'. (dbus-property-handler): Fix thinkos. * src/dbusbind.c (xd_read_message_1): Add error_name to event args in case of DBUS_MESSAGE_TYPE_ERROR. * test/lisp/net/dbus-tests.el (dbus--test-enabled-session-bus) (dbus--test-enabled-system-bus): Make them defconst. (dbus--test-service, dbus--test-path, dbus--test-interface): New defconst. Replace all occurences of `dbus-service-emacs' by `dbus--test-service'. (dbus--test-method-handler): New defun. (dbus-test04-register-method, dbus-test05-register-property): New tests.
* | Reinstall recent GC-related changesPaul Eggert2020-09-055-144/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The report that they broke macOS was a false alarm, as the previous commit was also broken (Bug#43152#62). * src/alloc.c (live_string_holding, live_cons_holding) (live_symbol_holding): Count only pointers that point to a struct component, or are a tagged pointer to the start of the struct. Exception: for non-bool-vector pseudovectors, count any pointer past the header, since it’s too much of a pain to write code for every pseudovector. (live_float_holding, live_vector_pointer): New functions, which are similar about counting pointers. (live_float_p, live_large_vector_holding) (live_small_vector_pointer, mark_maybe_pointer): Use them. (mark_maybe_object, mark_maybe_objects): Remove, and remove all callers; mark_maybe_pointer now suffices. (mark_objects): New function. * src/alloc.c (mark_vectorlike, mark_face_cache): * src/eval.c (mark_specpdl): * src/fringe.c (mark_fringe_data): * src/keyboard.c (mark_kboards): Simplify by using mark_objects. * src/lisp.h (SAFE_ALLOCA_LISP_EXTRA): Clear any Lisp_Object arrays large enough to not fit into the stack, so that GC need not worry about whether they contain objects.
* | Extend dbus.el by error messages, and :write access typeMichael Albinus2020-09-041-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/misc/dbus.texi (Receiving Method Calls): Describe how to produce D-Bus error messages. (Receiving Method Calls): Support :write access type. * lisp/net/dbus.el (dbus-error-dbus, dbus-error-failed) (dbus-error-access-denied, dbus-error-invalid-args) (dbus-error-property-read-only): New defconsts. (dbus-method-error-internal): Add arg ERROR-NAME. (dbus-register-method): Adapt docstring. (dbus-handle-event): Handle error messages returned from the handler. (dbus-get-this-registered-property) (dbus-get-other-registered-property): New defuns. (dbus-register-property): Support :write access type. (dbus-property-handler): Submit proper D-Bus error messages. Handle several paths at the same interface. * src/dbusbind.c (Fdbus_message_internal): Improve handling of DBUS_MESSAGE_TYPE_ERROR.
* | * src/image.c (svg_load_image): Use xmalloc and xfree. (bug#43135)Alan Third2020-09-031-3/+3
| |
* | Revert recent GC-related changes (Bug#43152)Paul Eggert2020-09-035-129/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (live_string_holding, live_cons_holding) (live_symbol_holding, live_large_vector_holding) (live_small_vector_holding): Go back to old approach of treating every would-be pointer to any byte in the object (though not to just past the object end) as addressing the object. (live_float_p): Require that the would-be float point to the start of the Lisp_Float, and not anywhere else. (live_vector_pointer, live_float_holding, mark_objects): Remove. All uses removed. (mark_maybe_object, mark_maybe_objects): Bring back these functions. * src/lisp.h (SAFE_ALLOCA_LISP_EXTRA): Do not clear the new slots, as they're now checked via mark_maybe_objects, not via mark_objects.
* | Fix 'expand-file-name' for remote filesEli Zaretskii2020-09-031-56/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts most of commit 14fb657ba82da346d36f05f88da26f1c5498b798 and its followup fixes, and instead fixes the original bugs in a different manner that doesn't affect any unrelated use cases. As part of this, the code which caused 'expand-file-name' to enforce a trailing slash on expanded directories is removed, as this kind of semantic processing is outside of 'expand-file-name's scope. * src/fileio.c (Fexpand_file_name): If expanding default_directory yields a remote file name, call its handlers. (Bug#26911) (Bug#34834) * doc/lispref/files.texi (File Name Expansion): Remove the requirement that expanding a directory name yields a directory name, i.e. that the expansion must end in a slash. * etc/NEWS: Remove the announcement of the changed behavior of 'expand-file-name' wrt trailing slashes. * test/src/fileio-tests.el (fileio-tests--HOME-trailing-slash) (fileio-tests--expand-file-name-trailing-slash): Remove tests. * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name): No need to expect different results in Emacs 28 and later.
* | Fix vertical cursor motion when 'visual-line-mode' is in effectEli Zaretskii2020-09-031-1/+1
| | | | | | | | | | | | * src/xdisp.c (move_it_in_display_line_to): Fix a logic error made as part of introducing the 'word-wrap-by-category' feature; that error brought back bug#8155.
* | * src/alloc.c (live_symbol_holding): Pacify gcc -Wlogical-op.Paul Eggert2020-08-311-2/+2
| |
* | * src/lisp.h (lisp_h_XPL, XPL): Remove; unused.Paul Eggert2020-08-311-11/+0
| |
* | Use mark_objects elsewhere tooPaul Eggert2020-08-314-19/+8
| | | | | | | | | | | | | | | | * src/alloc.c (mark_vectorlike, mark_face_cache): * src/eval.c (mark_specpdl): * src/fringe.c (mark_fringe_data): * src/keyboard.c (mark_kboards): Use mark_objects instead of doing it by hand.
* | Remove mark_maybe_objectPaul Eggert2020-08-313-94/+20
| | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (mark_maybe_object, mark_maybe_objects): Remove. (mark_objects): New function. * src/eval.c (mark_specpdl): Use mark_objects instead of mark_maybe_objects, since the array now has only valid Lisp objects. * src/lisp.h (SAFE_ALLOCA_LISP_EXTRA): When allocating a large array, clear it so that it contains only valid Lisp objects. This is simpler and safer, and does not hurt performance significantly on my usual benchmark as the code is executed so rarely.
* | Avoid some false matches in mark_maybe_pointerPaul Eggert2020-08-311-14/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This lets Emacs avoid marking some garbage as if it were in use. On one test platform (RHEL 7.8, Intel Xeon Silver 4116) it sped up ‘cd lisp; make compile-always’ by a bit over 1%. * src/alloc.c (live_string_holding, live_cons_holding) (live_symbol_holding, live_large_vector_holding) (live_small_vector_holding): Count only pointers that point to a struct component, or are a tagged pointer to the start of the struct. Exception: for non-bool-vector pseudovectors, count any pointer past the header, since it’s too much of a pain to write code for every pseudovector. (live_vector_pointer): New function.
* | Omit no-longer-needed stack mark_maybe_objectPaul Eggert2020-08-311-5/+0
| | | | | | | | | | | | * src/alloc.c (mark_memory): Do not bother using mark_maybe_object on the stack, since mark_maybe_pointer now marks everything that mark_maybe_object would.
* | Fix GC bug with Lisp floats and --with-wide-intPaul Eggert2020-08-311-12/+31
| | | | | | | | | | | | | | | | | | | | On --with-wide-int platforms where Lisp_Object can be put into non-adjacent registers, mark_maybe_pointer failed to mark a float whose only reference was as a tagged pointer. * src/alloc.c (live_float_holding): New function, a generalization of the old live_float_p. (live_float_p): Use it. (mark_maybe_pointer): Use live_float_holding, not live_float_p.
* | Revert recent expand-file-name changes if DOS_NTPaul Eggert2020-08-281-9/+57
| | | | | | | | | | | | * src/fileio.c (Fexpand_file_name): Restore pre-August-26 behavior, if DOS_NT. This should fix the recently-introduced expand-file-name bugs on DOS_NT (Bug#26911).
* | * src/fileio.c (Fexpand_file_name): Omit unnecessary assignment.Paul Eggert2020-08-281-1/+0
| |
* | Fix recently-introduced expand-file-name bugPaul Eggert2020-08-271-25/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The bug was that (expand-file-name "~") returned something like "/home/eggert/" instead of "/home/eggert". Problem reported by Mattias Engdegård (Bug#26911#27). * src/fileio.c (Fexpand_file_name): When concatenating NEWDIR to NM, instead of stripping trailing slashes from NEWDIR (which can turn non-symlinks into symlinks), strip leading slashes from NM. This also simplifies the code by removing no-longer-needed DOS_NT special-casing. Also, remove an unnecessary ‘target[length] = 0;’ as that byte will be overwritten by the next memcpy anyway. * test/src/fileio-tests.el (fileio-tests--HOME-trailing-slash): New test.
* | Fix expand-file-name symlink-to-dir bugPaul Eggert2020-08-261-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem reported by Yegor Timoshenko (Bug#26911), and I ran into it myself recently in normal-top-level. * doc/lispref/files.texi (File Name Expansion), etc/NEWS: Mention this. * src/fileio.c (Fexpand_file_name): Expand "/a/b/." to "/a/b/" not "/a/b", to avoid misinterpreting a symlink "/a/b". Similarly, expand "/a/b/c/.." to "/a/b/" not "/a/b". * test/lisp/net/tramp-tests.el (tramp-test05-expand-file-name): Adjust to match new behavior. (tramp-test05-expand-file-name-relative): This test now succeeds, at least on Fedora 31. * test/src/fileio-tests.el: (fileio-tests--expand-file-name-trailing-slash) New test.
* | regex-emacs: copy less when reallocatingPaul Eggert2020-08-261-1/+1
| | | | | | | | | | * src/regex-emacs.c (GROW_FAIL_STACK): Copy just the occupied stack slots, as the rest are garbage.
* | regex-emacs: fix leak on memory allocation failurePaul Eggert2020-08-261-1/+5
| | | | | | | | | | | | * src/regex-emacs.c (ENSURE_FAIL_STACK): If the failure stack cannot be grown, free locally-allocated storage before returning.
* | regex-emacs: subscript-check register numbersPaul Eggert2020-08-261-1/+6
| | | | | | | | | | * src/regex-emacs.c (PUSH_FAILURE_REG, POP_FAILURE_REG_OR_COUNT) (re_match_2_internal): Add some easserts for subscript checking.
* | regex-emacs: omit regstart tests and regend setPaul Eggert2020-08-261-3/+9
| | | | | | | | | | | | | | | | * src/regex-emacs.c (PUSH_FAILURE_REG, POP_FAILURE_REG_OR_COUNT) (re_match_2_internal): Add some assertions that regstart is set whenever regend is. (re_match_2_internal): Omit two unnecessary REG_UNSET (regstart ...)s and one unnecessary assignment to regend.
* | regex-emacs omit allocation of 3 slotsPaul Eggert2020-08-261-13/+13
| | | | | | | | | | | | * src/regex-emacs.c (re_match_2_internal): Avoid unnecessary allocation of REGEND[0], BEST_REGSTART[0], BEST_REGEND[0].
* | regex-emacs omit POS runtime checkPaul Eggert2020-08-261-8/+4
| | | | | | | | | | * src/regex-emacs.c (re_match_2_internal): Replace unnecessary runtime check of POS with some eassumes.
* | Omit "V" at the start of DEFVAR_BOOL varsPaul Eggert2020-08-255-20/+20
| | | | | | | | | | | | | | | | | | | | | | Problem noted by Stefan Monnier in: https://lists.gnu.org/r/emacs-devel/2020-08/msg00846.html * src/font.c (xft_ignore_color_fonts): * src/syntax.c (comment_end_can_be_escaped): * src/xdisp.c (word_wrap_by_category, display_fill_column_indicator): Rename these DEFVAR_BOOL variables to avoid the initial "V" that wrongly suggests that they are Lisp_Object variables. All uses changed.
* | Merge from origin/emacs-27Michael Albinus2020-08-251-3/+3
|\ \ | |/ | | | | | | | | | | | | | | | | 44104a607a Fix error in GMP test e26e63444d Add Feature testing for Windows binaries 4e2caef384 ; * src/character.c (str_as_multibyte): Fix the commentary. d3a4ce8420 Revert "; * etc/NEWS: Remove temporary note on documentati... 16f00e36dc * admin/admin.el (set-version): Trap yet another NEWS error. 121be3e118 ; * etc/NEWS: Remove temporary note on documentation. (Bu... 5fcb97dabd Fix cond jump table compilation (bug#42919)
| * ; * src/character.c (str_as_multibyte): Fix the commentary.Eli Zaretskii2020-08-211-3/+3
| |
* | Make shadowing warning in describe_map less confusingLars Ingebrigtsen2020-08-251-1/+1
| | | | | | | | | | | | * src/keymap.c (describe_map): A binding may be shadowed by something else than a mode (bug#14086) (just a `define-key' works), so don't say that it's a mode that shadows it.
* | replace-buffer-contents cleanupsPaul Eggert2020-08-241-44/+46
| | | | | | | | | | | | | | | | | | * src/editfns.c (NOTE_DELETE, NOTE_INSERT): Avoid unnecessary parens. (Freplace_buffer_contents): Check args before returning results. Avoid integer overflow when computing too_expensive, and work even if MAX-COSTS is bignum. Call alloca and/or malloc just once, not three times. (set_bit, bit_is_set): Simplify micro-optimization by using eassume.
* | Fix replace-region-contents performance bugPaul Eggert2020-08-241-16/+15
| | | | | | | | | | | | | | | | | | | | | | | | * src/editfns.c (rbc_quitcounter): Remove; the quitcounter is now part of the context. (EXTRA_CONTEXT_FIELDS): Remove unused member early_abort_tests. Add jmp, quitcounter. (Freplace_buffer_contents): Use setjmp/longjmp to recover from a compareseq that runs too long. Omit unnecessary rarely_quit call. (buffer_chars_equal): Occasionally check for early abort and longjmp out if so (Bug#43016).
* | Have gnutls_symmetric cache the results from Fgnutls_ciphersLars Ingebrigtsen2020-08-241-1/+8
| | | | | | | | | | | | * src/gnutls.c (gnutls_symmetric): Cache the results from Fgnutls_ciphers, since that function isn't very fast (bug#42998). (syms_of_gnutls): Initialize cache variable.
* | Simplify by using Gnulib sigdescr_np modulePaul Eggert2020-08-231-159/+2
| | | | | | | | | | | | | | | | | | | | | | Inspired by a straightforward patch by Bruno Haible. * admin/merge-gnulib (GNULIB_MODULES): Add sigdescr_np. * configure.ac: Do not check for sys_siglist or __sys_siglist. * lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate. * lib/sigdescr_np.c, m4/sigdescr_np.m4: New files, copied from Gnulib. * src/sysdep.c (sys_siglist, sys_siglist_entries): Remove. (init_signals): Do not initialize sys_siglist. (safe_strsignal): Use sigdescr_np instead of sys_siglist.
* | Fix more compilation warnings in xdisp.cEli Zaretskii2020-08-231-2/+4
| | | | | | | | | | * src/xdisp.c (display_mode_element, decode_mode_spec_coding): Avoid compilation warnings.
* | Fix a compilation warning in xdisp.cEli Zaretskii2020-08-231-2/+2
| | | | | | | | | | * src/xdisp.c (gui_consider_frame_title): Fix compilation warning. Reported by Lars Ingebrigtsen <larsi@gnus.org>.
* | Improve handling of coding-system mnemonic indicatorsEli Zaretskii2020-08-232-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes assertion violations when the mnemonic is given as a string, and allows non-ASCII characters be used as mode-line mnemonic of a coding-system. * src/xdisp.c (decode_mode_spec_coding): Handle multibyte characters as coding-system's mnemonic. (display_mode_element): If decode_mode_spec returns a multibyte string, display it as multibyte. * src/coding.c (Fdefine_coding_system_internal) (Fcoding_system_put): If :mnemonic is a string, use its first character. This avoids assertion violations if someone uses a string as the mnemonic of a coding-system.
* | Always make a multibyte string for the frame title (bug#42904)Mattias Engdegård2020-08-231-3/+9
| | | | | | | | | | | | | | | | * src/xdisp.c (gui_consider_frame_title): Multibyte-encode any raw bytes in the title, and then pass a multibyte string to the back-end for use as a frame title. This cuts down a little on the rubbish shown when raw bytes sneak in by mistake (as part of the buffer name, for instance).
* | Fix image display on w32 as followup to recent changesEli Zaretskii2020-08-231-11/+6
| | | | | | | | | | | | | | The new code calls 'malloc' and 'free', so we can no longer * src/image.c (struct image_type): Rename 'load' to 'load_img' and 'free' to 'free_img'. All callers changed. (free_image) [WINDOWSNT]: Don't #undef 'free'.