aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* More robust NS hex colour string parsingMattias Engdegård2020-06-081-9/+12
| | | | | | | | | | Invalid arguments to color-values, such as "#abcdefg" or "#1234", or valid ones like "#111222333", should not yield nonsense values. * src/nsterm.m (ns_get_color): Only accept "#RGB" strings with 1-4 digits per components, equal number of digits each, and no trailing characters. Parse 12-bit colours correctly.
* Merge from origin/emacs-27Glenn Morris2020-06-072-26/+41
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 35661ef943 (origin/emacs-27) Fix typo in "(elisp) Type Keywords" 1af0e95fec Gnus nnir-summary-line-format has no effect dd366b5d3b Improve documentation of 'window-text-pixel-size' fbd49f969e * src/xdisp.c (Fwindow_text_pixel_size): Doc fix. (Bug#41... d8593fd19f Minor improvements to EDE and EIEIO manuals 3916e63f9e Have Fido mode also imitate Ido mode in ignore-case options cc35b197c7 Update package-menu-quick-help bf09106256 Improve documentation of 'sort-subr' 73749efa13 Update Ukrainian transliteration 30a7ee505a Fix Arabic shaping when eww/shr fill the text to be rendered 7d323f07c0 Silence some byte-compiler warnings in tests cf473e742f * test/lisp/battery-tests.el: New file. b07e3b1d97 Improve format-spec documentation (bug#41571) # Conflicts: # test/lisp/emacs-lisp/package-tests.el
| * * src/xdisp.c (Fwindow_text_pixel_size): Doc fix. (Bug#41737)Eli Zaretskii2020-06-061-25/+35
| |
| * Fix Arabic shaping when eww/shr fill the text to be renderedEli Zaretskii2020-06-051-1/+6
| | | | | | | | | | * src/hbfont.c (hbfont_shape): Don't use DIRECTION if the current buffer has bidi reordering disabled. (Bug#41005)
* | Use 65535 as color-values scale value in the NS backendMattias Engdegård2020-06-071-2/+2
| | | | | | | | | | | | | | * src/nsfns.m (Fxw_color_values): Scale with 65535 instead of 65280, for uniformity with other backends. * lisp/faces.el (color-values): Update doc string. * doc/lispref/frames.texi (Color Names): Update examples.
* | Avoid zero-width glyphs and the resulting cursor artifactsPip Cet2020-06-051-7/+26
| | | | | | | | | | | | | | * src/xdisp.c (fill_gstring_glyph_string): Handle unavailable glyphs. (append_composite_glyph): Mark unavailable glyphs. (gui_produce_glyphs): Make glyphs unavailable for zero-width compositions. (Bug#41645)
* | Streamline live_*_holdingPaul Eggert2020-06-041-124/+148
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (live_string_holding, live_cons_holding, live_symbol_holding) (live_float_p, live_vector_holding): Assert that m->type is correct, instead of testing this at runtime. All callers changed. (live_large_vector_holding, live_small_vector_holding): Now two functions instead of the old live_vector_holding. All callers changed. (live_large_vector_p, live_small_vector_p): Now two functions instead of the old live_vector_p. All callers changed. (mark_maybe_object): Ignore Lisp_Type_Unused0 quickly too, since that cannot possibly be an object. (CHECK_LIVE, CHECK_ALLOCATED_AND_LIVE): New arg MEM_TYPE. All callers changed. (CHECK_ALLOCATED_AND_LIVE_SYMBOL): Simplify by combining GC_CHECK_MARKED_OBJECTS code.
* | Make live_*_p more accuratePaul Eggert2020-06-041-40/+60
| | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (live_string_holding, live_cons_holding) (live_symbol_holding, live_vector_holding): Return a C pointer, not a Lisp_Object. All callers changed. This helps the compiler a bit. (live_string_p, live_cons_p, live_symbol_p, live_vector_p): Require that P point directly at the object, rather than somewhere within the object. This fixes some false positives with valid_lisp_object_p (used only in debugging). (mark_maybe_object): Rely on the new accuracy.
* | Don’t default to Valgrind unless ENABLE_CHECKINGPaul Eggert2020-06-031-2/+3
| | | | | | | | | | | | | | | | | | | | | | * src/alloc.c (USE_VALGRIND): If not defined, don’t default it to 1 unless ENABLE_CHECKING. The Valgrind hooks bloat the garbage collector a bit in production, and there’s no need for them these days if one has a Valgrind suppressions file (which one needs anyway). (mark_maybe_pointer): Use ‘#if USE_VALGRIND’ instead of ‘#ifdef USE_VALGRIND’ for consistency with other uses of USE_VALGRIND. This is in case someone builds with ‘-DENABLE_CHECKING -DUSE_VALGRIND=0’ in CFLAGS.
* | Make color-distance symmetric and more accurateMattias Engdegård2020-06-031-11/+13
| | | | | | | | | | | | | | * src/xfaces.c (color_distance): Don't throw away the low 8 bits of the colours, and make the function symmetric (bug41544) (Fcolor_distance): Add caution about this not being a true metric. * test/src/xfaces-tests.el: New file.
* | Handle mid-gstring face changesPip Cet2020-06-031-0/+1
| | | | | | | | | | * src/xdisp.c (fill_gstring_glyph_string): Don't extend the glyph string past face changes. (Bug#41454)
* | Fix bug in recent byte-code checking hoistPaul Eggert2020-06-021-10/+11
| | | | | | | | | | | | | | | | Problem reported by Daniel Colascione (Bug#41680). * src/lread.c (read1): Check that AREF (tmp, COMPILED_BYTECODE) is a string before subjecting it to STRING_MULTIBYTE. Be more consistent about using AREF in the neighborhood, to help prevent this sort of problem from recurring.
* | Avoid losing composition state in handle_stop_backwardsPip Cet2020-06-021-0/+2
| | | | | | | | | | * src/xdisp.c (handle_stop_backwards): Save composition iterator state across our forward scan. (Bug#41626)
* | ; * src/composite.c (syms_of_composite): Fix last change.Eli Zaretskii2020-06-021-1/+2
| |
* | Fix Arabic composition rulesEli Zaretskii2020-06-021-1/+2
| | | | | | | | | | | | | | | | * lisp/language/misc-lang.el (composition-function-table): Reorder Arabic composition rules in descending order of lookback. * src/composite.c (syms_of_composite): Document the order of rules in 'composition-function-table'.
* | Simplify and regularize some offset tests in alloc.cPaul Eggert2020-06-011-5/+4
| | | | | | | | | | * src/alloc.c (live_string_holding, live_cons_holding) (live_symbol_holding, live_float_p): Simplify and regularize.
* | Merge from origin/emacs-27Paul Eggert2020-06-011-1/+4
|\ \ | |/ | | | | 0260d2d2db Don't call 'mbrtowc' on WINDOWSNT
| * Don't call 'mbrtowc' on WINDOWSNTEli Zaretskii2020-06-011-1/+4
| | | | | | | | | | * src/emacs.c (using_utf8): Don't call 'mbrtowc' on WINDOWSNT systems, as it's not available on Windows 9X.
* | Merge from origin/emacs-27Paul Eggert2020-06-012-34/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 44c0e074f7 * doc/emacs/buffers.texi (Icomplete): Mention icomplete-mi... 68b6dad1d8 Be more aggressive in marking objects during GC 36f508f589 ; * src/xdisp.c (find_last_unchanged_at_beg_row): Fix a typo. cc340da1fe Fix bug #41618 "(byte-compile 'foo) errors when foo is a m... 41232e6797 Avoid crashes due to bidi cache being reset during redisplay f72bb4ce36 * lisp/tab-bar.el (switch-to-buffer-other-tab): Normalize ... d3e0023aaa ; * etc/TODO: Fix formatting. (Bug#41497) a8ad94cd2f Fix mingw.org's MinGW GCC 9 warning about 'execve' # Conflicts: # lisp/tab-bar.el # nt/inc/ms-w32.h # src/alloc.c
| * Be more aggressive in marking objects during GCPaul Eggert2020-05-311-16/+10
| | | | | | | | | | | | | | Simplified version of a patch from Pip Cet (Bug#41321#299). * src/alloc.c (maybe_lisp_pointer): Remove. All uses removed. (mark_memory): Also look at the pointer offset by ‘lispsym’, for symbols.
| * ; * src/xdisp.c (find_last_unchanged_at_beg_row): Fix a typo.Eli Zaretskii2020-05-311-1/+1
| |
| * Avoid crashes due to bidi cache being reset during redisplayEli Zaretskii2020-05-311-0/+2
| | | | | | | | | | | | | | | | | | If automatic character composition triggers GC, and 'garbage-collection-messages' are turned on, we could have the bidi cache reset while processing RTL text, which would then consistently crash. * src/xdisp.c (display_echo_area_1): Protect the bidi cache against changes inside 'try_window'.
* | Unbreak compilation with CHECK_STRUCTS defined.Philipp Stephani2020-05-311-1/+1
| | | | | | | | | | | | * src/pdumper.c (dump_float): Update hash value after commit 9f7bfb6cb06f1480a0904184cabf187e03628e55. The struct layout is still compatible.
* | Protect bidi cache from inadvertent resetsEli Zaretskii2020-05-311-0/+4
| | | | | | | | | | | | | | | | * src/xdisp.c (Fline_pixel_height, Fmove_point_visually): Save and restore the bidi cache, to avoid inadvertently resetting it by starting a new iteration through buffer text. This could cause trouble if these functions are called during a redisplay cycle, especially while we were processing RTL text.
* | Remove private prototype for 'execve' and its uses in MinGW buildEli Zaretskii2020-05-301-0/+3
| | | | | | | | | | | | | | | | | | * src/sysdep.c (emacs_exec_file): Don't compile this function anymore on WINDOWSNT, since it is not used there. This function was the only reason for having 'execve' prototype in ms-w32.h. * nt/inc/ms-w32.h (execve): Remove prototype and the MinGW64 vs ming.org mess that it causes.
* | Another fix of display of line-prefix with fringe bitmapsEli Zaretskii2020-05-291-0/+6
| | | | | | | | | | | | * src/xdisp.c (redisplay_internal): Don't use "optimization 1" if a glyph row from which to start display begins with a display property that draws into the fringes. (Bug#41584)
* | Fix display of line-prefix with fringe bitmapsEli Zaretskii2020-05-291-0/+6
| | | | | | | | | | | | * src/xdisp.c (try_window_id): Don't use this optimization if a glyph row from which to start display begins with a display property that draws into the fringes. (Bug#41584)
* | Document that {en,de}code-coding-string preserve match dataMattias Engdegård2020-05-281-2/+2
| | | | | | | | | | | | | | | | | | | | * lisp/international/mule.el (define-coding-system): Require :pre-write-conversion and :post-read-conversion functions to leave the match data untouched. * src/coding.c (Fdecode_coding_string, Fencode_coding_string): Document functions as match-data-preserving. Suggested by Stefan Monnier (see bug#41445).
* | Merge from origin/emacs-27Glenn Morris2020-05-282-5/+5
|\ \ | |/ | | | | | | | | | | | | | | bd7b681dc4 (origin/emacs-27) Tiny texinfo markup fixes d0dd0e0612 ; Fix more @var/@code mixups in Elisp manual 313dc0439e ; Fix another format-spec typo in the Elisp manual 9d7fd78421 Make next-error behavior a bit more flexible 0691d25295 * etc/NEWS.25: Belatedly announce upcase-dwim and downcase... df91c94ca8 Fix access to single-byte characters in buffer text
| * Fix access to single-byte characters in buffer textEli Zaretskii2020-05-252-5/+5
| | | | | | | | | | | | | | | | | | * src/xdisp.c (get_visually_first_element) (Fbidi_find_overridden_directionality): * src/cmds.c (Fend_of_line): Use FETCH_BYTE instead of FETCH_CHAR, and byte position instead of character position, to access individual bytes of buffer text. This avoids producing invalid characters and accessing wrong buffer positions. (Bug#41520)
* | Fix crash with invalid bytecode vectorsPaul Eggert2020-05-271-0/+4
| | | | | | | | | | | | * src/lread.c (read_vector): If the vector is to short to be for bytecodes don’t do bytecode processing for it, as the processing might run past the end of the vector.
* | --with-wide-int is a no-op on 64-bit hostsPaul Eggert2020-05-271-1/+1
| | | | | | | | | | | | * configure.ac: Clarify wording for --with-wide-int help. * src/pdumper.c (dump_vectorlike_generic): Do the eassert even if --with-wide-int was specified unnecessarily.
* | Omit unnecessary USE_LAB_TAG #ifPaul Eggert2020-05-271-6/+0
| | | | | | | | * src/lisp.h: Omit unnecessary #if; the condition is always false now.
* | Tweak GC performance if !USE_LSB_TAGPaul Eggert2020-05-261-2/+19
| | | | | | | | | | | | Performance issue reported by Eli Zaretskii (Bug#41321#149). * src/alloc.c (GC_OBJECT_ALIGNMENT_MINIMUM): New constant. (maybe_lisp_pointer): Use it instead of GCALIGNMENT.
* | Port struct Lisp_FLoat to oddball platformsPaul Eggert2020-05-261-1/+3
| | | | | | | | | | | | | | | | | | | | * src/lisp.h (struct Lisp_Float): Declare via GCALIGNED_UNION_MEMBER, not via GCALIGNED_STRUCT, since alloc.c creates these in arrays and GCALIGNED_STRUCT does not necessarily suffice to align struct Lisp_Float when it’s used in an array. This avoids undefined behavior on oddball machines where sizeof (struct Lisp_Float) is not a multiple of 8 and the compiler does not support __attribute__ ((aligned 8)).
* | Move union emacs_align_type to alloc.cPaul Eggert2020-05-252-41/+41
| | | | | | | | | | | | * src/alloc.c (union emacs_align_type): Move to here ... * src/lisp.h: ... from here, and uncomment out some of the types that alloc.c can see but lisp.h cannot.
* | Further fix for aborts due to GC losing pseudovectorsPaul Eggert2020-05-252-19/+58
| | | | | | | | | | | | | | | | | | * src/alloc.c (MALLOC_ALIGNMENT_BOUND): Remove. (LISP_ALIGNMENT): Go back to yesterday’s version, except use union emacs_align_type instead of max_align_t. (MALLOC_IS_LISP_ALIGNED): Go back to yesterday’s version. (maybe_lisp_pointer): Check against GCALIGNMENT, not LISP_ALIGNMENT. * src/lisp.h (union emacs_align_type): Bring back.
* | Refix aborts due to GC losing pseudovectorsPaul Eggert2020-05-252-61/+14
| | | | | | | | | | | | | | | | | | | | | | This is simpler, and fixes a bug in the previous fix. * src/alloc.c (MALLOC_ALIGNMENT_BOUND): Simplify by using max_align_t, since the buggy implementations won’t break this simpler implementation. (LISP_ALIGNMENT): Simplify by just using GCALIGNMENT, since the fancier implementation wasn’t correct anyway, and fixing it isn’t worth the trouble on practical platforms. * src/lisp.h (union emacs_align_type): Remove.
* | Fix aborts due to GC losing pseudovectorsPaul Eggert2020-05-253-29/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem reported by Eli Zaretskii (Bug#41321). * src/alloc.c (MALLOC_ALIGNMENT_BOUND): New constant. (LISP_ALIGNMENT): Lower it to avoid crashes on MinGW and similarly buggy platforms where malloc returns pointers not aligned to alignof (max_align_t). But keep it higher on platforms where this is known to work, as it helps GC performance. (MALLOC_IS_LISP_ALIGNED): Define in terms of the other two. * src/alloc.c (stacktop_sentry): * src/thread.c (run_thread): Don’t overalign or oversize stack sentries; they need to be aligned only for pointers and Lisp_Object, not for arbitrary pseudovector contents. * src/lisp.h (union emacs_align_type): New type, used for LISP_ALIGNMENT.
* | Fix segfault on closing frame with tooltip (Bug#41239)Noam Postavsky2020-05-241-2/+7
| | | | | | | | | | * src/gtkutil.c (xg_free_frame_widgets): Empty and unreference the tooltip widget before destroying its label.
* | Restore check for Emacs 20.2 bytecodesPaul Eggert2020-05-231-1/+13
| | | | | | | | | | | | * src/eval.c (Ffetch_bytecode): Check for multibyte bytecodes here too. Problem reported by Stefan Monnier in: https://lists.gnu.org/r/emacs-devel/2020-05/msg02876.html
* | Merge from origin/emacs-27Glenn Morris2020-05-231-1/+11
|\ \ | |/ | | | | | | | | | | | | | | d6a0b66a0c (origin/emacs-27) * lisp/subr.el (save-match-data): Clarif... 1a6d59eeba Improve the documentation of setting up fontsets c7737d40f2 ; * etc/TODO (Ligatures): Update the entry based on recent... fb2e34cd21 ; * etc/TODO (Ligatures): Update the entry based on recent... 13b6dfd4f7 * doc/emacs/killing.texi (Rectangles): Improve indexing. a10254dd46 Fix accessing files on networked drives on MS-Windows
| * Fix accessing files on networked drives on MS-WindowsEli Zaretskii2020-05-231-1/+11
| | | | | | | | | | * src/w32.c (acl_get_file): Set errno to ENOTSUP if get_file_security returns ERROR_NOT_SUPPORTED. (Bug#41463)
| * Redo RCS Id for pdumperPaul Eggert2020-05-211-0/+5
| | | | | | | | | | | | | | | | * lisp/version.el: Don’t put an RCS Id style string into the executable via purecopy, as this does not work with the pdumper. * src/emacs.c (RCS_Id): New constant, for 'ident'. (cherry picked from commit 3d1bcfba5e21b29be8669aa2a8f27b344c9e02fd)
* | ; src/alloc.c: Add a GC reg spill mechanism and Bug#41357 related commentary.Andrea Corallo2020-05-201-3/+17
| |
* | Hoist some byte-code checking out of evalPaul Eggert2020-05-195-72/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Check Lisp_Compiled objects better as they’re created, so that the byte-code interpreter needn’t do the checks each time it executes them. This improved performance of ‘make compile-always’ by 1.5% on my platform. Also, improve the quality of the (still-incomplete) checks, as this is more practical now that they’re done less often. * src/alloc.c (make_byte_code): Remove. All uses removed. (Fmake_byte_code): Put a better (though still incomplete) check here instead. Simplify by using Fvector instead of make_uninit_vector followed by memcpy, and by using XSETPVECTYPE instead of make_byte_code followed by XSETCOMPILED. * src/bytecode.c (Fbyte_code): Do sanity check and conditional translation to unibyte here instead of each time the function is executed. (exec_byte_code): Omit no-longer-necessary sanity and unibyte checking. Use SCHARS instead of SBYTES where either will do, as SCHARS is faster. * src/eval.c (fetch_and_exec_byte_code): New function. (funcall_lambda): Use it. (funcall_lambda, lambda_arity, Ffetch_bytecode): Omit no-longer-necessary sanity checks. (Ffetch_bytecode): Add sanity check if actually fetching. * src/lisp.h (XSETCOMPILED): Remove. All uses removed. * src/lread.c (read1): Check byte-code objects more thoroughly, albeit still incompletely, and do translation to unibyte here instead of each time the function is executed. (read1): Use XSETPVECYPE instead of make_byte_code. (read_vector): Omit no-longer-necessary sanity check.
* | Reject attempts to clear pure stringsPaul Eggert2020-05-181-19/+32
| | | | | | | | | | | | * src/fns.c (Ffillarray, Fclear_string): Add CHECK_IMPURE here, to be consistent with Faset etc. (Ffillarray): Prefer memset when the fill is a single byte.
* | Redo RCS Id for pdumperPaul Eggert2020-05-181-0/+5
| | | | | | | | | | | | * lisp/version.el: Don’t put an RCS Id style string into the executable via purecopy, as this does not work with the pdumper. * src/emacs.c (RCS_Id): New constant, for 'ident'.
* | Restore buffer-undo-list to buffer-local-variablesGlenn Morris2020-05-181-10/+30
| | | | | | | | | | | | | | | | It has been missing since 2012-07-03 (Emacs 24.3) "Cleanup basic buffer management", when undo_list was moved to the end of struct buffer. (Bug#33492) * src/buffer.c (buffer_local_variables_1): New function. (Fbuffer_local_variables): Explicitly add buffer-undo-list.
* | * Fix Garbage Collector for missing calle-saved regs content (Bug#41357)Andrea Corallo2020-05-172-4/+10
| | | | | | | | | | | | | | | | | | * src/alloc.c (SET_STACK_TOP_ADDRESS): Do not call __builtin_unwind_init. (flush_stack_call_func1): Rename from 'flush_stack_call_func'. (flush_stack_call_func): New function to spill all registers before calling 'flush_stack_call_func1'. This to make sure the top of the stack identified includes those registers.