aboutsummaryrefslogtreecommitdiffstats
path: root/src (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Migrate usage of GPM_CLICK_EVENT to MOUSE_CLICK_EVENT.Jared Finder2020-11-213-19/+5
| | | | | | | * src/termhooks.h (enum event_kind): * src/term.c (term_mouse_click, handle_one_term_event): * src/keyboard.c (discard_mouse_events, make_lispy_event): Migrate usage of GPM_CLICK_EVENT to MOUSE_CLICK_EVENT.
* Fix compilation on MS-Windows with librsvg > 2.46.0Eli Zaretskii2020-11-201-8/+4
| | | | | | * src/image.c (rsvg_handle_get_dimensions, init_svg_functions): Make 'rsvg_handle_get_dimensions' available and defined for all versions of librsvg. (Bug#44655)
* Avoid a compilation warning about an ambiguous elseLars Ingebrigtsen2020-11-201-4/+6
| | | | | | | | * src/data.c (set_internal): Avoid compilation warning. data.c:1443:9: error: suggest explicit braces to avoid ambiguous ‘else’ 1443 | if (idx > 0 && bindflag == SET_INTERNAL_SET | ^
* * src/data.c (set_internal): Fix bug#44733Stefan Monnier2020-11-191-4/+6
| | | | | | | | | | | Set the default value when `set` encounters a PER_BUFFER variable which has been let-bound globally, to match the behavior seen with `make-variable-buffer-local`. * test/src/data-tests.el (binding-test--let-buffer-local): Add corresponding test. (data-tests--set-default-per-buffer): Add tentative test for the performance problem encountered in bug#41029.
* * src/buffer.h (struct buffer): Remove unused field `minor_modes`Stefan Monnier2020-11-192-10/+0
| | | | | * src/buffer.c (bset_minor_modes): Remove function. (reset_buffer_local_variables, init_buffer_once): Don't set `minor_modes`.
* More string-search optimisationsMattias Engdegård2020-11-191-8/+15
| | | | | | | | | | | All-ASCII strings cannot have substrings with non-ASCII characters in them; use this fact to avoid searching entirely. * src/fns.c (Fstring_search): For multibyte non-ASCII needle and unibyte haystack, don't check if the haystack is all-ASCII; it's a waste of time. For multibyte non-ASCII needle and multibyte all-ASCII haystack, fail immediately. * test/src/fns-tests.el (string-search): Add more test cases.
* In attempted recursive minibuffer use, display error message in correct frameAlan Mackenzie2020-11-193-8/+20
| | | | | | | | | | | | | | | | | | | | | | This was problematic when minibuffer-follows-selected-frame was non-nil. Introduce a new parameter DONT-SET-FRAME to set-window-configuration. * doc/lispref/windows.texi (Window Configurations): Describe the new &optional parameter to set-window-configuration. * etc/NEWS (Lisp Changes): Note the new parameter to set-window-configuration. * src/keyboard.c (read_char_help_form_unwind): Add a new Qnil argument to the call of Fset_window_configuration. * src/minibuf.c (read_minibuf): Cons up a Qt with the window configuration in the argument to record_unwind_protect for the window configuration (twice). * src/window.c (Fset_window_configuration): Add the new &optional parameter and document it in the doc string. At the final do_switch_frame operation, restore the original frame when DONT-SET-FRAME is non-nil. (restore_window_configuration): Handle the new parameter when the supplied argument is a cons.
* Fix SVG display again (bug#44655)Alan Third2020-11-181-21/+12
| | | | | | * src/image.c (svg_load_image): Fall back to rsvg_handle_get_dimensions if we can't calculate the size of the image.
* Merge from origin/emacs-27Glenn Morris2020-11-162-12/+16
|\ | | | | | | | | | | | | 19da602991 Fix input method translation near read-only text 5aabf2cc7f Fix display of truncated R2L lines on TTY frames daff3bda10 Avoid crashes when a reversed glyph row starts with a comp... b697bb91a1 ; * .gitignore: src/fingerprint.c not generated since 2019...
| * Fix display of truncated R2L lines on TTY framesEli Zaretskii2020-11-141-2/+1
| | | | | | | | | | | | | | | | | | * src/xdisp.c (extend_face_to_end_of_line): Use a while-loop, not a do-while loop, to avoid appending an extra glyph at the end of a line that is one character shorter than the window-width. This is needed to fix display of reversed glyph rows that are almost as wide as the window, because append_space_for_newline already added one space glyph.
| * Avoid crashes when a reversed glyph row starts with a compositionEli Zaretskii2020-11-142-10/+15
| | | | | | | | | | | | | | | | | | | | * src/dispnew.c (build_frame_matrix_from_leaf_window): Add an assertion to prevent us from overwriting non-char glyphs with the vertical border glyph. * src/xdisp.c (extend_face_to_end_of_line): Account for one glyph possibly inserted by append_space_for_newline. (Bug#44506) Remove a kludgey correction for an off-by-one error in column counting, which is no longer needed.
* | Make initial frame match frame-title-formatStefan Kangas2020-11-152-15/+25
| | | | | | | | | | | | | | * src/xterm.c (x_term_init): * src/w32term.c (w32_initialize_display_info): Sync initial frame title with new value of Vframe_title_format. Problem reported by Angelo Graziosi <angelo.g0@libero.it>.
* | Work around glib messing with signal handlers more than it shouldAkira Kyle2020-11-141-5/+21
| | | | | | | | | | | | | | * src/process.c (init_process_emacs): force glib's g_unix_signal handler into lib_child_handler where it should belong. Copyright-paperwork-exempt: yes
* | Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacsEli Zaretskii2020-11-141-1/+1
|\ \
| * | Capitalize portable dump messages.Philipp Stephani2020-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We capitalize all other messages during the dump, so capitalize the "dump mode" and "dumping fingerprint" ones as well for consistency. * src/pdumper.c (Fdump_emacs_portable): Capitalize fingerprint message prefix. * lisp/loadup.el: Capitalize "dump mode" message.
* | | Face-changing text properties and help-echo now work with xterm-mouse.Jared Finder2020-11-143-38/+63
|/ / | | | | | | | | | | | | | | | | | | | | | | | | * src/dispnew.c (update_mouse_position): New function for mouse movement logic in 'handle_one_term_event' that can be shared across different mouse backends. (display--update-for-mouse-movement): New lisp function, call it. * lisp/xt-mouse.el (xterm-mouse--handle-mouse-movement): New function that calls 'display--update-for-mouse-movement'. (xterm-mouse-translate-1): Call it. * src/term.c (handle_one_term_event): Inline logic from 'term_mouse_movement' and call 'update_mouse_position'. (term_mouse_movement): Delete.
* | Merge from origin/emacs-27Glenn Morris2020-11-131-1/+2
|\ \ | |/ | | | | | | a3d316bbb7 (origin/emacs-27) Update information about refcards f43e9ad524 Avoid crashes in the daemon due to user interaction
| * Avoid crashes in the daemon due to user interactionEli Zaretskii2020-11-111-1/+2
| | | | | | | | | | | | | | * src/minibuf.c (read_minibuf): Avoid crashes in the daemon if the init file invokes some kind of minibuffer interaction, by not updating the selected frame if it's the initial frame. (Bug#44583)
* | Merge from origin/emacs-27Glenn Morris2020-11-131-3/+3
|\ \ | |/ | | | | | | | | | | | | ac1a2b2160 Add more doc-view requirements 109eb1e7e2 Fix undefined behavior when fetching glyphs from the displ... # Conflicts: # lisp/doc-view.el
| * Fix undefined behavior when fetching glyphs from the display vector.Philipp Stephani2020-11-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | You can trigger this rather obscure bug by enabling selective display if the second glyph in its display vector has an invalid face. For example, evaluate (set-display-table-slot standard-display-table 'selective-display [?A (?B . invalid)]) and then enable selective display. * src/xdisp.c (next_element_from_display_vector): Check whether next glyph code is valid before accessing it.
* | Merge from origin/emacs-27Glenn Morris2020-11-131-2/+9
|\ \ | |/ | | | | | | | | | | 75384bd155 Update the doc-view header line 13ab70c80e Avoid breaking Arabic shaping in 'window-text-pixel-size' e693d97e50 doc-view.el comment clarification 968e85a2ce Update erc documentation about C-c C-b
| * Avoid breaking Arabic shaping in 'window-text-pixel-size'Eli Zaretskii2020-11-091-2/+9
| | | | | | | | | | | | | | | | * src/xdisp.c (CHAR_COMPOSED_P): If the bidi_p flag is not set, pass -1 to composition_reseat_it, so that the shaping engine will figure out the directionality of the text. This is important, e.g., when using move_it_* functions in some context that is not redisplay, such as 'window-text-pixel-size'. (Bug#44521)
* | Fix error with fn key in NS port (bug#44533)Alan Third2020-11-131-11/+8
| | | | | | | | | | * src/nsterm.m ([EmacsView keyDown:]): Move the correction for fn key handling to before the modifiers are calculated.
* | Fix mistake in describe-buffer-bindingsStefan Kangas2020-11-121-1/+1
| | | | | | | | | | | | | | * src/keymap.c (Fdescribe_buffer_bindings): Fix a call in describe-buffer-bindings. This fixes a mistake in my previous commit to prefer the Lisp version of describe-map-tree (8a1441310aa1), where 0 was accidentally converted to Qt in two places.
* | New debugging command 'malloc-info'Eli Zaretskii2020-11-101-0/+17
| | | | | | | | | | * src/alloc.c (Fmalloc_info) [GNU_LINUX]: New command. (syms_of_alloc): Defsubr it. (Bug#43389)
* | Fix a recent change in image.c for MS-WindowsEli Zaretskii2020-11-101-1/+1
| | | | | | | | | | | | * src/image.c: Fix DEF_DLL_FN of rsvg_handle_get_intrinsic_dimensions. Reported by Andy Moreton <andrewjmoreton@gmail.com>.
* | Simplify getting value of text-quoting-style (Bug#44471)Stefan Kangas2020-11-094-45/+21
| | | | | | | | | | | | | | | | | | | | | | * src/doc.c (text_quoting_style): Remove function by merging it... (Ftext_quoting_style): ...here. Rename from Fget_quoting_style. (syms_of_doc): Update defsubr for Ftext_quoting_style. * src/lisp.h (enum text_quoting_style): Remove enum. * src/doprnt.c (doprnt): * src/editfns.c (styled_format): * lisp/help.el (substitute-command-keys): Update callers to use text-quoting-style.
* | Fix css length calculationsAlan Third2020-11-091-0/+3
| | | | | | | | | | * src/image.c (svg_css_length_to_pixels): Put in missing breaks where necessary.
* | Fix compilation of image.c on MS-WindowsEli Zaretskii2020-11-091-5/+11
| | | | | | | | | | | | | | | | This is a followup to last change in image.c. * src/image.c (rsvg_handle_get_intrinsic_dimensions): Define to call fn_rsvg_handle_get_intrinsic_dimensions. (svg_css_length_to_pixels): Compile only for librsvg >= 2.46.0, as RsvgLength type was not defined before.
* | Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacsEli Zaretskii2020-11-093-6/+110
|\ \
| * | Fix crash in ns_mouse_position (bug#44313)Alan Third2020-11-091-1/+3
| | | | | | | | | | | | | | | | | | * src/nsterm.m (ns_destroy_window): Close the window before freeing the frame resources so we don't end up accessing the frame struct after it's been freed.
| * | Calculate SVG image sizes more accurately (bug#44206)Alan Third2020-11-091-5/+97
| | | | | | | | | | | | | | | * src/image.c (svg_css_length_to_pixels): New function. (svg_load_image): Try more methods to work out the image size.
| * | Fix xwidget's webkitgtk widget overriding of Emacs SIGCHLD handlerAkira Kyle2020-11-091-0/+10
| | | | | | | | | | | | | | | | | | * src/xwidget.c (make-xwidget): Save and restore Emacs SIGCHLD signal handler since glib doesn't (but should) do this. Copyright-paperwork-exempt: yes
* | | Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacsEli Zaretskii2020-11-084-16/+31
|\ \ \ | |/ /
| * | Don't set the selected window to the miniwindow on a frame change.Alan Mackenzie2020-11-081-4/+0
| | | | | | | | | | | | | | | | | | | | | Intended to fix bug #44502. * src/minibuf.c (move_minibuffer_onto_frame): Remove the lines of code which set the selected window to the minibuffer.
| * | Merge from origin/emacs-27Glenn Morris2020-11-071-0/+4
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | f5d7fb3a2d (origin/emacs-27) Fix 'uudecode-decode-region-internal' in... d4242177da Fix 'send-string-to-terminal' writing very long strings 9da0f4026c * lisp/subr.el (read-char-from-minibuffer): Doc fix. (Bug... 9899f74e4e Merge branch 'emacs-27' of git.savannah.gnu.org:/srv/git/e... a6fcba783e Fix documentation of 'windmove-swap-states-default-keybind... f4acd7a924 Split windows evenly when 'min-margins' parameter was set ...
| | * Fix 'send-string-to-terminal' writing very long stringsEli Zaretskii2020-11-071-0/+4
| | | | | | | | | | | | | | | * src/dispnew.c (Fsend_string_to_terminal): Prevent partial writes by blocking SIGIO while 'fwrite' runs. (Bug#44320)
| | * Handle Cairo errors in ftcrfont_openPip Cet2020-11-071-2/+14
| | | | | | | | | | | | | | | | | | * src/ftcrfont.c (ftcrfont_open): Handle Cairo errors (bug#41627). (cherry picked from commit 954a4decfcc8e41084789516773b22d0adc11d91)
| * | Merge from origin/emacs-27Glenn Morris2020-11-072-12/+27
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | 53933cdf5c ; * lisp/international/mule.el (define-coding-system): Doc... e90ffcf759 * src/w32fns.c (Fw32_register_hot_key): Doc fix. (Bug#44456) 89740e9cb5 Prevent redisplay from moving point behind user's back 5932df7435 Document that the :match function for a widget takes an ex... 1b7ab9d0ac Don't render XML declaration of an HTML document (bug#44348) # Conflicts: # lisp/international/mule.el
| | * * src/w32fns.c (Fw32_register_hot_key): Doc fix. (Bug#44456)Eli Zaretskii2020-11-051-12/+15
| | |
| | * Prevent redisplay from moving point behind user's backEli Zaretskii2020-11-041-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | * src/bidi.c (bidi_at_paragraph_end, bidi_find_paragraph_start): Bind inhibit-quit to a non-nil value around calls to fast_looking_at, to prevent breaking out of redisplay_window, which temporarily moves point in buffers shown in non-selected windows. (Bug#44448)
* | | Don't leave lock files after 'replace-buffer-contents'Eli Zaretskii2020-11-071-0/+7
|/ / | | | | | | | | * src/editfns.c (Freplace_buffer_contents): Unlock the buffer's file if no changes have been made. (Bug#44303)
* | ; * src/xdisp.c (redisplay_window): Add comment for a recent change.Eli Zaretskii2020-11-071-0/+4
| |
* | Fix scrolling problems with misc-fixed fonts under CairoEli Zaretskii2020-11-071-1/+6
| | | | | | | | | | | | * src/ftcrfont.c (ftcrfont_glyph_extents): Avoid rounding up the glyph ascent to a higher value than needed due to floating-point roundoff errors. (Bug#44284)
* | Fix --enable-check-lisp-object-type buildGlenn Morris2020-11-061-1/+1
| | | | | | | | | | * src/print.c (syms_of_print) <print-integers-as-characters>: Fix type.
* | Reduce integer-output-format to print-integers-as-charactersMattias Engdegård2020-11-063-22/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The variable now only controls whether characters are printed, not the radix. Control chars are printed in human-readable syntax only when special escapes such as ?\n are available. Spaces, formatting and combining chars are excluded (bug#44155). Done in collaboration with Juri Linkov. * src/character.c (graphic_base_p): * src/print.c (named_escape): New functions. (print_object): Change semantics as described above. (syms_of_print): Rename integer-output-format. Update doc string. * doc/lispref/streams.texi (Output Variables): * etc/NEWS: * test/src/print-tests.el (print-integers-as-characters): Rename and update according to new semantics. The test now passes.
* | * src/minibuf.c (move_minibuffer_onto_frame): Fix comparisonPhilipp Stephani2020-11-051-1/+1
| |
* | Allow minibuffer to stay in its original frame. Tidy up this area.Alan Mackenzie2020-11-055-41/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/mini.texi (Basic Minibuffer): Add an entry for minibuffer-follows-selected-frame. * doc/lispref/minibuf.texi (Minibuffer Misc): Describe the new parameter to minibufferp, LIVE. * etc/NEWS: Add an entry describing the new minibuffer strategy. * lisp/cus-start.el (minibuffer-prompt-properties--setter): Add an entry for minibuffer-follows-selected-frame. * lisp/minibuffer.el (minibuffer-message): Check for the current buffer being an _active_ minibuffer rather than merely a minibuffer. * src/frame.c (do_switch_frame): Call move_minibuffer_onto_frame. * src/lisp.h (Top level): Add prototypes for move_minibuffer_onto_frame and is_minibuffer. * src/minibuf.c (minibuf_follows_frame): New function which ignores local and let-bound values of minibuffer-follows-selected-frame. (choose_minibuf_frame): Reformulate this function to reuse a minibuffer window where possible, and to ensure no other frame has its minibuffer current, but only when `minibuffer-follows-selected-frame'. (move_minibuffer_onto_frame): New function. (live_minibuffer_p): New function. (Fminibufferp): Add a new &optional parameter LIVE. Reformulate, possibly calling live_minibuffer_p. (read_minibuf): move the incrementation of minibuf_level to before the call of choose_minibuf_frame. Empty the miniwindows of frames without an active minibuffer, rather than of all but the current frame. (is_minibuffer): New function. (read_minibuf_unwind): Note the miniwindow being restored and resize all other miniwindows to zero size. (minibuffer-follows-selected-frame): New configuration variable. * src/window.c (candidate_window_p): In some scenarios, check the miniwindow holds an active minibuffer. * src/xdisp.c (get_window_cursor_type): Suppress the cursor for non-active miniwindows, regardless of minibuf_level.
* | * src/term.c (handle_one_term_event): Simplify.Stefan Monnier2020-11-043-53/+43
| | | | | | | | | | | | | | | | Remove the `hold_quit` argument which was never used. Streamline the control flow. Thanks to Jared Finder <jared@finder.org> for pointing it out. * src/keyboard.c (tty_read_avail_input): Simplify accordingly.
* | Add missing argument to directory_files_internal callsMattias Engdegård2020-11-021-2/+3
| | | | | | | | | | * src/kqueue.c (kqueue_compare_dir_list, Fkqueue_add_watch): Pass the new seventh argument.