summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-04-06Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano
2021-04-04* src/comp.c (fixup_eln_load_path): Fix parameter name.Andrea Corallo
2021-04-04* src/comp.c (Fcomp_el_to_eln_filename): Fix doc.Andrea Corallo
2021-04-04Output native compiled preloaded files into the 'preloaded' subfolderAndrea Corallo
* src/comp.c (fixup_eln_load_path): Account the fact that the file can be dumped in the 'preloaded' subfolder. * lisp/loadup.el: Likewise. * src/lread.c (maybe_swap_for_eln1): New function. (maybe_swap_for_eln): Handle 'preloaded' subfolder. * src/Makefile.in (LISP_PRELOADED): Export preloaded files.
2021-04-04Fix MS-Windows buildEli Zaretskii
* 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.
2021-04-04Fix crash when using menus and tramp on NSAlan Third
; Fixes bug#24472, bug#37557 and bug#37922. * src/nsterm.m (ns_select): Don't drain outerpool in this function. (cherry picked from commit f14869cd70e61b1908ec88a5e3d4bf21c7d538a0)
2021-04-04Fix warnings in image.cAlan Third
* src/image.c (svg_load_image): Fix types and move declaration of 'css' to the top of the function.
2021-04-04Fix unexec compilationEli Zaretskii
* 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>.
2021-04-04Fix recent changes regarding frame-scale-factorEli Zaretskii
* src/frame.c (Fframe_scale_factor): Make more robust and avoid compiler warning while at that. Doc fix.
2021-04-04Fix build error in frame.h on non-NSİ. Göktuğ Kayaalp
* src/frame.h (FRAME_SCALE_FACTOR): Fix syntax of macro in previous change.
2021-04-03Set CSS for SVG filesAlan Third
* 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.
2021-04-03Fix NSTRACE failureAlan Third
* src/nsterm.m ([EmacsSurface getContext]): Remove unneeded '@' symbol.
2021-04-03Implement frame-scale-factorAlan Third
* 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.
2021-04-01* src/comp.h (unload_comp_unit): Define for vanilla build (warning removal).Andrea Corallo
2021-04-01Issue a warning when eln look-up fails due to missing .el source file.Andrea Corallo
* lisp/emacs-lisp/comp.el (comp-warning-on-missing-source): New customize. * src/lread.c (maybe_swap_for_eln): Issue a warning when eln look-up fails due to missing .el source file. * src/comp.c (syms_of_comp): Define 'Qcomp_warning_on_missing_source'.
2021-03-31* src/comp.c (Fcomp__compile_ctxt_to_file): Fix debug level 1.Eli Zaretskii
2021-03-31Rework native compilation `comp-debug' (bug#46495)Andrea Corallo
* lisp/emacs-lisp/comp.el (comp-debug): Update docstring and move default on Windows systems from 0 to 1. * src/comp.c (Fcomp__compile_ctxt_to_file): Tweak debug levels.
2021-03-31Do not defer compilation when bytecode is explicitly requested (bug#46617)Andrea Corallo
* src/comp.c (maybe_defer_native_compilation): Check if the file is registered in 'V_comp_no_native_file_h'. (syms_of_comp): 'V_comp_no_native_file_h' new global. * src/lread.c (maybe_swap_for_eln): Register files in 'V_comp_no_native_file_h'. * lisp/faces.el (tty-run-terminal-initialization): Do not explicitly load .elc file to not exclude .eln being loaded in place.
2021-03-31Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo
2021-03-29Protect add-variable-watcher from incorrect usageEli Zaretskii
* src/data.c (Fadd_variable_watcher): Avoid crashes if SYMBOL isn't. (Bug#47462)
2021-03-28Use a 64KB page size for pdumpLars Ingebrigtsen
* src/pdumper.c (dump_get_page_size): Use a 64KB page size on all architectures, as this many vary between systems (bug#47125).
2021-03-28Clarify the doc string of plist-memeber and plist-putLars Ingebrigtsen
* src/fns.c (Fplist_member): (Fplist_put): Clarify what comparison function is used for PROP (bug#47426) and don't claim that PROP has to be a symbol.
2021-03-27File unlock errors now issue warnings (Bug#46397)Matt Armstrong
The primary idea is to allow `kill-buffer' and `kill-emacs' to complete even if Emacs has trouble unlocking the buffer's file. * lisp/userlock.el (userlock--handle-unlock-error): New function, call `display-error'. * src/filelock.c (unlock_file_body): New function, do what 'unlock_file' used to. (unlock_file_handle_error): New function, call `userlock--handle-unlock-error' with the captured error. (unlock_file): Handle `file-error' conditions by calling the handler defined above. * test/src/filelock-tests.el (filelock-tests-kill-buffer-spoiled): (filelock-tests-unlock-spoiled): Modify to test new behavior.
2021-03-27Fix encoding by ISO-2022-JPKenichi Handa
* src/coding.c (encode_coding): Reset the CODING_MODE_LAST_BLOCK flag for all iterations but the last one. (Bug#46933)
2021-03-26* Prevent stale eln loading checking file timestamp before load (bug#46617)Andrea Corallo
* src/lread.c (maybe_swap_for_eln): Add file timestamp check. (openp): Update 'maybe_swap_for_eln' call sites.
2021-03-25Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo
2021-03-25Merge from origin/emacs-27Paul Eggert
291a421c2e * admin/make-tarball.txt: Improve and expand the instructi... 0e4795fc98 Fix preeditarea reporting wrong spot.
2021-03-25Fix preeditarea reporting wrong spot.Amos Bird
This patch adjust the x position of preeditarea with both left fringe and left margin, which prevents IME preedit box (such as fcitx) from placing at the wrong position in GUI emacs. * src/xfns.c (xic_set_preeditarea): Adjust X for left margin width. (Bug#47377)
2021-03-25Fix replace-buffer-contents undefined behaviorPaul Eggert
* src/editfns.c (Freplace_buffer_contents): Avoid undefined behavior with competing side effects in parallel subexpressions. Problem reported by Apple clang version 12.0.0 (clang-1200.0.32.29).
2021-03-24Improve two native compiler related docstrings.Andrea Corallo
* lisp/emacs-lisp/comp.el (comp-eln-load-path-eff): Improve docstring. * src/comp.c (comp-eln-load-path): Likewise.
2021-03-24* src/lread.c (maybe_swap_for_eln): Fix eln filename (bug#bug#47337).Andrea Corallo
2021-03-24Replace "(default %s)" with 'format-prompt'Gabriel do Nascimento Ribeiro
* lisp/cmuscheme.el (scheme-load-file, scheme-compile-file): * lisp/comint.el (comint-get-source): * lisp/emulation/viper-cmd.el (viper-quote-region, viper-kill-buffer) (viper-query-replace, viper-read-string-with-history): * lisp/eshell/esh-mode.el (eshell-find-tag): * lisp/gnus/gnus-sum.el (gnus-articles-to-read) (gnus-summary-search-article-forward) (gnus-summary-search-article-backward): * lisp/international/mule-cmds.el (set-input-method, toggle-input-method) (describe-input-method, set-language-environment) (describe-language-environment): * lisp/mh-e/mh-gnus.el (mh-mml-minibuffer-read-disposition): * lisp/mh-e/mh-letter.el (mh-insert-letter): * lisp/mh-e/mh-mime.el (mh-display-with-external-viewer) (mh-mime-save-parts, mh-mh-forward-message) (mh-mml-query-cryptographic-method, mh-minibuffer-read-type): * lisp/mh-e/mh-seq.el (mh-read-seq, mh-read-range): * lisp/mh-e/mh-utils.el (mh-prompt-for-folder): * lisp/progmodes/etags.el (find-tag-tag): (find-tag-noselect, find-tag, find-tag-other-window) (find-tag-other-frame, find-tag-regexp): * lisp/progmodes/idlwave.el (idlwave-find-module): * lisp/progmodes/inf-lisp.el (lisp-load-file, lisp-compile-file): * lisp/progmodes/tcl.el (tcl-load-file, tcl-restart-with-file): * lisp/progmodes/xref.el (xref--read-identifier): (xref-find-definitions, xref-find-definitions-other-window) (xref-find-definitions-other-frame, xref-find-references): * lisp/ses.el (ses-read-printer): (ses-read-cell-printer, ses-read-column-printer) (ses-read-default-printer, ses-define-local-printer): * lisp/subr.el (read-number): * lisp/term.el (term-get-source): * src/minibuf.c (read-buffer): Remove prompt suffix and use 'format-prompt'. * lisp/minibuffer.el (format-prompt): Ignore DEFAULT empty strings (bug#47286).
2021-03-21; * src/comp.c (Fcomp_el_to_eln_filename): Improve docstring.Andrea Corallo
2021-03-21Prevent unnecessary multiple .el hashing in 'maybe_swap_for_eln'Andrea Corallo
* src/comp.c (Fcomp_el_to_eln_rel_filename): New function. (Fcomp_el_to_eln_filename): Make use of. (syms_of_comp): Register 'Scomp_el_to_eln_rel_filename'. * src/lread.c (maybe_swap_for_eln): Make use of 'Fcomp_el_to_eln_rel_filename' to hash prevent unnecessary multiple hashing.
2021-03-21Prevent open minibuffers getting lost when their frame gets deletedAlan Mackenzie
This happened with minibuffer-follows-selected-frame set to t. * doc/emacs/mini.texi (Basic Minibuffer): State where a command's action takes place when a minibuffer's frame has been deleted. * lisp/window.el (window--before-delete-windows, record-window-buffer): Take into account that minibuffers are now recorded on w->prev_buffers field. * src/fns.c (merge_c): New version of `merge' taking a C function, rather than a Lisp function as the comparison function. * src/frame.c (do_switch_frame): Pass arguments sf and for_deletion to move_minibuffers_onnto_frame. * src/lisp.h (top level): Declare merge_c and move_minibuffers_onto_selected_frame. * src/minibuf.c (MB_frame): New Lisp_Object recording the minibuffer's frame. (choose_minibuf_frame): Remove all code except that which sets minibuf_window to the current frame's minibuffer. (minibuffer_ent_greater): New comparison function, passed to merge_c. (zip_minibuffer_stacks): New function. (move_minibuffers_onto_frame): Renamed from `move_minibuffer_onto_frame' given two arguments, the old frame and for_deletion, and simplified. Minibuffers are now stacked in the mini-window's ->prev_buffers field. (read_minibuf): Several detailed amendments. (exp_MB_frame): New Lisp_Object, the expired minibuffer's frame. (read_minibuf_unwind): Search for the expired minibuffer's frame, rather than taking it from (unreliable) variables. Switch temporarily to this frame for tidying up operations. (minibuffer_unwind): New function which pops a stacked minibuffer. (syms_of_minibuf): Call staticpro for the two new Lisp variables. * src/window.c (Fset_window_configuration): Don't record minibuffers with record-window-buffer. * src/xdisp.c (gui_consider_frame_title): Remove redundant Fselect_window, which caused an unwanted frame switch. Amend the arguments to format_mode_line_unwind_data to match.
2021-03-21Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano
2021-03-19Don’t convert pointer to boolPaul Eggert
Without this patch, Oracle Studio 12.6 complains about converting pointer to bool. * src/editfns.c (styled_format): Use !!.
2021-03-19Merge remote-tracking branch 'savannah/master' into native-compAndrea Corallo
2021-03-19Do not load native code when `load' is explicitly called on a .elc fileAndrea Corallo
* src/lread.c (Fload): Do not load native code when `load' is explicitly called on a .elc file. (Flocate_file_internal): Update 'openp' call sites. (maybe_swap_for_eln): Add new 'no_native' parameter. (openp): Likewise + update 'maybe_swap_for_eln' and 'openp' call sites. * src/lisp.h: Update 'openp' signature. * src/w32proc.c (sys_spawnve): Update 'openp' call sites. * src/w32.c (check_windows_init_file): Likewise. * src/sound.c (Fplay_sound_internal): Likewise. * src/process.c (Fmake_process): Likewise. * src/image.c (image_create_bitmap_from_file) (image_find_image_fd): Likewise. * src/emacs.c (set_invocation_vars): Likewise. * src/charset.c (load_charset_map_from_file): Likewise. * src/callproc.c (call_process): Likewise.
2021-03-18Extend handled events in 'while-no-input-ignore-events' (Bug#47205)Michael Albinus
* etc/NEWS: Mention changes to 'while-no-input-ignore-events'. * src/keyboard.c (kbd_buffer_store_buffered_event): Handle also Qfile_notify and Qdbus_event as ignore_event. (Bug#47205)
2021-03-18Document that `buffer-string' retains text propertiesLars Ingebrigtsen
* doc/lispref/text.texi (Buffer Contents): Mention text properties in the `buffer-string' documentation. * src/editfns.c (Fbuffer_string): Mention text properties in the doc string (bug#47220). (cherry picked from commit 60af754170f22f5d25510af069ed0ebfec95f992)
2021-03-18Document that `buffer-string' retains text propertiesLars Ingebrigtsen
* doc/lispref/text.texi (Buffer Contents): Mention text properties in the `buffer-string' documentation. * src/editfns.c (Fbuffer_string): Mention text properties in the doc string (bug#47220).
2021-03-16Add minibuffer input support to commands that set the frame sizeDaniel Martín
* lisp/frame.el (set-frame-property--interactive): Internal function to produce the interactive form of `set-frame-width' and `set-frame-height'. Offer the current size as default. (Bug#9970) * src/frame.c (Fset_frame_height): Modify to call `set-frame-property--interactive'. (Fset_frame_width): Modify to call `set-frame-property--interactive'. * doc/lispref/frames.texi (Frame Size): Update the manuals. * etc/NEWS: Advertise the change (bug#9970).
2021-03-15Prefer expand-file-name to concat in native-compilation codeEli Zaretskii
* lisp/emacs-lisp/comp.el (comp-eln-load-path-eff): * src/comp.c (Fcomp_el_to_eln_filename) (eln_load_path_final_clean_up): Prefer expand-file-name to concat. (Bug#43725)
2021-03-14Don't call setjmp through a function pointer on Windows (bug#47067)Pip Cet
* src/comp.c (ABI_VERSION): Bump. (emit_setjmp): Call setjmp directly. (declare_runtime_imported_funcs): Remove setjmp. (helper_link_table): Remove entry for setjmp.
2021-03-14Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs into feature/pgtkYuuki Harano
2021-03-14Fix hang due to failure to clean up *.eln.old files at exitEli Zaretskii
* src/comp.c (eln_load_path_final_clean_up): Call internal_delete_file, not Fdelete_file, to ignore any errors. (Bug#46972)
2021-03-14Fix buffer overflow in xbm_scan (bug#47094)Alan Third
* src/image.c (xbm_scan): Ensure reading a string doesn't overflow the buffer. (cherry picked from commit ebc3b25409dd614c1814a0643960452683e37aa3)
2021-03-13Fix buffer overflow in xbm_scan (bug#47094)Alan Third
* src/image.c (xbm_scan): Ensure reading a string doesn't overflow the buffer.
2021-03-13Fix rare redisplay glitches when image has been removed from displayEli Zaretskii
* src/dispnew.c (update_window): Make sure all glyph rows below the last visible one are marked as invalid, even when the loop which "updates the rest of the lines" didn't examine the last visible row. (Bug#47093)