aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | Merge from origin/emacs-27Glenn Morris2020-05-162-4/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | b4937f64cd (origin/emacs-27) Improve documentation of manually instal... efd4e973a4 Reflect the emacs-devel ELPA/MELPA dispute in FAQ 28541674cd Consider face inheritance when checking region face backgr... e75f6be6cc Fix dired default file operation (bug#41261) 406fb0746c Fix documentation related to 'command-switch-alist'. 747e0a2523 Improve ediff readability in misterioso theme (Bug#41221) 48830c73e7 Fix a crash in handle_display_spec a37290a6f9 In x_hide_tip reset tip_last_frame for GTK+ tooltips only ... 3d81995692 Fix docstring of flymake-make-diagnostic (bug#40351) 632aa9d57a Go back to “Bahá’í” e2406ff60f * lisp/dired.el (dired-toggle-marks): Doc fix. (Bug#41097) # Conflicts: # doc/emacs/building.texi
| * Fix a crash in handle_display_specClément Pit-Claudel2020-05-131-1/+1
| | | | | | | | | | * src/xdisp.c (handle_display_spec): Check that the cdr of the disable-eval spec is a cons before taking its car. (Bug#41232)
| * In x_hide_tip reset tip_last_frame for GTK+ tooltips only (Bug#41200)Martin Rudalics2020-05-131-3/+5
| | | | | | | | | | * src/xfns.c (x_hide_tip): Reset tip_last_frame only when using GTK+ system tooltips (Bug#41200).
* | Pacify GCC 10.1.0Paul Eggert2020-05-117-10/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pacify GCC 10.1.0 so that it does not issue false alarms when Emacs is configured with --enable-gcc-warnings. * src/dispnew.c (clear_glyph_row): * src/fns.c (hash_clear): * src/keyboard.c (append_tab_bar_item): * src/lisp.h (vcopy): * src/xfaces.c (get_lface_attributes_no_remap) (Finternal_copy_lisp_face, realize_default_face): * src/xmenu.c (set_frame_menubar): Work around -Warray-bounds false alarm in GCC 10.1.0. * src/intervals.c (copy_properties): Avoid -Wnull-dereference false alarm in GCC 10.1.0. * src/lisp.h (xvector_contents_addr, xvector_contents): New functions, useful for working around GCC bug 95072.
* | * src/xdisp.c (Fwindow_text_pixel_size): Fix previous merge.Glenn Morris2020-05-091-4/+4
| |
* | Merge from origin/emacs-27Glenn Morris2020-05-091-19/+47
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | be0d1cac83 (origin/emacs-27) Small fix for type of 'display-fill-colu... c5e5839776 Fix customization of 'display-fill-column-indicator-charac... d5c184aa3e Refer to fill column indicator Info node in some places. e13300ae50 Merge branch 'emacs-27' of git.sv.gnu.org:/srv/git/emacs i... 0bae57033f Fix GTK's Tool Bar menu radio buttons 4c98aa7ea5 Minor clarifications in NEWS a1cbd05f38 Improve documentation of 'with-suppressed-warnings'. 4a895c1b26 Fix a typo in a comment 2caf3e997e Improve documentation of Hi Lock mode 7081c1d66f Fix typos in the Emacs user manual 0385771e2f Fix references to Speedbar in VHDL mode a76cafea0d Fix handling of FROM = t and TO = t by 'window-text-pixel-... # Conflicts: # etc/NEWS # src/xdisp.c
| * Refer to fill column indicator Info node in some places.Philipp Stephani2020-05-091-3/+6
| | | | | | | | | | | | | | | | * src/xdisp.c (syms_of_xdisp): Add reference to manual in documentation strings for variables related to fill column indicators. * lisp/display-fill-column-indicator.el (display-fill-column-indicator) (display-fill-column-indicator-mode): Add reference to manual.
| * Fix handling of FROM = t and TO = t by 'window-text-pixel-size'Eli Zaretskii2020-05-081-15/+38
| | | | | | | | | | * src/xdisp.c (Fwindow_text_pixel_size): Use byte position for accessing buffer text, not character positions. (Bug#41125)
* | Improve nonnull checking with GCC in emacs-modulePaul Eggert2020-05-091-6/+10
| | | | | | | | | | | | * src/emacs-module.h.in (EMACS_ATTRIBUTE_NONNULL): Also do the nonnull check with GCC. (The old code did the check with Clang but not with GCC.)
* | Prevent hanging in next-single-char-property-changeFederico Tedin2020-05-091-5/+7
| | | | | | | | | | | | | | * src/textprop.c (Fnext_single_char_property_change): Clarify in the doc string the behavior when LIMIT is past the end of OBJECT. Stop the search when position gets to end of buffer, for when LIMIT is beyond that. (Bug#40000)
* | Pacify buggy old GCC with a castPaul Eggert2020-05-061-1/+2
| | | | | | | | | | | | * src/bignum.h (bignum_integer): Pacify GCC 4.8.5. Problem reported by Andreas Schwab in: https://lists.gnu.org/r/emacs-devel/2020-05/msg00781.html
* | Merge from origin/emacs-27Glenn Morris2020-05-061-1/+1
|\ \ | |/ | | | | | | | | 7be160d800 Improve "Help Summary" section in user manual f6d6ccc984 Clarify message-sendmail-extra-arguments docstring 95fde1a851 * src/editfns.c (Fformat): Small documentation fix.
| * * src/editfns.c (Fformat): Small documentation fix.Philipp Stephani2020-05-051-1/+1
| |
* | Merge from origin/emacs-27Glenn Morris2020-05-061-4/+16
|\ \ | |/ | | | | f9fa726ced Improve doc strings of makunbound and fmakunbound
| * Improve doc strings of makunbound and fmakunboundStefan Kangas2020-05-031-4/+16
| | | | | | | | | | * src/data.c (Fmakunbound, Ffmakunbound): Improve doc strings. (Bug#41026)
* | Don’t assume __has_attribute in emacs-module.cPaul Eggert2020-05-051-1/+1
| | | | | | | | | | | | | | Problem reported by Glenn Morris in: https://lists.gnu.org/r/emacs-devel/2020-05/msg00724.html * src/emacs-module.c: Use HAS_ATTRIBUTE instead of assuming the compiler supports __has_attribute.
* | Fix typos in recent attribute.h simplificationPaul Eggert2020-05-051-4/+5
| | | | | | | | | | | | | | | | | | Problem reported by Andreas Schwab in: https://lists.gnu.org/r/emacs-devel/2020-05/msg00650.html * src/conf_post.h (HAS_ATTR_no_sanitize): Define to false in case cpp is picky, fixing a longstanding glitch here. (ATTRIBUTE_NO_SANITIZE_ADDRESS, ATTRIBUTE_NO_SANITIZE_UNDEFINED): Use HAS_ATTRIBUTE, not __has_attribute.
* | Simplify by using attribute.h macrosPaul Eggert2020-05-032-84/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | attribute.h is partly designed for C2X forward compatibility, since C2X will add some standard attributes. Using its macros should help insulate Emacs from C2X teething problems. * src/conf_post.h: Include attribute.h. (HAS_ATTRIBUTE, HAS_FEATURE): Rename from __has_attribute and __has_feature, to avoid polluting the builtin namespace. All uses changed. (ATTRIBUTE_COLD, ATTRIBUTE_FORMAT, FALLTHROUGH, ATTRIBUTE_CONST) (ATTRIBUTE_PURE, ATTRIBUTE_UNUSED, ATTRIBUTE_MAY_ALIAS) (ATTRIBUTE_MALLOC, ATTRIBUTE_ALLOC_SIZE) (ATTRIBUTE_RETURNS_NONNULL): Remove, as attribute.h does this now. (NO_INLINE, EXTERNALLY_VISIBLE, ARG_NONNULL, ATTRIBUTE_UNUSED): Simplify by defining in terms of attribute.h macros. * src/systhread.h (ATTRIBUTE_WARN_UNUSED_RESULT): Remove. All uses replaced by attribute.h’s NODISCARD.
* | Fix initial frame resizing issue on NS (bug#40200)Alan Third2020-05-031-30/+21
| | | | | | | | | | * src/nsterm.m ([EmacsView viewDidResize:]): Don't try to determine the old size when not drawing to the buffer.
* | Merge from origin/emacs-27Glenn Morris2020-05-031-28/+28
|\ \ | |/ | | | | | | | | 1f17193e00 Expand file name for remote dirs as well 7a12ab5ea2 Fix project.el commands in "transient" projects 274ec97e3c Make sure alist-related functions say so in their doc
| * Make sure alist-related functions say so in their docEli Zaretskii2020-04-291-28/+28
| | | | | | | | | | * src/fns.c (Fassq, assq_no_quit, Fassoc, assoc_no_quit, Frassq) (Frassoc): Rename argument LIST to ALIST. Doc strings updated.
* | Improve accuracy of apropos commands that search doc stringsEli Zaretskii2020-05-031-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is conceptually wrong for apropos commands that search doc strings to look for matches of several words only on the same line, because division of doc strings between lines is ephemeral. * lisp/apropos.el (apropos-parse-pattern): Accept an optional argument MULTILINE-P, and if that is non-nil, produce regexps that match words in the list even if they are separated by line boundaries. (apropos-value, apropos-local-value, apropos-documentation): Use the new optional argument in apropos commands that search multiline text, such as doc strings. * src/search.c (Fposix_looking_at, Fposix_string_match) (Fposix_search_backward, Fposix_search_forward): Make sure Posix appears in the doc strings near REGEXP, for better matches.
* | Merge from origin/emacs-27Glenn Morris2020-04-291-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2f9bfaef21 (origin/emacs-27) ; Fix last change 520fd3e728 * lisp/env.el (substitute-env-vars): Doc fix. (Bug#40948) 85544f8ef5 * lisp/isearch.el: Fix lazy-highlighting and lazy-counting... d83cc05a73 Fix error in ERC when 'erc-server-coding-system' is custom... 16fed05ba8 Avoid crashes on TTY frames with over-long compositions 0278741676 Fix typo in custom.texi 9f5ae717fb * test/lisp/simple-tests.el (with-shell-command-dont-erase... 1f76a16ed3 * lisp/image-mode.el (image-mode-map): Update menu items. f0e1bf56f0 Fix bugs in tab-bar and tab-line and mention remaining fea... f0b9f18457 Make shell-command tests fit for tcsh. 68f4a740a1 Remove doc duplication ac31cd384c * etc/NEWS: Fix inconsistencies. # Conflicts: # etc/NEWS
| * Avoid crashes on TTY frames with over-long compositionsEli Zaretskii2020-04-281-1/+1
| | | | | | | | | | | | | | | | * src/term.c (encode_terminal_code): Each character from an automatic composition is a multibyte character, so its multibyte representation can take up to MAX_MULTIBYTE_LENGTH bytes. Account for that when allocating storage for characters to be encoded. (Bug#40913)
* | Improve multibyte_length performancePaul Eggert2020-04-271-21/+21
| | | | | | | | | | | | | | * src/character.h (multibyte_length): Merge tests so that there are fewer conditional branches. This improved CPU speed of ‘make compile-always’ by about 1.5% on my platform.
* | Simplify string-to-charPaul Eggert2020-04-261-12/+6
| | | | | | | | | | | | | | | | | | * src/editfns.c (Fstring_to_char): Simplify. * src/editfns.c (Fstring_to_char): Simplify. This tweak improved the CPU time performance of ‘make compile-always’ by about 1.8% on my platform.
* | Improve string_char_and_length speedPaul Eggert2020-04-262-65/+27
| | | | | | | | | | | | | | | | | | This tweak improved the CPU time performance of ‘make compile-always’ by about 1.7% on my platform. * src/character.c (string_char): Remove; no longer used. * src/character.h (string_char_and_length): Redo so that it needn’t call string_char. This helps the caller, which can now become a leaf function.
* | Inline a couple of functions that were macrosPaul Eggert2020-04-252-2/+2
| | | | | | | | | | | | | | | | This reclaims a bit of performance when compiling with gcc -Og. These functions were macros until I changed them in 2020-04-17T14:57:25Z!eggert@cs.ucla.edu. * src/casefiddle.c (make_char_unibyte): * src/ccl.c (GET_TRANSLATION_TABLE): Now inline.
* | Merge from origin/emacs-27Glenn Morris2020-04-251-95/+176
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 45a64c97c7 (origin/emacs-27) Clarify semantics of trace-function CONT... 821760fdc4 Don't let a code literal get modified in mml parsing (Bug#... 74a92be16d * lisp/simple.el (kill-ring-save): Doc fix. (Bug#40797) 3d0e859692 Minor doc clarification regarding fringe bitmaps 4d86c7f822 Fix documentation of fringe bitmaps a76af88dd8 Tweak mutability doc a bit more f7e488d206 Calc: fix autoload errors (bug#40800) 369761b36d ; * src/xdisp.c: Improve the introductory commentary. a92ca1f177 Improve indexing of ELisp manual 5a25d17760 * lisp/image-mode.el (image-transform-resize): Remove FIXM... 37ebec3a95 Improve the default value of 'doc-view-ghostscript-program'. ba6104d1e8 Change doc-view-mode-map prefix key 's' to 'c'. 400ff5cd19 Improve wording about constants d2836fe71b Improve the default value of 'doc-view-ghostscript-program'. fc55f65305 Minor improvements in documentation of the last change a64da75961 Add image-auto-resize defcustoms to image-mode.el 692ad40539 Improve the documentation of tab-bar and tab-line # Conflicts: # etc/NEWS
| * ; * src/xdisp.c: Improve the introductory commentary.Eli Zaretskii2020-04-241-95/+176
| |