1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-30 19:53:09 +00:00
Commit Graph

136376 Commits

Author SHA1 Message Date
Alexander Gramiak
02397678b1 Rename x_highlight_frame property to highlight_frame
* src/nsterm.h:
* src/nsterm.m:
* src/w32term.c:
* src/w32term.h:
* src/xdisp.c:
* src/xterm.c:
* src/xterm.h: Rename.
2019-04-26 16:55:39 -06:00
Alexander Gramiak
46cfe5cb1f Check for existence of terminal hooks before use
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.
2019-04-26 16:55:39 -06:00
Alexander Gramiak
5d8b0fadee Add terminal hook query_frame_background_color
* 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.
2019-04-26 16:55:39 -06:00
Alexander Gramiak
41e20ee4bc Add terminal hook defined_color_hook
* 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.
2019-04-26 16:55:39 -06:00
Alexander Gramiak
a411517faf Rename generic x_* identifiers
* 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.
2019-04-26 16:54:17 -06:00
Alexander Gramiak
da9541dd10 Add prefixes to some window system-dependent procedures
* 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.
2019-04-26 16:10:49 -06:00
Alexander Gramiak
ff4e31fa32 Rename generic x_* procedures in xdisp.c
* 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.
2019-04-26 16:10:49 -06:00
Charles A. Roelli
0e8d452c1c ; * doc/lispref/nonascii.texi (Coding System Basics): Fix grammar. 2019-04-26 21:49:46 +02:00
Eli Zaretskii
86b6e91091 Avoid assertion violations in calculating line-number width
* src/indent.c (line_number_display_width): Don't use the
window's start marker if it belongs to a different buffer.
(Bug#35429)
2019-04-26 22:40:54 +03:00
Stefan Monnier
82fc8ca6ba * lib-src/profile.c: Delete long-obsolete file
This auxiliary executable was used by the old `profile.el` which later
inspired `elp.el`.  It was made obsolete when Emacs acquired native timers.

* lib-src/Makefile.in (UTILITIES): Remove profile.
(profile${EXEEXT}): Delete rule.
2019-04-26 08:54:02 -04:00
Michael Albinus
cc70501a3a Handle quoted file names in tramp-archive.el
* lisp/net/tramp-archive.el (tramp-archive-file-name-p):
Suppress quoted file names.
(tramp-archive-file-name-handler): Handle quoted file names.

* lisp/net/tramp-compat.el (tramp-compat-file-name-quoted-p):
Add optional TOP argument.
2019-04-26 12:31:50 +02:00
Eli Zaretskii
83cdf7bf15 Avoid compiler warning in dynlib.c
* 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.
2019-04-26 10:39:24 +03:00
Glenn Morris
a241e45b5a * test/lisp/progmodes/sql-tests.el (sql-tests-buffer-naming-harness):
Fix previous for TEST_LOAD_EL=no.
2019-04-25 22:06:34 -04:00
Alan Mackenzie
a0bb2588b8 Fix the formatting of '\' (including apostrophes) in CC Mode.
In particular, the second apostrophe must also get font-lock-warning-face.

* lisp/progmodes/cc-mode.el (c-parse-quotes-before-change)
(c-parse-quotes-after-change): Add cond arms to recognize and handle the
anomalous construct '\'.  Correct the handling of c-new-BEG in
c-parse-quotes-before-change.
2019-04-26 01:15:00 +00:00
Glenn Morris
8082291773 * test/lisp/progmodes/sql-tests.el (sql-tests-buffer-naming-harness):
Skip if no sqlite program.
2019-04-25 19:53:02 -04:00
Stephen Leake
1486eadf7c Fix Bug#33618; define search path variables for grep, byte-compile
* etc/NEWS: Mention new variables.

* lisp/emacs-lisp/bytecomp.el (emacs-lisp-compilation-search-path): New.

* lisp/progmodes/grep.el (grep-search-path): New.
2019-04-25 15:49:38 -07:00
Michael Albinus
25a2ff72d0 ; Add missing space in custom.texi 2019-04-25 22:49:03 +02:00
Paul Eggert
83b0fc30d4 Minor tweaks to recent UBSan-related fix
* 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.
2019-04-25 13:47:27 -07:00
Paul Eggert
69947311d8 Port to Oracle Developer Studio 12.6
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.
2019-04-25 13:23:07 -07:00
Stefan Monnier
ca99c00f75 * lisp/simple.el (eval-expression): Fix paren typo. 2019-04-25 15:34:27 -04:00
Philipp Stephani
fe6c507f5c Make sure that ‘sdata’ objects in ‘sblock’ objects are aligned.
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.
2019-04-25 21:30:12 +02:00
Stefan Monnier
e08e0880f9 Use lexical-binding by default for M-:, --eval, and *scratch*
* lisp/startup.el (command-line): Default to lexical-binding in *scratch*.
(normal-no-mouse-startup-screen, command-line-1):
Use startup--get-buffer-create-scratch.
(command-line-1):
* lisp/simple.el (eval-expression):
* lisp/server.el (server-eval-and-print): Use lexical-binding to
evaluate the expression.
(server-execute): Use startup--get-buffer-create-scratch.
* lisp/ielm.el (inferior-emacs-lisp-mode): Default to lexical-binding.
2019-04-25 14:36:03 -04:00
Alan Mackenzie
0c2d921a75 Restore fontification of delimiters of multiline CC Mode strings.
E.g., on typing the closing delimiter of a string continued onto a second
line, the opening delimiter retained its font-lock-warning-face.

* lisp/progmodes/cc-defs.el (c-c++-raw-string-opener-re)
(c-c++-raw-string-opener-1-re): New constants.
(c-sub-at-c++-raw-string-opener, c-at-c++-raw-string-opener): New macros.

* lisp/progmodes/cc-engine.el (c-raw-string-pos)
(c-depropertize-raw-strings-in-region, c-after-change-unmark-raw-strings):
Replace uses of open-coded raw string regexps by the new constants and macros
in cc-defs.el.

* lisp/progmodes/cc-fonts.el (c-font-lock-raw-strings): Ditto

* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings): Set
c-new-BEG to the beginning of the string when we encounter its closing ".
When not in a raw string, but in a string, clear syntax-table properties from
its delimiters and set c-new-BEG/END to its limits.
(c-after-change-mark-abnormal-strings): When applying syntax-table properties
to string delimiters, also set c-new-BEG/END to ensure subsequent
fontification.
2019-04-25 18:00:15 +00:00
Stephen Berman
6d8e0fc5aa Make wdired-mode ignore ls file indicators
* lisp/wdired.el (wdired--restore-dired-filename-prop): When
dired-listing-switches includes "F" or "classify", don't treat
appended indicator characters as part of the file name (bug#34915).

* test/lisp/wdired-tests.el (wdired-test-bug34915): New test.
2019-04-25 19:17:23 +02:00
Paul Eggert
30030945c3 Port emacsclient euidaccess to Solaris 10
Without this fix, linking emacsclient fails with ‘Undefined
symbol eaccess’ on Solaris 10 sparc.
* lib-src/Makefile.in (LIB_EACCESS): New macro.
(emacsclient${EXEEXT}, emacsclientw${EXEEXT}): Use it.
2019-04-25 08:51:19 -07:00
Alan Mackenzie
efb8921a57 Fix some corner cases in the recognition of C++ raw strings.
These are where changing the identifier in a raw string delimiter causes
different delimiters to match eachother.

* lisp/progmodes/cc-engine.el (c-raw-string-end-delim-disrupted): New
variable.
(c-before-change-check-raw-strings): Use new variable.
(c-after-change-unmark-raw-strings): When typing into an opening delimiter or
altering its close delimiter causes the opening delimiter to match a later
closing delimiter, clear all syntax-table char properties from the opening
delimiter onwards, and set c-new-END to point max.  Also, when changing a
closing delimiter, check whether its new value matches a previously open
opening delimiter earlier in the buffer, and amend the syntax-table text
properties appropriately.
2019-04-25 15:18:12 +00:00
Michael R. Mauger
a1386fa6a7 * lisp/progmodes/sql.el
(sql-is-sqli-buffer-p): New function.
(sql-generate-unique-sqli-buffer-name): Refactor and use it.
(sql-product-interactive): Simplify name logic.
* test/lisp/progmodes/sql-tests.el
(sql-tests-placeholder-filter-harness): New macro.
(sql-tests-placeholder-filter-simple)
(sql-tests-placeholder-filter-ampersand)
(sql-tests-placeholder-filter-period): Refactored tests and use macro.
(sql-tests-buffer-naming-harness): New macro.
(sql-tests-buffer-naming-default)
(sql-tests-buffer-naming-multiple)
(sql-tests-buffer-naming-explicit)
(sql-tests-buffer-naming-universal-argument)
(sql-tests-buffer-naming-existing): New tests.
2019-04-24 20:59:25 -04:00
Paul Eggert
2bf957394c Improve port to platforms lacking euidaccess (Bug#35406)
* lib-src/emacsclient.c (set_local_socket):
Use faccessat with AT_EACCESS instead of using euidaccess.
* admin/merge-gnulib, lib/gnulib.mk.in, m4/gnulib-comp.m4:
Revert previous change.
2019-04-24 17:42:09 -07:00
Paul Eggert
445713f555 Port to platforms lacking euidaccess (Bug#35406)
* admin/merge-gnulib (GNULIB_MODULES): Add euidaccess.
* lib/gnulib.mk.in, m4/gnulib-comp.m4: Regenerate.
2019-04-24 17:34:32 -07:00
Paul Eggert
41cc2b6490 Merge from gnulib 2019-04-24 17:34:32 -07:00
Mark Oteiza
4494789d2c Fix some strings in wordstar mode
* lisp/obsolete/ws-mode.el (ws-search-direction, ws-error, ws-end-block):
(ws-mark-word, ws-undo, ws-goto-last-cursorposition, ws-last-error):
(ws-kill-bol): Remove full stops from message string endings.  Minor
formatting tweaks.
2019-04-24 19:44:48 -04:00
Mark Oteiza
cb17e9c42e Change WordStar emulation into a minor mode (Bug#35148)
* lisp/obsolete/ws-mode.el: Turn on lexical-binding.  Update commentary.
(wordstar): New custom group.
(wordstar-mode-lighter): New custom variable.
(wordstar-mode): Declare with define-minor-mode.
(turn-on-wordstar-mode): New function.
(global-wordstar-mode): New function.  Use previous new function.
2019-04-24 19:38:20 -04:00
Dmitry Gutov
f0e026a849 Fix project-find-regexp search for '--'
* lisp/progmodes/project.el (project--find-regexp-in-files):
Add an explicit '-e' before the pattern.  Fixing the ability to
search for '--'.  Reported by Juri Linkov <juri@linkov.net>.
2019-04-25 02:26:45 +03:00
Juri Linkov
62072bad41 * lisp/windmove.el (windmove-display-in-direction): Support consecutive calls
Remember action and delete it from display-buffer-overriding-action afterwards
2019-04-25 00:40:27 +03:00
Philipp Stephani
4eb7f9ef59 Unbreak build when building without GMP support.
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.
2019-04-24 23:27:43 +02:00
Philipp Stephani
553220fca6 Add missing GMP library to test module.
* test/Makefile.in (GMP_LIB): Define variable.
($(test_module)): Use it.
2019-04-24 23:14:13 +02:00
Philipp Stephani
d2e1bac478 Move definition of Lisp_Module_Function to emacs-module.c.
* 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.
2019-04-24 23:12:35 +02:00
Paul Eggert
4c90369d77 Simplify thread initialization and GC
* 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.
2019-04-24 13:37:15 -07:00
Eli Zaretskii
c5358e831f Regenerate src/emacs-module.h when emacs-module.h.in changes
* Makefile.in (CONFIG_STATUS_FILES_IN): Add
src/emacs-module.h.in.
2019-04-24 18:38:31 +03:00
Eli Zaretskii
2b3c0ae582 Fix rescheduling timers after suspension
* lisp/emacs-lisp/timer.el (timer-event-handler): Fix the
comparison between next invocation time and current time.
2019-04-24 18:13:04 +03:00
Eli Zaretskii
f6e6c1744b Fix posn-at-point with line-number display and display properties
* 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)
2019-04-24 15:26:54 +03:00
Eli Zaretskii
a2e9d3e335 Fix a typo in a recent commit
* src/timefns.c (timespec_to_lisp): Fix a typo in function
definition.
2019-04-24 15:18:18 +03:00
Philipp Stephani
b6d8d34aed * doc/lispref/internals.texi (Module Values): Add a GMP example 2019-04-24 13:54:54 +02:00
Philipp Stephani
c4bacb1215 Clarify rounding mode when converting to struct timespec.
* doc/lispref/internals.texi (Module Values): Clarify that the
truncation is towards negative infinity.

* test/data/emacs-module/mod-test.c (Fmod_test_nanoseconds): Add test
function.
(emacs_module_init): Define it.

* test/src/emacs-module-tests.el (mod-test-nanoseconds): New unit test.
2019-04-24 13:41:05 +02:00
Philipp Stephani
534c33cf37 Fix return type of make_time.
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.
2019-04-24 13:17:53 +02:00
Philipp Stephani
e290a7d173 Add module functions to convert from and to big integers.
* 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.
2019-04-24 12:53:54 +02:00
Philipp Stephani
bffceab633 Add conversions to and from struct timespec to module interface.
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.
2019-04-24 11:33:52 +02:00
Eli Zaretskii
5ae407aad4 Revert "Remove font.c code commented out for a decade"
This reverts commit 64d0cd9810.

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.
2019-04-24 09:38:03 +03:00
YAMAMOTO Mitsuharu
5f4e8e2e08 Don't link libXft when using cairo
* configure.ac: Check cairo early.  Don't try Xft if cairo is used.
* lwlib/lwlib-utils.h [USE_CAIRO]: Include cairo.h and fontconfig.h.
(XftFont, XftDraw, XftColor, XGlyphInfo) [USE_CAIRO]: New typedefs.
(XftFontOpenName, XftFontClose, XftDrawCreate, XftDrawDestroy)
(XftDrawRect, XftDrawStringUtf8, XftTextExtentsUtf8) [USE_CAIRO]: New macros.
(crxft_font_open_name, crxft_font_close, crxft_draw_create)
(crxft_draw_rect, crxft_draw_string, crxft_text_extents) [USE_CAIRO]: New
externs.
* lwlib/lwlib-utils.c [USE_CAIRO]: Include math.h, cairo-ft.h, and
cairo-xlib.h.
(crxft_font_open_name, crxft_font_close, crxft_draw_create)
(crxft_set_source_color, crxft_draw_rect, crxft_draw_string)
(crxft_text_extents) [USE_CAIRO]: New Xft compatibility functions.
* lwlib/xlwmenuP.h [USE_CAIRO]: Include lwlib-utils.h.
* lwlib/xlwmenu.c (display_menu_item) [USE_CAIRO]: Call
cairo_surface_mark_dirty and cairo_surface_flush.
* lwlib/lwlib-Xaw.c [USE_CAIRO]: Include stdlib.h and lwlib-utils.h.
(draw_text) [USE_CAIRO]: Call cairo_surface_flush.
* src/xsettings.c [USE_CAIRO]: Include fontconfig.h
(apply_xft_settings) [!HAVE_XFT]: Don't call XftDefaultSubstitute or
XftDefaultSet.
* lwlib/lwlib-Xaw.c:
* lwlib/lwlib-int.h:
* lwlib/xlwmenu.c:
* lwlib/xlwmenuP.h:
* src/xrdb.c:
* src/xsettings.c:
* src/xterm.c: Replace all #ifdef HAVE_XFT with #if defined USE_CAIRO ||
defined HAVE_XFT.
* src/xfns.c (x_default_font_parameter): Replace #ifdef HAVE_XFT with #if
defined	USE_CAIRO || defined HAVE_XFT.
2019-04-24 12:31:37 +09:00
Stefan Monnier
1828e9a9b7 * lisp/emacs-lisp/timer-list.el: Fix header-line alignment
Enable lexical-binding.
(cl-print-compiled, cl-print-compiled-button): Declare.
(timer-list-mode): Add spacing to align the header.
2019-04-23 17:54:13 -04:00