aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Improve detection of pdumper file and *.eln filesfeature/native-compEli Zaretskii2021-04-241-1/+9
| | | | | * src/emacs.c (load_pdump_find_executable): Resolve symlinks even if argv[0] includes leading directories. (Bug#46790)
* Improve diagnostics of loading *.eln filesEli Zaretskii2021-04-241-1/+5
| | | | | * src/pdumper.c (dump_do_dump_relocation): Improve diagnostics when loading preloaded *.eln files fails. (Bug#46790)
* Introduce `sxhash-equal-including-properties'.Andrea Corallo2021-04-211-9/+34
| | | | | | | * src/fns.c (collect_interval): Move it upwards. (Fsxhash_equal_including_properties): New function. (syms_of_fns): Register `sxhash-equal-including-properties'. * etc/NEWS: Add 'sxhash-equal-including-properties'.
* Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-04-1915-104/+359
|\
| * Avoid selecting tooltip windows and frames (Bug#47207)Martin Rudalics2021-04-184-15/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/frame.c (do_switch_frame): Don't switch to a tooltip frame. (Fselect_frame): Do not select a tooltip frame. * src/w32fns.c (Fx_show_tip): * src/xfns.c (Fx_show_tip): Set the tooltip window's `no-other-window' parameter so `other-window' will skip it. * src/window.c (select_window): Do not select a tooltip window. (candidate_window_p): Make sure MINIBUF is live. (decode_next_window_args): Make sure that W's frame's minibuffer window is live before including it. (Qno_other_window): New symbol.
| * Fix :scale's affect on :width and :height (bug#47819)Alan Third2021-04-171-2/+2
| | | | | | | | | | * src/image.c (compute_image_size): Multiply width and height values by scale.
| * Don't allow quitting while rebuilding Vwindow_list (Bug#47244)Martin Rudalics2021-04-171-0/+21
| | | | | | | | | | * src/window.c (window_list, next_window, window_list_1): Don't allow quitting in Fnconc and Fmemq (Bug#47244).
| * Check minibuffer windows are live windows, rather than assuming itAlan Mackenzie2021-04-161-14/+24
| | | | | | | | | | | | | | | | | | This partly fixes bug #47207. * src/minibuf.c (choose_minibuf_frame, move_minibuffers_onto_frame) (read_minibuf (twice), read_minibuf_unwind): Before using a frame's ->minibuffer_window field, check it is valid with WINDOW_LIVE_P. (choose_minibuf_frame): Remove the emacs_abort for a null minibuffer.
| * Improve docstring of 'frame-scale-factor'Robert Pluim2021-04-161-0/+1
| | | | | | | | | | * src/frame.c (Fframe_scale_factor): Explain what happens when the FRAME argument is nil.
| * Fix 'garbage-collect-maybe'Eli Zaretskii2021-04-151-1/+1
| | | | | | | | | | * src/alloc.c (Fgarbage_collect_maybe): No longer interactive. (Bug#47805)
| * Allow use of em in image spec sizesAlan Third2021-04-151-17/+41
| | | | | | | | | | | | | | | | | | | | * src/image.c (image_get_dimension): New function. (compute_image_size): Use image_get_dimension to set the sizes, and pass in the image struct instead of just the spec. (image_set_transform): (imagemagick_load_image): (svg_load_image): Use the image instead of the spec in compute_image_size. (syms_of_image): Add 'em' as a symbol.
| * Add condition-case success handler (bug#47677)Mattias Engdegård2021-04-151-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow a condition-case handler on the form (:success BODY) to be specified as the success continuation of the protected form, with the specified variable bound to its result. * src/eval.c (Fcondition_case): Update the doc string. (internal_lisp_condition_case): Implement in interpreter. (syms_of_eval): Defsym :success. * lisp/emacs-lisp/bytecomp.el (byte-compile-condition-case): Implement in byte-compiler. * lisp/emacs-lisp/cl-macs.el (cl--self-tco): Allow self-TCO from success handler. * doc/lispref/control.texi (Handling Errors): Update manual. * etc/NEWS: Announce. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--test-cases) (bytecomp-condition-case-success): * test/lisp/emacs-lisp/cl-macs-tests.el (cl-macs--labels): Add test cases.
| * Don't error out when selection data is unavailable (bug#47642)Juri Linkov2021-04-141-7/+14
| | | | | | | | | | * src/xselect.c (x_get_window_property_as_lisp_data): Display a message and return nil when data is not available.
| * ; Fix a couple of recent typos.Basil L. Contovounesios2021-04-141-2/+3
| |
| * Add two optional arguments to 'string-width'Eli Zaretskii2021-04-143-28/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/character.c (Fstring_width, lisp_string_width): Accept two optional arguments FROM and TO, to indicate the substring to be considered. (Fstring_width): Add caveats in the doc string about display features ignored by the function. (Bug#47712) * src/character.h (lisp_string_width): Update prototype. * src/editfns.c (styled_format): Adjust call of lisp_string_width to its changed signature. * test/src/character-tests.el (character-test-string-width): New file with tests for 'string-width'. * doc/lispref/display.texi (Size of Displayed Text): Document caveats of using 'string-width'. * etc/NEWS: Announce the change.
| * * src/xdisp.c (wset_update_mode_line): Move from `src/window.c`Stefan Monnier2021-04-133-14/+13
| | | | | | | | | | | | | | | | | | | | Move that function next to its siblings. Also simplify it, since after careful analysis it is now clear that the frame's title's update is already handled elsewhere (in `prepare_menu_bars` and `redisplay_window`) so we just need to make sure the `redisplay` bit is set. * src/window.c (wset_update_mode_line): Move to `src/xdisp.c`. * src/window.h (wset_update_mode_line): Declare.
| * Resurrect mouse-highlight of close buttons on tab-barEli Zaretskii2021-04-132-5/+131
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/w32term.c (w32_draw_image_relief): Support tab-bar drawing with relief as xterm.c does. * src/xdisp.c (handle_tab_bar_click): Access the mouse-highlight info. Call show_mouse_face to show the button in the pressed or the released state, according to value of DOWN_P. (note_tab_bar_highlight): Function added back. (note_mouse_highlight): Call note_tab_bar_highlight when the mouse pointer is in the tab-bar window. (show_mouse_face): Return immediately if mouse_face_window is not set up in HLINFO. This avoids rare assertion violations.
* | * src/emacs.c (main): Add back the call to init_callproc_1. (bug#47872)Eli Zaretskii2021-04-181-0/+3
| |
* | * src/comp.c (fixup_eln_load_path): Simplify code.Eli Zaretskii2021-04-181-7/+5
| |
* | ; * src/emacs.c (load_pdump_find_executable): Yet another fix.Eli Zaretskii2021-04-181-1/+5
| |
* | Fix last changeEli Zaretskii2021-04-181-1/+4
| | | | | | | | | | * src/emacs.c (load_pdump_find_executable): Fix the value of CANDIDATE_SIZE when the final candidate is a symlink.
* | ; * src/pdumper.c (dump_do_dump_relocation): Add a FIXME comment.Eli Zaretskii2021-04-171-0/+7
| |
* | * src/emacs.c (load_pdump): Fix unconditional references to strip_suffix.Eli Zaretskii2021-04-171-2/+4
| |
* | * emacs.c (load_pdump): Fix compilation on picky-complier platforms.Eli Zaretskii2021-04-171-1/+2
| |
* | Fix loading *.eln files when Emacs is installed via symlinksEli Zaretskii2021-04-176-173/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/emacs.c (real_filename, set_invocation_vars) (init_vars_for_load): Functions deleted; callers adjusted. (init_cmdargs): Put back all the code which was extracted into set_invocation_vars. (load_pdump_find_executable): Make sure the return value has any symlinks in it expanded. (load_pdump): Accept only 2 arguments, not 3. Determine both the file name of the Emacs executable and of the dump file in synchronized manner, so that if we decided to look for the dump file in its hardcoded installation directory, the directory of the Emacs executable will also be where we expect it to be installed. Pass only 2 arguments to pdumper_load. (Bug#47800) (Bug#44128) * src/pdumper.c (dump_do_dump_relocation): Use emacs_execdir instead of Vinvocation_directory to produce absolute file names of *.eln files that are recorded in the pdumper file. Pass the full .eln file name to fixup_eln_load_path. (pdumper_set_emacs_execdir) [HAVE_NATIVE_COMP]: New function. (pdumper_load) [HAVE_NATIVE_COMP]: Call pdumper_set_emacs_execdir. * src/comp.c (fixup_eln_load_path): Use Fsubstring_no_properties instead of Fsubstring. No need to cons a file name, as the caller already did that. Use explicit const string to avoid "magic" values. * lisp/startup.el (normal-top-level): Use expand-file-name instead of concat. Decode comp-eln-load-path and expand-file-name its members.
* | Fix MS-Windows build following last changeEli Zaretskii2021-04-141-4/+2
| | | | | | | | | | * src/emacs.c (real_filename) [WINDOWSNT]: Fix off-by-one error when allocating storage for a file name.
* | * Fix native-comp startup for symliked binary (bug#44128)Andrea Corallo2021-04-141-9/+27
| | | | | | | | | | * src/emacs.c (real_filename): New function. (set_invocation_vars, load_pdump): Make use of.
* | Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-04-132-138/+217
|\ \ | |/
| * * src/emacs.c (load_seccomp): Consistently check for nonzero resultPhilipp Stephani2021-04-111-1/+1
| |
| * Add another check for the required header <linux/filter.h>.Philipp Stephani2021-04-111-2/+2
| | | | | | | | | | * configure.ac: Also check for <linux/filter.h>. * src/emacs.c (SECCOMP_USABLE): Also check for <linux/filter.h>.
| * Also check for needed seccomp macros.Philipp Stephani2021-04-111-6/+14
| | | | | | | | | | | | | | | | | | It looks like these are not available on some versions of GNU/Linux, breaking the build. * configure.ac: Also check for needed seccomp macros. * src/emacs.c (SECCOMP_USABLE): New macro. (usage_message, main, standard_args): Use it.
| * Fix handling of mouse clicks on tab-bar buttonsEli Zaretskii2021-04-111-137/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (note_mouse_highlight): Don't attempt to highlight tab-bar buttons. (note_tab_bar_highlight): Function deleted: it had no effect on display of tab-bar buttons. (tab_bar_item_info): Mention all arguments in the commentary. (get_tab_bar_item): Don't pay attention to mouse-highlight information; instead, compare the button's index with the one recorded in f->last_tab_bar_item. (handle_tab_bar_click): Don't attempt to show tab-bar buttons in pressed or released state: that isn't supported. Determine whether to generate a tab-bar button click based on DOWN_P argument, not on mouse-highlight, which has no effect on tab-bar display. (Bug#47581)
| * * src/emacs.c (read_full): Add a few assertions.Philipp Stephani2021-04-101-0/+3
| |
| * * src/emacs.c (load_seccomp): Add a useful assertion.Philipp Stephani2021-04-101-0/+1
| |
| * * src/emacs.c (load_seccomp): Fix condition.Philipp Stephani2021-04-101-1/+1
| |
| * * src/emacs.c (load_seccomp): Fix condition.Philipp Stephani2021-04-101-1/+1
| |
| * Read file in a loop if necessary.Philipp Stephani2021-04-101-11/+39
| | | | | | | | | | | | | | This allows for short reads from 'emacs_read'. * src/emacs.c (read_full): New helper function. (load_seccomp): Use it.
| * Add support for --seccomp command-line option.scratch/seccomp-emacs-openPhilipp Stephani2021-04-101-1/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When passing this option on GNU/Linux, Emacs installs a Secure Computing kernel system call filter. See Bug#45198. * configure.ac: Check for seccomp header. * src/emacs.c (usage_message): Document --seccomp option. (emacs_seccomp): New wrapper for 'seccomp' syscall. (load_seccomp, maybe_load_seccomp): New helper functions. (main): Potentially load seccomp filters during startup. (standard_args): Add --seccomp option. * lisp/startup.el (command-line): Detect and ignore --seccomp option. * test/src/emacs-tests.el (emacs-tests/seccomp/absent-file) (emacs-tests/seccomp/empty-file) (emacs-tests/seccomp/file-too-large) (emacs-tests/seccomp/invalid-file-size): New unit tests. (emacs-tests--with-temp-file): New helper macro. * etc/NEWS: Document new --seccomp option.
* | Fix crash on MS-Windows caused by recent changesEli Zaretskii2021-04-071-8/+9
| | | | | | | | | | | | * src/pdumper.c (dump_do_dump_relocation): Don't use expand-file-name, as this crashes on MS-Windows. Use file_access_p instead of emacs_fopen.
* | * src/pdumper.c (dump_do_dump_relocation): Use `expand-file-name'.Andrea Corallo2021-04-061-4/+4
| |
* | Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo2021-04-056-27/+116
|\ \ | |/
| * Fix MS-Windows buildEli Zaretskii2021-04-041-1/+15
| | | | | | | | | | | | * src/image.c: (init_svg_functions) [WINDOWSNT]: Define and load rsvg_handle_set_stylesheet from the DLL for librsvg > 2.48. (lookup_image): Use xmalloc.
| * Fix warnings in image.cAlan Third2021-04-041-4/+7
| | | | | | | | | | * src/image.c (svg_load_image): Fix types and move declaration of 'css' to the top of the function.
| * Fix unexec compilationEli Zaretskii2021-04-041-3/+5
| | | | | | | | | | | | | | * src/pdumper.c (thaw_hash_tables): Now conditioned by HAVE_PDUMPER. (init_pdumper_once): No-op unless HAVE_PDUMPER. Reported by Nikolay Kudryavtsev <nikolay.kudryavtsev@gmail.com>.
| * Fix recent changes regarding frame-scale-factorEli Zaretskii2021-04-041-3/+3
| | | | | | | | | | * src/frame.c (Fframe_scale_factor): Make more robust and avoid compiler warning while at that. Doc fix.
| * Fix build error in frame.h on non-NSİ. Göktuğ Kayaalp2021-04-041-1/+1
| | | | | | | | | | * src/frame.h (FRAME_SCALE_FACTOR): Fix syntax of macro in previous change.
| * Set CSS for SVG filesAlan Third2021-04-032-15/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/dispextern.h (struct image): Add font details required for the CSS. * src/image.c (free_image): Free the font family string. (search_image_cache): (uncache_image): Make image caching understand the font details. (lookup_image): Handle the font details when generating the image and looking up the cache. (svg_css_length_to_pixels): Handle 'em' when we know the font size. (svg_load_image): Generate the CSS and apply it to the SVG. (enum svg_keyword_index): (svg_format): (syms_of_image): Add ':css' attribute. * doc/lispref/display.texi (SVG Images): Add details of new svg image attributes.
| * Fix NSTRACE failureAlan Third2021-04-031-1/+1
| | | | | | | | * src/nsterm.m ([EmacsSurface getContext]): Remove unneeded '@' symbol.
| * Implement frame-scale-factorAlan Third2021-04-033-8/+19
| | | | | | | | | | | | | | * src/frame.c (Fframe_scale_factor): New function. (syms_of_frame): Add frame-scale-factor. * src/frame.h: Add FRAME_SCALE_FACTOR. * src/image.c: Move FRAME_SCALE_FACTOR to frame.h.
* | * Introduce `comp-file-preloaded-p'Andrea Corallo2021-04-051-7/+13
| | | | | | | | | | * src/comp.c (syms_of_comp): Define `comp-file-preloaded-p'. (Fcomp_el_to_eln_filename): Account for `comp-file-preloaded-p'.