aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* | Decouple dired from regex internalsDaniel Colascione2018-06-161-25/+12
| | | | | | | | | | | | * src/dired.c: Remove use of regex.h (directory_files_internal): Use higher-level regular expression functions.
* | Remove commented-out code in compile_pattern_1Daniel Colascione2018-06-161-7/+0
| | | | | | | | * src/search.c (compile_pattern_1): Remove commented-out code.
* | Tweak field ordering in re_pattern_bufferDaniel Colascione2018-06-161-4/+4
| | | | | | | | | | * src/regex.h (struct re_pattern_buffer): Reorder charset_unibyte field to keep bitfields together.
* | Rewrite memory-limit in LispPaul Eggert2018-06-161-19/+0
| | | | | | | | | | | | | | | | | | | | | | Have it return Emacs virtual memory size, not the sbrk value which is often useless newadays. * doc/lispref/internals.texi (Garbage Collection): * etc/NEWS: Document this. * lisp/subr.el (memory-limit): New implementation in Lisp, written in terms of process-attributes, and which returns virtual memory size. * src/alloc.c (Fmemory_limit): Remove C implementation.
* | Use mint_ptr in w32notify.cEli Zaretskii2018-06-161-4/+4
| | | | | | | | | | | | * src/w32notify.c (Fw32notify_add_watch, Fw32notify_rm_watch) (Fw32notify_valid_p, w32_get_watch_object): Use make_mint_ptr and xmint_pointer.
* | Minor doc string fixes in json.cEli Zaretskii2018-06-161-2/+3
| | | | | | | | * src/json.c (Fjson_serialize, Fjson_insert): Fix 'usage'.
* | Formatting and doc fixes in recent changesEli Zaretskii2018-06-162-8/+9
| | | | | | | | | | | | | | * src/xfaces.c (evaluate_face_filter): Explain the inner braces. (merge_face_ref): Fix whitespace. (syms_of_xfaces) <face-filters-always-match>: Doc fix. * src/xdisp.c (extend_face_to_end_of_line): Fix whitespace.
* | Improve documentation of several recent changesEli Zaretskii2018-06-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xfaces.c (merge_face_ref): Fix a typo in the commentary. (evaluate_face_filter, filter_face_ref): Minor copyedits in the commentary. * doc/lispref/display.texi (Face Remapping): * doc/lispref/text.texi (Special Properties): Document the ':filter' face specs and their effects. Document 'face-filters-always-match'. * doc/emacs/files.texi (Visiting): Document the new possibility to visit large files literally in response to question asked by Emacs. * etc/NEWS: Mention the new possibility to visit large files literally. * lisp/files.el (files--ask-user-about-large-file): Use "literally" instead of "raw", for consistency with find-file-literally. * doc/lispref/frames.texi (Input Focus): Tell explicitly that focus-change events are sometimes supported on TTY frames.
* | Fix a typo in xmenu.cEli Zaretskii2018-06-161-2/+2
| | | | | | | | | | | | * src/xmenu.c (x_menu_show): Replace a call to record_unwind_protect_pointer with record_unwind_protect_ptr. (Bug#31856)
* | Fix --with-cairo buildAri Roponen2018-06-161-2/+2
| | | | | | | | | | | | * src/xterm.c (x_cr_destroy): Remove extra semicolon. (x_cr_export_frames): Fix a typo in calling record_unwind_protect_ptr. (Bug#31856)
* | * src/Makefile.in: Update paxctl comment.Paul Eggert2018-06-151-1/+1
| |
* | Minor CANNOT_DUMP cleanupsPaul Eggert2018-06-151-1/+1
| | | | | | | | | | | | | | | | | | | | Mostly, this avoids munging executables when CANNOT_DUMP = yes, as the munging is needed only for unexec. * configure.ac (PAXCTL_dumped, PAXCTL_notdumped) [CANNOT_DUMP]: Leave these empty. (LD_SWITCH_SYSTEM_TEMACS) [CANNOT_DUMP]: Do not append -no-pie or -nopie. * src/alloc.c (my_heap_start) [CANNOT_DUMP]: Omit; not used.
* | Fix typo in previous macfont.m changePaul Eggert2018-06-151-1/+2
| | | | | | | | | | * src/macfont.m (macfont_descriptor_entity): Fix typo. Problem reported by Clemens Schüller.
* | Restore macfont.m casts to void *Paul Eggert2018-06-151-2/+2
| | | | | | | | | | | | | | * src/macfont.m (macfont_set_family_cache): Restore casts to void * that were mistakenly removed in my recent change. The types in question are pointer-to-const. Problem reported by Clemens Schüller.
* | Fix building --without-x and similarEli Zaretskii2018-06-151-6/+0
| | | | | | | | | | | | * src/keyboard.c (make_lispy_focus_out): Compile it unconditionally, as it is now supported on TTYs as well. Reported by Filipp Gunbin <fgunbin@fastmail.fm>.
* | Remove Lisp_Misc_Save_ValuePaul Eggert2018-06-143-407/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This type and its associated routines are no longer used. * src/alloc.c (voidfuncptr): Move here from src/lisp.h. (free_misc, make_save_int_int_int) (make_save_obj_obj_obj_obj, make_save_ptr) (make_save_ptr_int, make_save_ptr_ptr) (make_save_funcptr_ptr_obj, make_save_memory) (free_save_value, mark_save_value): Remove. (mark_object): Remove mention of Lisp_Misc_Save_Value. * src/lisp.h (Lisp_Misc_Save_Value, SAVE_SLOT_BITS) (SAVE_VALUE_SLOTS, SAVE_TYPE_BITS, enum Lisp_Save_Type) (struct Lisp_Save_Value, SAVE_VALUEP, XSAVE_VALUE) (save_type, XSAVE_POINTER, set_save_pointer) (XSAVE_FUNCPOINTER, XSAVE_INTEGER, set_save_integer) (XSAVE_OBJECT): Remove. (union Lisp_Misc): Remove u_save_value. (voidfuncptr): Move from here to src/alloc.c. * src/print.c (print_object): Remove support for printing Lisp_Misc_Save_Value.
* | New type Lisp_Misc_PtrPaul Eggert2018-06-145-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a streamlined version of Lisp_Save_Value, which contains just a pointer, as that is all Lisp_Save_Values are used for any more. With the previous changes, these objects are not primarily used as save values, so just call them "Misc" rather than "Save". * src/alloc.c (make_misc_ptr): New function. (mark_object): Mark Lisp_Misc_Ptr too. * src/lisp.h (Lisp_Misc_Ptr): New constant. (struct Lisp_Misc_Ptr): New type. (make_mint_ptr, mint_ptrp, xmint_pointer): Use Lisp_Misc_Ptr, not Lisp_Save_Value. (union Lisp_Misc): Add Lisp_Misc_Ptr. * src/print.c (print_object): Print Lisp_Misc_Ptr.
* | Avoid allocating Lisp_Save_Value for arraysPaul Eggert2018-06-143-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (mark_maybe_objects): New function. * src/eval.c (default_toplevel_binding) (backtrace_eval_unrewind, Fbacktrace__locals): Treat array unwindings like other miscellaneous pdl types. (record_unwind_protect_array): New function. (do_one_unbind): Free the array while unwinding. (mark_specpdl): Mark arrays directly. * src/lisp.h (SPECPDL_UNWIND_ARRAY): New constant. (union specbinding): New member unwind_array. (SAFE_ALLOCA_LISP_EXTRA): Use record_unwind_protect_array instead of make_save_memory + record_unwind_protect.
* | Avoid allocating Lisp_Save_Value for excursionsPaul Eggert2018-06-143-29/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/editfns.c (save_excursion_save): New arg PDL, specifying where to save the state. All uses changed. (save_excursion_restore): Args are now the marker and info rather than a pointer to a Lisp_Save_Value containing them. All uses changed. * src/eval.c (default_toplevel_binding, Fbacktrace__locals): Treat excursions like other miscellaneous pdl types. (record_unwind_protect_excursion): Save data directly into the pdl rather than creating an object on the heap. This avoids the need to allocate and free an object. (do_one_unbind, backtrace_eval_unrewind): Unwind excursions directly. (mark_specpdl): Mark excursions directly. * src/lisp.h (SPECPDL_UNWIND_EXCURSION): New constant. (union specbinding): New member unwind_excursion.
* | Just use cons in macfont_descriptor_entityPaul Eggert2018-06-141-7/+6
| | | | | | | | | | | | * src/macfont.m (macfont_descriptor_entity): Use cons instead of make_save_ptr_int, as this avoids the need for a special type and function for this one-off.
* | Avoid allocating a Lisp_Save_Value in ftfont.cPaul Eggert2018-06-141-14/+12
| | | | | | | | | | | | | | | | | | * src/ftfont.c (struct ftfont_cache_data): New member face_refcount. (ftfont_lookup_cache): Clear it when initializing. Use make_mint_ptr, since this typically avoids the need to allocate a Lisp_Save_Value as refcount is now stored elsewhere. (ftfont_open2, ftfont_close): Manipulate the reference count in the struct, not in the save object.
* | Use record_unwind_protect_ptr to avoid allocationPaul Eggert2018-06-143-15/+27
| | | | | | | | | | | | | | | | | | | | | | * src/term.c (struct tty_pop_down_menu): New type. (tty_pop_down_menu, tty_menu_show): Use it, along with record_unwind_protect_ptr, to avoid allocating a Lisp_Misc. * src/xmenu.c (struct pop_down_menu): New type. (pop_down_menu, x_menu_show): Use it, likewise. * src/xterm.c (x_cr_destroy, x_cr_export_frames): Use record_unwind_protect_pointer to avoid possibly allocating a Lisp_Misc.
* | Avoid Lisp_Misc allocation if C stack sufficesPaul Eggert2018-06-142-18/+37
| | | | | | | | | | | | | | | | | | * src/fileio.c (union read_non_regular): New type. (read_non_regular, Finsert_file_contents): Use it to avoid allocating a Lisp_Misc. * src/keymap.c (union map_keymap): New type. (map_keymap_char_table_item, map_keymap_internal): Use it to avoid allocating a Lisp_Misc.
* | Simplify init_module_assertionsPaul Eggert2018-06-141-7/+3
| | | | | | | | | | | | | | * src/emacs-module.c (init_module_assertions): Just use NULL instead of allocating a dummy on the stack and then using eassert. Practical platforms check for null pointer dereferencing nowadays, so this is good enough.
* | New mint_ptr representation for C pointersPaul Eggert2018-06-1410-39/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h (make_mint_ptr, mint_ptrp, xmint_pointer): New functions. * src/dbusbind.c (xd_lisp_dbus_to_dbus, Fdbus__init_bus): * src/emacs-module.c (module_free_global_ref, Fmodule_load) (module_assert_runtime, module_assert_env, value_to_lisp) (lisp_to_value, initialize_environment) (finalize_environment, finalize_runtime_unwind) (mark_modules): * src/font.c (otf_open, font_put_frame_data) (font_get_frame_data): * src/macfont.m (macfont_invalidate_family_cache) (macfont_get_family_cache_if_present) (macfont_set_family_cache): * src/nsterm.h (XNS_SCROLL_BAR): * src/nsterm.m (ns_set_vertical_scroll_bar) (ns_set_horizontal_scroll_bar): * src/w32fns.c (w32_monitor_enum) (w32_display_monitor_attributes_list): * src/xterm.c (x_cr_destroy, x_cr_export_frames): * src/xwidget.c (webkit_javascript_finished_cb) (save_script_callback, Fxwidget_webkit_execute_script) (kill_buffer_xwidgets): Use mint pointers instead of merely save pointers.
* | Also allow custom false and null when serializing to JSONJoão Távora2018-06-151-82/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/text.texi (Parsing JSON): Describe new arguments of json-serialize and json-insert. * src/json.c (enum json_object_type, struct json_configuration): Move up in file before first usage. (lisp_to_json_toplevel, lisp_to_json_toplevel_1, lisp_to_json): Accept a struct json_configuration*. (Fjson_serialize, Fjson_insert): Accept multiple args. (json_parse_args): Accept new boolean configure_object_type. * test/src/json-tests.el (json-serialize, json-insert): Update forward decls. (json-parse-with-custom-null-and-false-objects): Add assertions for json-serialize.
* | Support custom null and false objects when parsing JSONJoão Távora2018-06-151-54/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/text.texi (Parsing JSON): Describe new :null-object and :false-object kwargs to json-parse-string and json-parse-buffer. * src/json.c (struct json_configuration): New type. (json_to_lisp): Accept a struct json_configuration* param. (json_parse_args): Rename from json_parse_object_type. (Fjson_parse_string): Rework docstring. (Fjson_parse_string, Fjson_parse_buffer): Update call to json_to_lisp. (syms_of_json): Two new syms, QCnull_object and QCfalse_object. * test/src/json-tests.el (json-parse-with-custom-null-and-false-objects): New test.
* | Remove some wrong 8-byte alignment assumptionsPaul Eggert2018-06-133-66/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not assume that 8-byte alignment suffices for all C objects, as some platforms require 16-byte alignment for some objects, and this will start to bite us as time goes on (e.g., if an Emacs module ever uses an object containing a long double, which requires 16-byte alignment on x86-64). Conversely, on !USE_LSB_TAG platforms, do not insist on aligning Lisp objects to a multiple of 8, as this is not needed for high-order tag bits. * src/alloc.c (LISP_ALIGNMENT, MALLOC_IS_LISP_ALIGNED): New constants. (XMALLOC_BASE_ALIGNMENT, XMALLOC_HEADER_ALIGNMENT): Removed. All uses replaced by LISP_ALIGNMENT. (aligned_alloc, laligned, lmalloc, lrealloc, union aligned_Lisp_Misc) (maybe_lisp_pointer, pure_alloc): Use LISP_ALIGNMENT rather than GCALIGNMENT. (aligned_alloc): Do not worry about an alignment of LISP_ALIGNMENT when MALLOC_IS_LISP_ALIGNED, as the code never uses aligned_alloc with alignment == LISP_ALIGNMENT in that case. (__alignof__): Remove. All uses removed. (MALLOC_IS_GC_ALIGNED): Remove. All uses replaced with MALLOC_IS_LISP_ALIGNED. (vector_alignment): Remove. All uses replaced with LISP_ALIGNMENT. * src/alloc.c (mark_maybe_pointer): * src/emacs-module.c (value_to_lisp_bits): Do not assume GCALIGNMENT == 1 << GCTYPEBITS, as GCALIGNMENT is 1 on !USE_LSB_TAG platforms now. * src/lisp.h (GCALIGNMENT) [!USE_LSB_TAG]: Now 1. (struct Lisp_Symbol, union vectorlike_header, struct Lisp_Cons) (struct Lisp_String): Simplify test for verifying alignment.
* | ; Assorted documentation fixes in recent changesEli Zaretskii2018-06-121-5/+5
| | | | | | | | | | | | | | | | | | | | * etc/NEWS: Minor copyedits of recent entries. * src/keyboard.c (Finternal_handle_focus_in): * lisp/frame.el (frame-focus-state): Doc fixes. * doc/lispref/hooks.texi (Standard Hooks): Mention after-delete-frame-functions.
* | Give warning if losing value to defvaralias (Bug#5950)Noam Postavsky2018-06-121-0/+10
| | | | | | | | | | | | * src/eval.c (Fdefvaralias): Call `display-warning' if the alias target has a non-eq value to the variable being aliased. * test/src/eval-tests.el (defvaralias-overwrite-warning): New test.
* | Add after-delete-frame-functionsDaniel Colascione2018-06-111-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of working around the behavior delete-frame-functions, just add an after-delete-frame-functions hook. * doc/lispref/frames.texi (Deleting Frames): Document `after-delete-frame-functions'. * etc/NEWS: Mention `after-delete-frame-functions'. * lisp/frame.el (blink-cursor--should-blink): (blink-cursor--rescan-frames, blink-frame-mode): Get rid of the ugly ignored-frame parameter and switch from `delete-frame-functions' to `after-delete-frame-functions'. * src/frame.c (syms_of_frame): New variable `after-delete-frame-functions'. (delete_frame): Use it.
* | Losing focus should not stop idlenessDaniel Colascione2018-06-111-0/+1
| | | | | | | | * src/keyboard.c (read_char): Make Qfocus_out not break idle.
* | New focus management interfaceDaniel Colascione2018-06-114-82/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | focus-in-hook and focus-out-hook don't accurately reflect actual user-visible focus states. Add a new focus interface and mark the old one obsolete. * doc/lispref/frames.texi (Input Focus): Document new focus functions. Remove references to the now-obsolete focus hooks. * lisp/frame.el (frame-focus-state): New function. (after-focus-change-function): New variable. (focus-in-hook, focus-out-hook): Move to lisp from C; mark obsolete. * lisp/term/xterm.el (xterm-translate-focus-in) (xterm-translate-focus-out): Track tty focus in `tty-focus-state' terminal parameter; call `after-focus-change-function'. (xterm--suspend-tty-function): New function. * src/frame.c (Fhandle_switch_frame): Update docstring; don't call focus hooks. (focus-in-hook, focus-out-hook): Remove: moved to lisp. (syms_of_frame): Remove unread_switch_frame; add Vunread_switch_frame. * src/keyboard.c: (Finternal_handle_focus_in): New function. (make_lispy_event): Always report focus events to lisp; don't translate them to switch events sometimes. Lisp can take care of creating synthetic switch-frame events via `internal-handle-focus-in'. * src/w32term.c (x_focus_changed): Remove switch-avoidance logic: just directly report focus changes to lisp. * src/xterm.c (x_focus_changed): Remove switch-avoidance logic: just directly report focus changes to lisp.
* | Remove code #if-0-ed terminal-local codeDaniel Colascione2018-06-111-45/+0
| | | | | | | | | | | | | | This code hasn't been used since 2005. * src/data.c (get_terminal, Fterminal_local_value, Fset_terminal_local_value): Remove.
* | Remove obsolete keyboard.c codeDaniel Colascione2018-06-111-39/+0
| | | | | | | | | | * src/keyboard.c (any_kboard_state, single_kboard_state): Remove #if-0-ed functions.
* | Merge from emacs-26Noam Postavsky2018-06-103-17/+26
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3434edc731 Enlarge DUMPED_HEAP_SIZE for 64-bit Windows builds 36bbdfc017 Update Unicode data files to version 11.0.0 of Unicode b7b7a5f4f3 * etc/NEWS: Belatedly call out vc-hg changes in v26.1. (B... 5b6f8b54d1 Clarify the documentation of 'dired-recursive-deletes' 9db97b49cd ; * etc/DEBUG: Add information about debugging libXft prob... 0214ffbe60 Clarify doc string of 'update-glyphless-char-display' ef35d405b1 Clarify subtle issues with 'eq' in byte-compiled code c6ef3c8321 Make cl-print respect print-quoted (bug#31649) 26b52ac40e Fix unexpected jumps of window-point in 'set-window-config... 4af077ab4d * etc/emacs.appdata.xml: Update Emacs screenshot. e5ab25deae Fix cursor movement by 'next-logical-line' after 'next-line' d20beef5f1 Fix prompt in bookmark.el (Bug#24726) c57e7eaae8 Improve documentation of 'empty' whitespace-style # Conflicts: # etc/NEWS
| * Enlarge DUMPED_HEAP_SIZE for 64-bit Windows buildsEli Zaretskii2018-06-091-1/+1
| | | | | | | | | | * src/w32heap.c (DUMPED_HEAP_SIZE): Bump to 23MB. Reported by Andy Moreton <andrewjmoreton@gmail.com>.
| * Fix unexpected jumps of window-point in 'set-window-configuration' (Bug#31695)Martin Rudalics2018-06-071-9/+22
| | | | | | | | | | | | * src/window.c (Fset_window_configuration): Prevent that the fix for Bug#12208 affects restoration of window points when using separate minibuffer frames (Bug#31695).
| * Fix cursor movement by 'next-logical-line' after 'next-line'Eli Zaretskii2018-06-061-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/indent.c (Fvertical_motion): Adjust TO_X when line-numbers are being displayed. Remove unneeded "correction" of TO_X at the goal line. * lisp/simple.el (last--line-number-width): Remove unneeded variable. (line-move-visual): Account for line-number display width by adjusting the pixel X coordinate that gets converted into canonical columns passed to vertical-motion, instead of adjusting temporary-goal-column (which then affects next commands, including next-logical-line). (Bug#31723)
| * ; * src/ftfont.c (ftfont_spec_pattern): Fix whitespace.Eli Zaretskii2018-06-051-1/+1
| |
| * Port FC_COLOR change to older fontconfigPaul Eggert2018-06-051-1/+1
| | | | | | | | | | | | | | Problem reported by John ff in: https://lists.gnu.org/r/emacs-devel/2018-04/msg00058.html * src/ftfont.c (ftfont_spec_pattern) [!FC_COLOR]: Don’t use FC_COLOR on older fontconfigs that don’t have it.
| * Ignore color fonts when using XftRobert Pluim2018-06-052-0/+14
| | | | | | | | | | | | | | | | * src/font.c (syms_of_font): New configuration variable xft-ignore-color-fonts, default t. * src/ftfont.c (ftfont_spec_pattern): Tell fontconfig to ignore color fonts if xft-ignore-color-fonts is t. (Bug#30874, Bug#30045) * etc/NEWS: Document xft-ignore-color-fonts.
| * Fix bug#30846, along with misc cleanups found along the wayStefan Monnier2018-06-034-80/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test/src/data-tests.el (data-tests-kill-all-local-variables): New test. * src/buffer.c (swap_out_buffer_local_variables): Remove. Fuse the body of its loop into that of reset_buffer_local_variables. (Fkill_buffer, Fkill_all_local_variables): Don't call it any more. (reset_buffer_local_variables): Make sure the buffer's local binding is swapped out before removing it from the alist (bug#30846). Call watchers before actually killing the var. * src/data.c (Fmake_local_variable): Simplify. Use swap_in_global_binding to swap out any local binding, instead of a mix of find_symbol_value followed by messing with where&found. Don't call swap_in_symval_forwarding since the currently swapped binding is never one we've modified. (Fkill_local_variable): Use swap_in_global_binding rather than messing with where&found to try and trick find_symbol_value into doing the same. * src/alloc.c (mark_localized_symbol): 'where' can't be a frame any more. (cherry picked from commit 3ddff080341580eb6fc18d907181e9cc2301f62d)
| * Centralize Bug#30931 fixPaul Eggert2018-06-034-14/+18
| | | | | | | | | | | | | | | | * src/marker.c (detach_marker): New function. * src/editfns.c (save_restriction_restore): * src/insdel.c (signal_before_change): Use it. (cherry picked from commit 6f66a43d7ad6cada2b7dbb6d07efe36be1dc7ecb)
| * Fix another case of freed markers in the undo-list (Bug#30931)Noam Postavsky2018-06-034-16/+11
| | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (free_marker): Remove. * src/editfns.c (save_restriction_restore): * src/insdel.c (signal_before_change): Detach the markers from the buffer when we're done with them instead of calling free_marker on them. * test/src/editfns-tests.el (delete-region-undo-markers-1) (delete-region-undo-markers-2): New tests. (cherry picked from commit 96b8747d5c5d747af13fd84d8fe0308ef2a0ea7a)
| * Fix CHECK_ALLOCATED_AND_LIVE abort during GCPaul Eggert2018-06-031-3/+4
| | | | | | | | | | | | | | * src/editfns.c (save_restriction_restore): Wait for the GC to free the temporary markers (Bug#30931). (cherry picked from commit 670f2ffae718046c0fb37313965a51c040ed096f)
| * Don't wait for visible frames to become visibleNoam Postavsky2018-06-031-1/+2
| | | | | | | | | | | | | | | | | | | | For discussion, see thread starting at https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00807.html. * src/xterm.c (x_make_frame_visible): Check FRAME_VISIBLE_P before calling x_wait_for_event. (cherry picked from commits 2a192e21cf3b04b7f830b4971c1508c611e13a3c and 00c1f771f2a51ffa675ec5a07ea330f2605cd302)
* | Pacify gcc -Wnull-dereference some morePaul Eggert2018-06-101-2/+2
| | | | | | | | | | | | * src/keyboard.c (read_char): Use xevent_start in a couple more places where it is safe. This is needed with --enable-gcc-warnings --enable-checking on Fedora 28 x86-64.
* | Use native alignment to access Lisp object dataPaul Eggert2018-06-1018-109/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using __builtin_assume_aligned (P, GCALIGNMENT) to tell GCC that P has alignment 8, use (T *) P where T is the type of the pointed-to object, to tell GCC that P has native alignment. This is simpler, matches the intent better, and should help simplify future improvements. Some of these changes are to pacify gcc -Wnull-dereference, since GCC is smarter about pointers now that Emacs no longer uses __builtin_assume_aligned; these minor changes should improve code efficiency slightly. On Fedora 28 x86-64 with default optimization this patch shrinks the size of the Emacs text segment by 0.36%. * src/conf_post.h (__has_builtin, __builtin_assume_aligned): Remove; no longer used. * src/dbusbind.c (XD_OBJECT_TO_DBUS_TYPE): Pacify -Wnull-dereference by using XCAR instead of CAR_SAFE and XCDR instead of CDR_SAFE when this is safe. * src/fileio.c (Fexpand_file_name): * src/font.c (clear_font_cache): Pacify -Wnull-dereference by removing unnecessary NILP test. * src/keyboard.c (xevent_start): New function. (read_char, read_key_sequence): Pacify -Wnull-dereference by using xevent_start instead of EVENT_START. * src/lisp.h (lisp_h_XUNTAG): Remove; XUNTAG is always a macro now, since it can no longer be implemented as a function. (XUNTAG): New third argument CTYPE. All uses changed. Cast result to CTYPE * instead of using __builtin_assume_aligned. Simplify by using LISP_WORD_TAG. (LISP_WORD_TAG): New macro. (TAG_PTR): Use it. * src/menu.c (x_popup_menu_1): Pacify -Wnull-dereference by using XCAR instead of Fcar and XCDR instead of Fcdr where this is safe.
* | Simplify read_key_sequencePaul Eggert2018-06-091-68/+30
| | | | | | | | | | | | | | | | | | * src/keyboard.c (READ_KEY_ELTS): New constant. (keyremap_step, read_key_sequence): Omit BUFSIZE arg, since it's always READ_KEY_ELTS. All callers changed. (grow_bool_vector): Remove; no longer needed. (read_key_sequence): Use a bool array instead of a Lisp bool vector, since it's small and this puts less pressure on the GC.