summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2020-10-23Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo
2020-10-23Merge branch 'scratch/substitute-command-keys'Stefan Kangas
2020-10-22Fix SVG image dimension calculations (bug#44065)Alan Third
* src/image.c (svg_load_image): Calculate the image size by using the viewBox size and applying it to the image. * etc/PROBLEMS: Describe the problem with librsvg 2.45 and below.
2020-10-22Fix crash when no face is defined (bug#44058, bug#43973)Alan Third
* src/nsterm.m (ns_clear_under_internal_border): If face is null, don't try drawing anything.
2020-10-22Handle Cairo errors in ftcrfont_openPip Cet
* src/ftcrfont.c (ftcrfont_open): Handle Cairo errors (bug#41627).
2020-10-21Avoid rare crashes while producing line numbersEli Zaretskii
* src/xdisp.c (maybe_produce_line_number): Prevent freeing of realized faces for as long as we are using lnum_face_id and current_lnum_face_id for producing glyphs. (Bug#44111)
2020-10-20Avoid assertion violations in malformed Unicode escapesEli Zaretskii
* src/lread.c (read_escape): Produce better diagnostic for malformed \u Unicode escapes, while avoiding assertion violation when READCHAR returns -1 because the input is exhausted. (Bug#44084)
2020-10-19Further clarification of directory-files* docMichael Albinus
* doc/lispref/files.texi (Contents of Directories): Precise description of MATCH-REGEXP of directory-files. Add directory-files-no-dot-files-regexp. * lisp/files.el (directory-files-no-dot-files-regexp): Revert last fix. * src/dired.c (Fdirectory_files) (Fdirectory_files_and_attributes): Fix wording in docstring.
2020-10-19Ffunction doc string clarificationLars Ingebrigtsen
* src/eval.c (Ffunction): Mention that `function' isn't quite like `quote' in non-bytecompile circumstances, too (bug#41864).
2020-10-19* src/dired.c (Fdirectory_files, Fdirectory_files_and_attributes):Michael Albinus
Adapt docstring.
2020-10-18Prefer Lisp version of describer in help--describe-vectorStefan Kangas
* src/keymap.c (Fhelp__describe_vector): * lisp/help.el (describe-map): Use Lisp versions of describe_command and describe_translation. * src/keymap.c (describe_command, describe_translation): Remove. (describe_vector_basic): New function.
2020-10-18Remove C version of substitute-command-keysStefan Kangas
* src/doc.c (Fsubstitute_command_keys_old): Remove. (syms_of_doc): Remove defsubr for Fsubstitute_command_keys_old. * src/keymap.c (describe_map, describe_map_tree) (describe_map_compare, describe_map_elt): Remove. * src/keymap.h: Remove 'describe_map_tree'. * test/lisp/help-tests.el (with-substitute-command-keys-test) (help-tests-substitute-command-keys/compare) (help-tests-substitute-command-keys/compare-all): Don't test the C version of 'substitute-command-keys' removed above.
2020-10-18Prefer Lisp version of describe-map-treeStefan Kangas
This is a prerequisite to remove the old C functions, and gives a measured 3 ms slowdown on my machine, from 0.27s to 0.30s per call to describe-buffer-bindings (average over 50 calls). * src/keymap.c (Fdescribe_buffer_bindings): Call Lisp function describe-map-tree instead of C function describe_map_tree.
2020-10-18Improve substitute-command-keys performanceStefan Kangas
The previous conversion of describe_vector from C to Lisp for the keymap and char table case lead to an unacceptable performance hit. Moving back to the C version, as we do here, makes this function around 50 times faster. The Lisp version of `substitute-command-keys' was benchmarked using the form `(documentation 'dired-mode)', which now takes less than 8 ms on my machine. This is around 16 times slower than the previous C version. Thanks to Stefan Monnier for helpful pointers on benchmarking. * src/keymap.c (Fhelp__describe_vector): New defun to expose describe_vector to Lisp for keymaps and char tables. (syms_of_keymap): New defsubr for Fhelp__describe_vector. * lisp/help.el (describe-map): Use above defun instead of Lisp version. (help--describe-vector): Remove defun; keep it commented out for now.
2020-10-18Translate describe_vector to LispStefan Kangas
* lisp/help.el (help--describe-vector): New Lisp implementation of describe_vector. * src/keymap.c (Fdescribe_vector_internal): Remove defun. (syms_of_keymap): Remove defsubr for Fdescribe_vector_internal.
2020-10-18Translate describe_map to LispStefan Kangas
Third step in converting substitute-command-keys to Lisp. * lisp/help.el (describe-map): New Lisp version of describe_map. (help--describe-map-compare, help--describe-translation) (help--describe-command, help--shadow-lookup): New helper functions for describe-map. (help--keymaps-seen, help--previous-description-column): New variables. * src/keymap.c (Fkeymap__get_keyelt): New defun to expose get_keyelt to Lisp. (Fdescribe_map_tree_old, Fdescribe_map): Remove defuns. (Fdescribe_vector_internal): New defun to expose describe_vector to Lisp in a way usable by describe-map. (syms_of_keymap): New defsubrs for Fkeymap__get_keyelt and Fdescribe_vector_internal. Remove defsubrs for Fdescribe_map_tree_old and Fdescribe_map. Remove 'help--keymaps-seen'. * test/lisp/help-tests.el (help-tests-substitute-command-keys/shadow): Extend test. (help-tests-substitute-command-keys/test-mode) (help-tests-substitute-command-keys/compare-all) (help-tests-describe-map-tree/no-menu-t) (help-tests-describe-map-tree/no-menu-nil) (help-tests-describe-map-tree/mention-shadow-t) (help-tests-describe-map-tree/mention-shadow-nil) (help-tests-describe-map-tree/partial-t) (help-tests-describe-map-tree/partial-nil): New tests.
2020-10-18Translate describe_map_tree to LispStefan Kangas
This is the second step in converting substitute-command-keys to Lisp. * lisp/help.el (describe-map-tree): New Lisp version of describe_map_tree. (substitute-command-keys): Update to use above function. * src/keymap.c (Fdescribe_map): New defun to expose describe_map to Lisp. * src/keymap.c (syms_of_keymap): New variable 'help--keymaps-seen'; a temporary kludge planned for removal. New defsubr for Fdescribe_map.
2020-10-18Add new Lisp implementation of substitute-command-keysStefan Kangas
This is only the first step towards a full Lisp implementation, and does not remove the old C code. On the contrary, it is partly based on using the old C code, which is to be replaced in steps. This also makes it easy to test that it produces the same output as the old. * src/doc.c (Fsubstitute_command_keys_old): Rename from Fsubstitute_command_keys. (Fget_quoting_style): New defun to expose text_quoting_style to Lisp. (syms_of_doc): Expose above symbols. * lisp/help.el (substitute-command-keys): New Lisp version of substitute-command-keys. (Bug#8951) * src/keymap.c (Fdescribe_map_tree): New defun to expose describe_map_tree to Lisp. (syms_of_keymap): New defsubr for Fdescribe_map_tree. * src/keyboard.c (help_echo_substitute_command_keys): * src/doc.c (Fdocumentation, Fdocumentation_property): * src/print.c (print_error_message): * src/syntax.c (Finternal_describe_syntax_value): Fix calls to use new Lisp implementation of substitute-command-keys. * test/src/doc-tests.el: Remove file. * test/lisp/help-tests.el: Add tests for substitute-command-keys copied from above file.
2020-10-18Fix a misleading comment in Freplace_matchLars Ingebrigtsen
* src/search.c (Freplace_match): Fix a misleading comment (bug#42424).
2020-10-17Fix bad dimensions of initial frame on VcXsrvJ. Scott Berg
* src/xterm.c (handle_one_xevent) [USE_GTK]: Don't obey ConfigureNotify events if the frame is not visible. (Bug#44002) Copyright-paperwork-exempt: yes
2020-10-17Merge from origin/emacs-27Glenn Morris
65078e0a76 * lisp/info.el (Info-hide-note-references): Doc fix. (Bug... 30305b543d Make lisp/progmodes/js.el dependent on CC Mode in the Make... c37b2a9b42 Yet another fix for 'set-minibuffer-message' 72dd911981 Fix posn-at-x-y in builds --without-x ace25f2066 Clarify the seq-reduce documentation 7d598e281d Make tramp-completion-reread-directory-timeout obsolete (B... 2c31ce18ea Fix 'message' when there's active minibuffer on another frame # Conflicts: # doc/misc/tramp.texi # etc/NEWS
2020-10-17Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo
2020-10-16Fix posn-at-x-y in builds --without-xEli Zaretskii
* src/keyboard.c (make_lispy_position): Don't exclude the window_or_frame = frame case from TTY-only builds. Reported by Jared Finder <jared@finder.org>. * doc/lispref/commands.texi (Click Events): Document the format of POSITION in click events on the frame's internal border.
2020-10-15* Do not check eln timestamp as superseded by source hashing (bug#43532)Andrea Corallo
* src/lread.c (maybe_swap_for_eln): Remove eln file timestamp check given is now unnecessary. (openp): Update for new 'maybe_swap_for_eln' signature.
2020-10-15Fix segfault in xwidget when there is no titleJeff Walsh
* src/xwidget.c (Fxwidget_webkit_title): Pass emptry string when no title is returned (bug#43989).
2020-10-14Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo
2020-10-14Use form native compilation in `comp-trampoline-compile'Andrea Corallo
* lisp/emacs-lisp/comp.el (comp-trampoline-sym): Remove function. (comp-trampoline-filename): As we are introducing an ABI change in the eln trampoline format change the trampoline filename to disambiguate. (comp-trampoline-search): Rename from `comp-search-trampoline' and return directly the trampoline. (comp-trampoline-compile): Rework to use native form compilation in place of un-evaluating a function and return directly the trampoline. (comp-subr-trampoline-install): Update for `comp-trampoline-search' and `comp-trampoline-compile' new interfaces. * src/comp.c (Fcomp__install_trampoline): Store the trampoline itself as value in `comp-installed-trampolines-h'. (syms_of_comp): Doc update `comp-installed-trampolines-h'.
2020-10-14Have `native-elisp-load' return the last registerd functionAndrea Corallo
* lisp/emacs-lisp/comp.el (comp-emit-for-top-level): Synthesize 'top_level_run' so it returns the last value returned by `comp--register-subr'. * src/comp.c (load_comp_unit): Return what 'top_level_run' returns. (Fnative_elisp_load): Return what 'load_comp_unit' returns. * src/comp.h (load_comp_unit): Update signature.
2020-10-14Mark the return value from strerror as a constantPhilipp Klaus Krause
* src/emacs.c (main): Mark the return from strerror as a constant, since it shouldn't be changed (bug#43982). * lib-src/movemail.c (pfatal_and_delete): Ditto. Copyright-paperwork-exempt: yes
2020-10-14Fix name of the module .h files in the commentsLars Ingebrigtsen
* src/emacs-module.c: Fix the name of the .h file in the comments.
2020-10-14Move the new module unibyte function to the correct module-env.h fileLars Ingebrigtsen
* src/module-env-28.h: Moved here from the -25.h file.
2020-10-13eql doc improvementsPaul Eggert
* doc/lispref/numbers.texi (Comparison of Numbers): Copy some useful text from eql help string. * src/fns.c (Feql): In doc string, say that eql also compares integers by value.
2020-10-13Allow creating unibyte strings from Emacs modulesLars Ingebrigtsen
* doc/lispref/internals.texi (Module Values): Document make_unibyte_string (bug#34873). * src/emacs-module.c (module_make_unibyte_string): New function. (initialize_environment): Export it. * src/module-env-25.h: Define it. * test/data/emacs-module/mod-test.c (Fmod_test_return_unibyte): Test it. * test/src/emacs-module-tests.el (module/unibyte): Test it.
2020-10-11Fix GNUstep buildAlan Third
Fix mistakes made when removing Cocoa code from nsfont.m. * src/nsfont.m (nsfont_draw): Remove spurious #ifdef. (ns_uni_to_glyphs): The #if/#endif was removed from this code, but the code itself not removed. Remove it now.
2020-10-10Provide feature nativecomp and make use of itAndrea Corallo
* lisp/emacs-lisp/comp.el (comp-ensure-native-compiler): Use `featurep' to identify if the native compiler is available. * lisp/emacs-lisp/nadvice.el (advice--add-function): Likewise. * lisp/emacs-lisp/package.el (package--delete-directory): Likewise. * lisp/loadup.el: Likewise. * src/comp.c (syms_of_comp): Provide feature nativecomp.
2020-10-10Merge from origin/emacs-27Glenn Morris
c00606171f (origin/emacs-27) A better fix for bug#43886 3196fd44c3 Avoid crashes when a theme is loaded with one frame suspended 0407b15500 Removed an incorrectly placed extra word in the semantic docs 040dcbe53e Fix current-line hscrolling when overlays change c56eeba2ce Extend tests for shell-command-dont-erase-buffer
2020-10-10Merge from origin/emacs-27Glenn Morris
b6704d58e8 ; * src/xdisp.c (Fwindow_text_pixel_size): Doc fix.
2020-10-10Merge from origin/emacs-27Glenn Morris
acc9b46153 Fix merging of region face for non-ASCII characters c2a13969e4 Make drag and drop on NS open all URLs (bug#43470)
2020-10-10Various typo fixes in native compiler related filesBrian Leung
* lisp/emacs-lisp/comp.el (native-compiler-error-dyn-func) (comp-func, comp-func-l) (comp-func-d, comp-ensure-native-compiler, comp-type-hint-p) (comp-func-unique-in-cu-p, comp-alloc-class-to-container) (comp-limple-mode, comp-loop-insn-in-block) (comp-lex-byte-func-p, comp-c-func-name, comp-decrypt-arg-list) (comp-spill-lap-function, comp-intern-func-in-ctxt) (comp-spill-lap-function, comp-spill-lap, comp-emit-handler) (comp-prepare-args-for-top-level): Various typo fixes. * src/comp.c (Fcomp_el_to_eln_filename): Fix typo in error message.
2020-10-10Merge remote-tracking branch 'savannah/master' into HEADAndrea Corallo
2020-10-10A better fix for bug#43886Eli Zaretskii
* src/xfaces.c (load_color2, Fcolor_distance): Revert last change. * src/term.c (clear_tty_hooks): Don't clear defined_color_hook.
2020-10-09Avoid crashes when a theme is loaded with one frame suspendedEli Zaretskii
* src/xfaces.c (load_color2, Fcolor_distance): Don't try to call the frame's defined_color_hook if the frame is suspended. (Bug#43886)
2020-10-09; Fix typosStefan Kangas
2020-10-08* src/ftcrfont.c (ftcrfont_open): Initialize the `max_width` fieldStefan Monnier
On a 32bit build, Emacs can otherwise crash with a !FIXNUM_OVERFLOW_P assertion in `Ffont_info` by simply doing `emacs -Q` and then `C-s`. * src/font.c: Try and detect uninitialized `max_width` fields. (font_make_object): Set max_width to a silly value. (Ffont_info): Check the value is not silly any more.
2020-10-08Fix current-line hscrolling when overlays changeEli Zaretskii
* src/xdisp.c (redisplay_internal): Disable "optimization 1" when auto-hscrolling current line and we're redisplaying the selected window. (Bug#43835)
2020-10-07* Fix failure when eln-cache is removed (introduced by 4a1bb46260)Andrea Corallo
* src/comp.c (make_directory_wrapper, make_directory_wrapper_1): New functions. (Fcomp_el_to_eln_filename): If base_dir is not specified and we are searching across `comp-load-path' try to create a directory if does not exists.
2020-10-07Update documentation on this-command-keys to reflect new behaviorLars Ingebrigtsen
* doc/lispref/commands.texi (Command Loop Info): `this-command-keys' does not include the C-u any more, so remove that from the description and the example (bug#22107). * src/keyboard.c (Fthis_single_command_keys): Don't say that `this-command-keys' returns the C-u prefix (bug#22111).
2020-10-06Fix crash when creating new NS frame (bug#43812)Alan Third
* src/nsterm.m (ns_clear_under_internal_border): Check the frame is live.
2020-10-06; * src/xdisp.c (Fwindow_text_pixel_size): Doc fix.Eli Zaretskii
2020-10-06* Native compiling do not target a directory with no write permissionAndrea Corallo
* src/comp.c (Fcomp_el_to_eln_filename): Check for write permission while choosing the output directory in `comp-eln-load-path'.