summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* ;Corrected display-fill-column-indicator mode.fill_column_indicatorJimmy Aguilar Mena2019-05-031-45/+48
| | | | Small corrections in the documentation and code format to merge into master.
* *src/xdisp.c: Fixed fill column indicator position in terminal mode.Jimmy Aguilar Mena2019-05-031-2/+2
|
* display-fill-column-indicator interface correctionsJimmy Aguilar Mena2019-05-031-26/+36
| | | | | | | | *lisp/display-fill-column-indicator.el: Fixed character selection for the indicator based in the current faces. Extended condition to set display-fill-column-indicator-character in graphical displays. *src/xdisp.c: Fixed some long lines.
* ;Small changes in the documentationJimmy Aguilar Mena2019-05-031-4/+3
| | | | | | *src/xdisp.c: Fixed docstring for display-fill-column-indicator-column *etc/NEWS: Concordance fix in the display-fill-column-indicator part. *doc/emacs/display.texi: Name mismatch fix.
* Fixed fill-column-indicator for continuation linesJimmy Aguilar Mena2019-05-031-12/+15
| | | | | | *src/xdisp.c: Grouped the test conditions for display-fill-column-indicator mode in a macro to simplify future modifications.
* Display-fill-column-indicator NEWS info.Jimmy Aguilar Mena2019-05-031-17/+46
| | | | | *etc/NEWS: Added information about the fill-column-indicator mode. *lisp/faces.el: Added a face for the display fill column indicator.
* Start display-fill-column-indicator-mode.Jimmy Aguilar Mena2019-05-031-9/+170
|
* Pacify librsvg 2.45.1 and laterPaul Eggert2019-05-031-3/+18
| | | | | * src/image.c (svg_load_image): Pacify librsvg 2.45.1 and later, and add a FIXME comment about the deprecated librsvg functions.
* Simplify xd_signature to pacify GCC 9Paul Eggert2019-05-031-5/+3
| | | | | * src/dbusbind.c (xd_signature): Use simpler way to set up the subsignature. This also pacifies GCC 9 on Fedora 30 x86-64.
* Refactor update_window_begin and update_window_end hooksAlexander Gramiak2019-05-026-243/+118
| | | | | | | | | | | | | | Bug#35464. * src/dispnew.c (gui_update_window_begin, gui_update_window_end): New procedures implementing common functionality. * src/nsterm.m: (ns_update_window_begin, ns_update_window_end): * src/xterm.c: (x_update_window_begin, x_update_window_end): Remove in favor of only using the new generic versions. * src/w32term.c: (w32_update_window_begin, w32_update_window_end): Remove duplicated and unused code.
* Fix decode-time/encode-time roundtrip on macOSPaul Eggert2019-04-301-2/+3
| | | | | | | | | * src/timefns.c (Fencode_time): Ignore DST flag when the zone is numeric or is a cons, as the doc string says it’s ignored in that case, and not ignoring it causes encode-time to not invert decode-time on some platforms (Bug#35502). * test/src/timefns-tests.el (encode-time-dst-numeric-zone): New test.
* Disable __attribute__ ((cold)) on MinGWPaul Eggert2019-04-291-2/+4
| | | | | * src/conf_post.h (ATTRIBUTE_COLD) [__MINGW32__]: Define to empty on this platform.
* Merge from origin/emacs-26Glenn Morris2019-04-292-2/+4
|\ | | | | | | | | | | | | | | | | c26d452 (origin/emacs-26) * src/macfont.m (macfont_shape): Use conven... 140e7f8 Recommend using font-lock-face over face (Bug#35044) 7cb5364 Check if mouse_face_overlay was deleted (Bug#35273) # Conflicts: # src/macfont.m
| * * src/macfont.m (macfont_shape): Use convenient LGLYPH_NEW.YAMAMOTO Mitsuharu2019-04-291-1/+1
| |
| * Check if mouse_face_overlay was deleted (Bug#35273)Noam Postavsky2019-04-281-1/+3
| | | | | | | | | | | | * src/xdisp.c (note_mouse_highlight): Check if the mouse_face_overlay actually points to a buffer, before calling mouse_face_overlay_overlaps on it.
| * Use pkg-config to find lcms2 CFLAGS and LIBS (Bug#30346)Noam Postavsky2019-04-211-3/+4
| | | | | | | | | | | | | | | | | | * configure.ac: Use EMACS_CHECK_MODULES fors LCMS2 rather than AC_SEARCH_LIBS. * src/Makefile.in: Get LCMS2_LIBS and LCMS2_CFLAGS from configure, instead of just LIBLCMS2. (cherry picked from commit cb3863370cbe574810f796726faa39ba0de0a429)
* | Replace ‘/* FALLTHROUGH! */’ with ‘break;’Paul Eggert2019-04-291-12/+11
| | | | | | | | | | | | * src/data.c (set_internal, set_default_internal): Replace obsolescent /* FALLTHROUGH! */ comments with ‘break;’, as ‘FALLTHROUGH;’ is not needed here.
* | Avoid compilation warnings in w32.cEli Zaretskii2019-04-291-2/+2
| | | | | | | | | | | | * src/w32.c (unsetenv, readlink): Use memcpy instead of strncpy, to avoid a compiler warning about calculating the bound of the copy.
* | Update from GMPPaul Eggert2019-04-282-227/+334
| | | | | | | | | | | | | | | | * admin/update-copyright (updatable_files): Don’t update copyright year on files copied from GMP, so that they’re identical to upstream. * src/mini-gmp.c, src/mini-gmp.h: Copy from GMP development versions as of 2019-01-01 20:15:39 UTC.
* | Export major version of latest Emacs supported by emacs-module.h.Philipp Stephani2019-04-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is useful if module authors want to support multiple versions of emacs-module.h. * configure.ac (emacs_major_version): Define substitution. * src/emacs-module.h.in (EMACS_MAJOR_VERSION): Define macro. * doc/lispref/internals.texi (Module Initialization): Document EMACS_MAJOR_VERSION preprocessor macro. * test/data/emacs-module/mod-test.c (emacs_module_init): Verify behavior of EMACS_MAJOR_VERSION.
* | * src/emacs-module.c (funcall_module): Add a nontrivial assertionPhilipp Stephani2019-04-281-0/+5
| |
* | Fix names of functions in last commitEli Zaretskii2019-04-284-24/+30
| | | | | | | | | | | | | | * src/coding.h (build_string_from_utf8): Rename from build_utf8_string. All callers changed. * src/coding.c (make_string_from_utf8): Rename from make_utf8_string. All callers changed.
* | Refactoring: move UTF-8 decoding functions into coding.h.Philipp Stephani2019-04-284-64/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | json_make_string and json_build_string are generally useful and not JSON-specific. Move them to coding.[ch]. * src/coding.h (build_utf8_string): Move from json.c. * src/coding.c (make_utf8_string): Move from json.c. * src/json.c (json_make_string, json_build_string): Move to coding.[ch]. Split out JSON-specific comment. (json_parse_error, Fjson_serialize, json_to_lisp): Fix callers. * src/emacs-module.c (module_make_function, module_make_string): Use new functions. (module_decode, module_decode_copy): Remove.
* | Fix -nw sessions on MS-Windows broken by a recent commitEli Zaretskii2019-04-271-0/+2
| | | | | | | | | | * src/w32console.c: Include dispextern.h. (initialize_w32_display): Populate defined_color_hook.
* | Fix MS-Windows build broken by a recent commitEli Zaretskii2019-04-271-1/+1
| | | | | | | | | | * src/w32term.c (w32_new_focus_frame): Fix a typo in a recent commit.
* | Fix --with-x-toolkit=no build breakageYAMAMOTO Mitsuharu2019-04-272-3/+3
| | | | | | | | | | | | | | | | * oldXMenu/Create.c (XMenuCreate): Add const modifier to variable def_val. * oldXMenu/Create.c: * src/frame.h: Add const modifier to return type of x_get_resource_string. * src/frame.c (x_get_resource_string): Exempt x_get_string_resource from renaming generic x_* identifiers.
* | Update multicolor font support statusYAMAMOTO Mitsuharu2019-04-271-3/+3
| | | | | | | | | | * etc/NEWS: Mention multicolor font support on Cairo and NS. * src/macfont.m (macfont_list): Re-enable color bitmap fonts.
* | * src/frame.c (x_get_resource_string): Fix typoAlexander Gramiak2019-04-261-1/+1
| |
* | * src/xdisp.c: Only check FRAME_RIF for graphical framesAlexander Gramiak2019-04-261-3/+6
| |
* | Rename x_highlight_frame property to highlight_frameAlexander Gramiak2019-04-267-50/+50
| | | | | | | | | | | | | | | | | | | | * src/nsterm.h: * src/nsterm.m: * src/w32term.c: * src/w32term.h: * src/xdisp.c: * src/xterm.c: * src/xterm.h: Rename.
* | Check for existence of terminal hooks before useAlexander Gramiak2019-04-263-22/+33
| | | | | | | | | | | | | | | | | | This should not be necessary, and is merely a precaution. For background, see: https://lists.gnu.org/archive/html/emacs-devel/2019-04/msg00639.html * src/frame.c: * src/xdisp.c: Check for existence of terminal hooks before use.
* | Add terminal hook query_frame_background_colorAlexander Gramiak2019-04-265-19/+35
| | | | | | | | | | | | | | | | | | | | | | * src/termhooks.c (query_frame_background_color): New terminal hook. * src/image.c (image_query_frame_background_color): Remove. Use the terminal hook instead. * src/nsterm.m: * src/w32term.c: * src/xterm.c: Implement and set the new terminal hook.
* | Add terminal hook defined_color_hookAlexander Gramiak2019-04-2612-67/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/termhooks.h (defined_color_hook): New terminal hook. * src/xterm.c: * src/nsterm.m: * src/term.c: * src/w32term.c: Set defined_color_hook. * src/xfaces.c: Use defined_color_hook. (defined_color): Remove. * src/image.c: Remove redefinitions of x_defined_color, and use defined_color_hook.
* | Rename generic x_* identifiersAlexander Gramiak2019-04-2632-1805/+2040
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/image.c: Rename x_* procedures to image_*. * src/frame.c: Rename x_* procedures to gui_*. Rename xrdb_get_resource to gui_display_get_resource. Rename x_get_arg to gui_display_get arg. * src/frame.h: Rename can_x_set_window_size to can_set_window_size. * src/xfaces.c: Rename realize_x_face to realize_gui_face. Rename x_supports_face_attributes_p to gui_supports_face_attributes_p. * src/keyboard.c: * src/lisp.h: * src/nsterm.m: * src/w32term.c: * src/xterm.c: Rename x_get_keysym_name to get_keysym_name. * src/nsfns.c: * src/nsterm.m: Rename x_* procedures to ns_*. * src/w32fns.c: * src/w32term.c: Rename x_* procedures to w32_*. * src/termhooks.h (query_colors, get_focus_frame, focus_frame_hook) (frame_visible_invisible_hook, iconify_frame_hook) (set_window_size_hook, set_frame_offset_hook, set_frame_alpha_hook) (set_new_font_hook, set_bitmap_icon_hook, implicit_set_name_hook) (activate_menubar_hook, change_tool_bar_height_hook) (set_scroll_bar_default_width_hook) (set_scroll_bar_default_height_hook, get_string_resource_hook): New terminal hooks to replace backend-specific x_* procedures. * src/dispextern.h (clear_under_internal_border): New RIF procedure. * src/alloc.c: * src/frame.c: * src/xdisp.c: Use FRAME_OUTPUT_DATA instead of FRAME_X_OUTPUT. * src/frame.c: * src/w32term.c: * src/w32fns.c: Use FRAME_NATIVE_WINDOW instead of FRAME_X_WINDOW.
* | Add prefixes to some window system-dependent proceduresAlexander Gramiak2019-04-266-50/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/nsterm.m (note_mouse_movement): * src/w32fns.c (construct_console_modifiers): * src/w32inevt.c: * src/w32term.c (frame_highlight, frame_unhighlight) (construct_mouse_click, construct_mouse_wheel, construct_drag_n_drop) (lispy_file_action, queue_notifications, note_mouse_movement): * src/w32term.h: * src/xterm.c (frame_highlight, frame_unhighlight) (construct_mouse_click, note_mouse_movement, get_current_wm_state): Add and use window system prefixes.
* | Rename generic x_* procedures in xdisp.cAlexander Gramiak2019-04-2610-118/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (x_consider_frame_title, x_get_glyph_overhangs) (x_produce_glyphs, x_write_glyphs, x_insert_glyphs) (x_clear_end_of_line), x_fix_overlapping_area) (x_update_cursor, x_clear_cursor, x_clear_window_mouse_face) (x_draw_vertical_border, x_draw_right_divider, x_draw_bottom_divider) (x_intersect_rectangles): Rename with a gui prefix to indicate non-X-specific functionality. * src/composite.c: * src/dispextern.h: * src/nsfns.m: * src/nsterm.m: * src/w32fns.c: * src/w32term.c: * src/window.c: * src/xfns.c: * src/xterm.c: Use the renamed procedures.
* | Avoid assertion violations in calculating line-number widthEli Zaretskii2019-04-261-2/+5
| | | | | | | | | | | | * src/indent.c (line_number_display_width): Don't use the window's start marker if it belongs to a different buffer. (Bug#35429)
* | Avoid compiler warning in dynlib.cEli Zaretskii2019-04-261-1/+2
| | | | | | | | | | | | | | | | * src/dynlib.c (dynlib_addr) [WINDOWSNT]: Rename the first argument to be consistent with other platforms. Cast it to 'void *' to avoid compiler warning as result of changing the function's signature as part of the last recent change in dynlib.c.
* | Minor tweaks to recent UBSan-related fixPaul Eggert2019-04-251-14/+6
| | | | | | | | | | | | | | | | | | | | * src/alloc.c: No need to include stdalign.h; it’s pervasive. (GC_STRING_OVERRUN_COOKIE_SIZE): Align to sdata’s alignment, so that the code works even if alignof (sdata) exceeds 8. Don’t require the cookie size to be 8, as this overly fattens 32-bit platforms and one DEADBEEF should be enough. (GC_STRING_EXTRA): Omit now-unnecessary ‘verify’. (allocate_string_data): Omit unnecessary cast.
* | Port to Oracle Developer Studio 12.6Paul Eggert2019-04-258-48/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This compiler is a bit pickier about checking conformance to the C standard, ranging from syntax trivia (no extra ";" at the top level) to portability trivia (warnings re conversion between function and data pointers) to more-important stuff like lack of support for some __attribute__ usages. * src/dynlib.c (dynlib_addr): First argument is a function pointer, not a data pointer. All callers changed. * src/emacs-module.c (module_function_address): Return module_funcptr, not void *. All uses changed. * src/lisp.h (module_funcptr) [HAVE_MODULES]: New type. * src/lread.c (union ieee754_double): Don’t assume the usual semantics for converting signed to unsigned int when initializing a bitfield, as the Oracle compiler complains and the C standard is unclear. * src/pdumper.c (ALLOW_IMPLICIT_CONVERSION): Make it clearer that -Wsign-conversion is disabled everywhere in this file. (dump_trace, dump_tailq_prepend, dump_tailq_append): Don’t assume __attribute__. (dump_object_self_representing_p): Don’t disable conversion warnings; it’s not needed here. (DEFINE_FROMLISP_FUNC): Avoid possible signal in integer conversion from unsigned to signed. (DEFINE_FROMLISP_FUNC, finish_dump_pvec): Avoid warning about unreachable statements on platforms not supporting the __attribute__. (intmax_t_from_lisp, intmax_t_to_lisp, dump_off_from_lisp) (dump_off_to_lisp, dump_emacs_reloc_immediate_lv) (dump_emacs_reloc_immediate_ptrdiff_t) (dump_emacs_reloc_immediate_intmax_t) (dump_emacs_reloc_immediate_int, dump_emacs_reloc_immediate_bool): Omit stray semicolon that violates C standard. (dump_metadata_for_pdumper): Add cast to pacify compiler complaining about conversion from function pointer to data pointer. (Fdump_emacs_portable): Do not use CALLN to call a function with zero arguments, as C99 prohibits empty initializers. * src/xdisp.c (syms_of_xdisp): Do not nest calls to pure_list, to work around a bug in Oracle Developer Studio 12.6.
* | Make sure that ‘sdata’ objects in ‘sblock’ objects are aligned.Philipp Stephani2019-04-251-2/+10
| | | | | | | | | | | | | | | | | | Issue found by Clang’s UBSan. * src/alloc.c (GC_STRING_OVERRUN_COOKIE_SIZE): Increase to 8. (string_overrun_cookie): Extend accordingly. (GC_STRING_EXTRA): Ensure that it’s properly aligned for ‘sdata’. (allocate_string_data): Verify that ‘sdata’ blocks remain aligned.
* | Unbreak build when building without GMP support.Philipp Stephani2019-04-242-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for a new preprocessor macro EMACS_MODULE_HAVE_MPZ_T to emacs-module.h. If this macro is defined, assume that mpz_t is already defined and don’t include gmp.h. Don’t document the new macro for now, as it’s unclear whether we want to support this in modules outside the Emacs tree. * src/emacs-module.h.in: Allow user to prevent inclusion of gmp.h. * src/emacs-module.c: Use mini-gmp if GMP is unavailable. Don’t include gmp.h. * src/lisp.h: Don’t require gmp.h. It’s not needed for lisp.h. * test/Makefile.in (GMP_LIB, GMP_OBJ): New variables. ($(test_module)): Use them. * test/data/emacs-module/mod-test.c: Use mini-gmp if GMP is unavailable.
* | Move definition of Lisp_Module_Function to emacs-module.c.Philipp Stephani2019-04-244-29/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h: Remove include of emacs-module.h. Remove definition of Lisp_Module_Function structure. * src/emacs-module.c (module_function_documentation) (module_function_address): New accessor functions for module function fields. (emacs_subr, struct Lisp_Module_Function): Move from lisp.h. * src/print.c (print_vectorlike): * src/doc.c (Fdocumentation): Use the new accessor functions.
* | Simplify thread initialization and GCPaul Eggert2019-04-245-74/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/lisp.h (PVECHEADERSIZE): New macro. (XSETPVECTYPESIZE): Use it. * src/search.c (syms_of_search): No need to initialize or staticpro last_thing_searched or saved_last_thing_searched, as the thread code arranges for initialization and GC. * src/thread.c (main_thread): Initialize statically. (Fmake_mutex, Fmake_condition_variable, Fmake_thread): Use ALLOCATE_ZEROED_PSEUDOVECTOR rather than zeroing by hand. (mark_one_thread): No need to mark Lisp_Object members. (init_main_thread, init_threads_once): Remove. All uses removed.
* | Fix posn-at-point with line-number display and display propertiesEli Zaretskii2019-04-241-0/+6
| | | | | | | | | | | | * src/xdisp.c (pos_visible_p): Account for line-number display width when CHARPOS is covered by display property that begins at the 2nd display element of a screen line. (Bug#35404)
* | Fix a typo in a recent commitEli Zaretskii2019-04-241-1/+1
| | | | | | | | | | * src/timefns.c (timespec_to_lisp): Fix a typo in function definition.
* | Fix return type of make_time.Philipp Stephani2019-04-243-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | make_time is documented to return a (TICKS . HZ) pair, so we can’t use make_lisp_time. Introduce a new conversion function instead. * src/emacs-module.c (module_make_time): Use timespec_to_lisp to correct return type. * src/timefns.c (timespec_to_lisp): New function. (make_lisp_time): Use it. * test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid): Check return type.
* | Add module functions to convert from and to big integers.Philipp Stephani2019-04-244-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/module-env-27.h: Add new module functions to convert big integers. * src/emacs-module.h.in (emacs_mpz): Define if GMP is available. * src/emacs-module.c (module_extract_big_integer) (module_make_big_integer): New functions. (initialize_environment): Use them. * test/data/emacs-module/mod-test.c (Fmod_test_double): New test function. (emacs_module_init): Define it. * test/src/emacs-module-tests.el (mod-test-double): New unit test. * doc/lispref/internals.texi (Module Values): Document new functions.
* | Add conversions to and from struct timespec to module interface.Philipp Stephani2019-04-243-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Time values are a fundamental data type, and such conversions are hard to implement within modules because of the various forms of time values in Emacs Lisp. Adding dedicated conversion functions can significantly simplify module code dealing with times. This approach uses nanosecond precision. While Emacs in theory has support for higher-precision time values, in practice most languages and standards, such as POSIX, C, Java, and Go, have settled on nanosecond-precision integers to represent time. * src/emacs-module.h.in: Add header for struct timespec. * src/module-env-27.h: Add module functions for time conversion. * src/emacs-module.c (module_extract_time, module_make_time): New functions. (initialize_environment): Use them. * test/data/emacs-module/mod-test.c (Fmod_test_add_nanosecond): New test function. (emacs_module_init): Define it. * test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid) (mod-test-add-nanosecond/nil, mod-test-add-nanosecond/invalid): New unit tests. * doc/lispref/internals.texi (Module Values): Document time conversion functions.
* | Revert "Remove font.c code commented out for a decade"Eli Zaretskii2019-04-241-0/+465
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 64d0cd9810af6bd0c378fc6bc666c76ddfa97e40. Rationale: any font-related code and comments, even if unused for decades, serves as important source of useful information in an area of Emacs code that is notoriously under-documented. Please do NOT remove this stuff until we have an active expert in this are on board, who will then decide whether this can be retired.