aboutsummaryrefslogtreecommitdiffstats
path: root/src/keyboard.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* ; * src/keyboard.c (readable_events): Fix a thinko.Eli Zaretskii2021-10-281-2/+2
|
* Ignore more events in input-pending-pEli Zaretskii2021-10-281-24/+47
| | | | | | | | | * src/keyboard.c (readable_events) (kbd_buffer_store_buffered_event): Use 'is_ignored_event' to decide whether the input event is to be ignored. (is_ignored_event): New function. (syms_of_keyboard) <input-pending-p-filter-events>: New variable. Patch from Aaron Jensen <aaronjensen@gmail.com>.
* Merge from origin/emacs-28Glenn Morris2021-10-211-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0545c70c16 (origin/emacs-28) ; * src/keyboard.c (readable_events): Ad... 805ed8d318 Fix todo-mode AOT test failures (bug#51308) 8f42ff31f6 Fix hi-lock AOT test failures (bug#51308) 8002fcd4b9 Fix socks test 4540130312 ; Fix typo 59df93e2dd * lisp/help.el (help--analyze-key): Add new arg BUFFER (bu... cb8b12b56d Improve docstrings and NEWS item of 'repeat-mode' 06fe499614 * lisp/tab-bar.el (tab-bar-menu-bar): New command (bug#512... 8358da9c4c Display a tab bar item as sunken when appropriate 29fdc65860 Fix tab bar item highlight when a mouse click is dropped 7236592668 Refer to mouse-highlight from make-pointer-invisible docst... cf4394a397 * etc/PROBLEMS: Add hex codepoint for NO-BREAK SPACE 2d647e88fa Describe how to debug fontconfig issues c916040921 Adapt Tramp tests 1bb14f93f1 Convert ANSI color definitions in themes to use faces (e.g... 8e7cd29712 Revert "Revert back to using ESC as viper-ESC-key again" 91d71b38a3 Fix inset rectangle corners when sides aren't drawn (bug#5... 5c1a575ef4 Don't use color escape sequences in vc-git-expanded-log-entry d7f595cc89 Code cleanup in tramp-tests.el 548a5db611 ; etc/NEWS fix wording # Conflicts: # etc/NEWS
| * ; * src/keyboard.c (readable_events): Add a comment.Eli Zaretskii2021-10-211-0/+2
| |
* | Merge from origin/emacs-28Glenn Morris2021-10-141-1/+14
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9ff6999a06 (origin/emacs-28) Accept process-filter t in Tramp cf95962092 ; * doc/lispref/processes.texi (Filter Functions): Fix las... 1ad4ad0c11 Document the t value for set-process-filter in the manual b014efa1e5 * doc/misc/tramp.texi (Frequently Asked Questions): Add re... b9b78b2631 Fix Help functions for clicks on tool bar and tab bar 74deafe921 ; * etc/DEBUG: Add a section about debugging native-compil... 8153f70b9c In make_lispy_position fix Bug#50993 in rudimentary fashion 0aa52e94f3 Mark vc-switch-backend as obsolete 568e479c59 Add missing parentheses in the Emacs manual 44ce50b0df Improve tooltip of mode-line-position again 9b1adf8b4f Use browse-url-button-regexp for rcirc-url-regexp 9ed53b022d * lisp/help.el (help--analyze-key): Avoid mouse-set-point ... # Conflicts: # etc/NEWS
| * In make_lispy_position fix Bug#50993 in rudimentary fashionMartin Rudalics2021-10-141-1/+14
| | | | | | | | | | * src/keyboard.c (make_lispy_position): Do not set posn to tool- or tab-bar when track_mouse is enabled (Bug#50993).
* | Have 'while-no-input-ignore-events' handle idle timers too (Bug#49997)Martin Rudalics2021-10-121-15/+28
| | | | | | | | | | | | | | | | | | | | | | * src/keyboard.c (read_char): Use Vwhile_no_input_ignore_events to check which idle timers should be resumed (Bug#49997). (init_while_no_input_ignore_events): New function to initialize Vwhile_no_input_ignore_events. (Vwhile_no_input_ignore_events): Say in doc-string that events in this list do not stop idle timers. * lisp/subr.el (while-no-input): Remove initialization of 'while-no-input-ignore-events'; do that in keyboard.c now.
* | Allow :keys in menus to be computed dynamicallyLars Ingebrigtsen2021-10-111-1/+3
| | | | | | | | | | | | | | * doc/lispref/keymaps.texi (Extended Menu Items): Document it (bug#28930). * src/keyboard.c (parse_menu_item): Allow :keys to be a function.
* | Merge from origin/emacs-28Glenn Morris2021-10-071-1/+2
|\ \ | |/ | | | | 7cb98ba057 (origin/emacs-28) ; * src/keyboard.c (make_lispy_position)...
| * ; * src/keyboard.c (make_lispy_position): Avoid GCC warning. (Bug#51076)Eli Zaretskii2021-10-071-1/+2
| |
* | Add new user option 'translate-upper-case-key-bindings'Lars Ingebrigtsen2021-10-041-7/+20
|/ | | | | | | | | * doc/lispref/commands.texi (Key Sequence Input): Document it. * lisp/cus-start.el (standard): defcustom it. * src/keyboard.c (read_key_sequence): Use it. (syms_of_keyboard): New variable 'translate-upper-case-key-bindings'.
* ; * src/keyboard.c (Frecursive_edit): Minor fixes of the doc string.Eli Zaretskii2021-09-201-5/+6
|
* Improve documentation of exiting recursive editingMiha Rihtaršič2021-09-201-4/+14
| | | | | | | * doc/lispref/commands.texi (Recursive Editing): Mention what happens when throwing a string or any other value to 'exit. * src/keyboard.c (Frecursive_edit): Document throwing a function to 'exit (bug#49700).
* ; * src/keyboard.c (make_lispy_position): Fix a recent change.Eli Zaretskii2021-09-111-1/+4
|
* Fix tab-bar scrolling for mice that report mouse-wheel eventsEli Zaretskii2021-09-111-12/+37
| | | | | | | | | * src/keyboard.c (make_lispy_position): Call 'window_from_coordinates' with last 2 arguments non-zero, to have it report on tool-bar and tab-bar positions. Tweak the return value according to the expectations of 'make_lispy_event'. (make_lispy_event): No more need to inject "tab-bar" into a click event on the tab bar: it's already there.
* Merge branch 'feature/tab-bar-events'Juri Linkov2021-09-091-0/+6
|\
| * Redesign tab-bar event processing (bug#41342, bug#41343)Juri Linkov2021-08-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of emitting menu-item keys like [tab-1], emit normal mouse events like [mouse-1] and [down-mouse-3] for all mouse clicks issued on the tab-bar. * lisp/mouse.el (mouse-posn-property): Handle 'tab-bar' posn-area. * lisp/tab-bar.el (tab--key-to-number): New internal function. (tab-bar-handle-mouse): Use tab key to select/close tab. (tab-bar-mouse-select-tab, tab-bar-mouse-close-tab) (tab-bar-mouse-context-menu): New commands. (tab-bar-map): Bind [down-mouse-1] to tab-bar-mouse-select-tab, [down-mouse-2] to tab-bar-mouse-close-tab, [down-mouse-3] to tab-bar-mouse-context-menu. (tab-bar-keymap-cache): Remove. (tab-bar-make-keymap): Don't use cache. (tab-bar--format-tab): Remove default bindings from menu items. (tab-bar-make-keymap-1): Prepend tab-bar-map. * src/keyboard.c (make_lispy_event): Append event->arg to position for Qtab_bar. * src/term.c (handle_one_term_event): Simplify to set event arg. * src/w32inevt.c (do_mouse_event): Set emacs_ev->arg to the value returned from tty_handle_tab_bar_click. * src/w32term.c (w32_handle_tab_bar_click): Return value from handle_tab_bar_click. (w32_read_socket): Set tab_bar_key to value returned from w32_handle_tab_bar_click, and set event arg from it. * src/xdisp.c (handle_tab_bar_click): Instead of emitting event, return a list with Qtab_bar and tab caption with text properties that contain Qmenu_item with key and binding. (tty_handle_tab_bar_click): Simplify to return a list of Qtab_bar, key and close_p, instead of emitting event. * src/xterm.c (handle_one_xevent): Set tab_bar_key to value returned from handle_tab_bar_click, and set event arg from it.
* | Allow kmacros to end with C-g in minibufferMiha Rihtaršič2021-09-081-0/+4
| | | | | | | | | | * src/keyboard.c (cmd_error): If a command causes a minibuffer-quit condition, record its key in a keyboard macro (bug#48603).
* | Fix segfault with invalid key-translation-map bindingEli Zaretskii2021-09-011-2/+1
| | | | | | | | | | | | * src/keyboard.c (access_keymap_keyremap): Don't assume an invalid function is specified as a symbol. Reported by Perry E. Metzger <perry@piermont.com>.
* | In batch mode, avoid killing Emacs with C-g in the minibufferMiha Rihtaršič2021-09-011-18/+19
| | | | | | | | | | * src/keyboard.c (Fcommand_error_default_function): Don't kill emacs when handling the minibuffer-quit condition (bug#48603).
* | Make run-at-time try harder to run at integral multiplesLars Ingebrigtsen2021-08-311-1/+1
|/ | | | | | | | | | | * lisp/emacs-lisp/timer.el (timer): Add new slot integral-multiple. (timerp): Adjust. (timer-event-handler): Recompute the delay if requested (bug#39099). (run-at-time): Mark the timer as recomputable if given a t parameter. * src/keyboard.c (decode_timer): Adjust.
* Fix problem where an error would change standard-outputLars Ingebrigtsen2021-08-131-2/+4
| | | | | | * src/keyboard.c (cmd_error): Don't set standard-output/standard-input (bug#30529). Instead bind them temporarily while handling the error.
* Make input of multi-key inputs in different emacsclients more logicalLogan Perkins2021-07-211-10/+16
| | | | | * src/keyboard.c (read_key_sequence): Don't continue the input of multi-key commands in one emacsclient in another (bug#39687).
* Make `C-g' after `M-x' not give a backtrace unless requiredLars Ingebrigtsen2021-07-211-2/+2
| | | | | | | | * src/eval.c (signal_quit_p): New function. (maybe_call_debugger): React to all `quit' signals (bug#49675). * src/keyboard.c (cmd_error_internal, menu_item_eval_property_1): Ditto.
* Quit minibuffers without aborting kmacrosMiha Rihtaršič2021-07-201-12/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/lispref/commands.texi (Quitting): Document `minibuffer-quit' (Recursive Editing): Document throwing of function values to `exit'. * doc/lispref/errors.texi (Standard Errors): Document `minibuffer-quit' * lisp/minibuffer.el (minibuffer-quit-recursive-edit): New function. * lisp/simple.el (minibuffer-error-function): Do not abort keyboard macro execution if is minibuffer-quit is signaled (bug#48603). * src/data.c (syms_of_data): New error symbol `minibuffer-quit' * src/keyboard.c (recursive_edit_1): Implement throwing of function values to `exit`. In that case, the function will be called without arguments before returning from the command loop. (cmd_error): (Fcommand_error_default_function): Do not abort keyboard macro execution if minibuffer-quit is signaled. (command_loop_2): New argument HANDLERS. * src/macros.c (Fexecute_kbd_macro): Use command_loop_2 instead of command_loop_1. * src/minibuf.c (Fabort_minibuffers): Use it.
* Clarify event-convert-list doc stringLars Ingebrigtsen2021-07-181-2/+5
| | | | | * src/keyboard.c (Fevent_convert_list): Clarify that the base type returned isn't always the same (bug#7631).
* Clarify overriding-local-map doc stringLars Ingebrigtsen2021-07-151-4/+5
| | | | | * src/keyboard.c (syms_of_keyboard): Clarify `overriding-local-map' vs. text properties/overlays (bug#16312).
* * src/keyboard.c (read_decoded_event_from_main_queue): Fix paren typoStefan Monnier2021-06-051-1/+1
|
* Support terminal emulators that encode the Meta modifier as 8th bitMax Mikhanosha2021-06-051-10/+43
| | | | | | | | | | | | | | | | | | | | See discussion starting at https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00034.html for the details. * src/keyboard.c (read_decoded_event_from_main_queue): For raw-text encoed input, if Meta bit is encoded, apply the Meta modifier to single-byte characters that have the 0x80 bit set. For input encoded otherwise, if the Meta bit is encoded, remove the 0x80 bit after decoding the characters. (tty_read_avail_input): Reset the 0x80 bit only if Meta bit is not encoded. (Fset_input_meta_mode): Support 'encoded' as the value of META. (Fset_input_mode): Document 'encoded' for META. (Fcurrent_input_mode): Support and document 'encoded' as the value of META. (syms_of_keyboard): DEFSYM 'encoded'.
* Cross-reference the message/error control variablesLars Ingebrigtsen2021-06-031-1/+4
| | | | | | | * src/keyboard.c (syms_of_keyboard): Mention set-message-function in the command-error-function doc string... * src/xdisp.c (syms_of_xdisp): ... and vice versa (bug#13752).
* * src/keyboard.c (make_lispy_event): Fix previous.Glenn Morris2021-05-311-1/+1
|
* Correct mouse handling when window origin changes between down and up eventsAlan Mackenzie2021-05-311-13/+51
| | | | | | | | | | | | | | Do this by using frame relative positions rather than window relative ones, which gave rise to spurious drag events when the origin of the window changed between the mouse down and up events. This fixes bug #48409. * keyboard.c (frame_relative_event_pos): New static variable. (make_lispy_event): Record frame relative position of down event. When the up event is in the same position, "move" this event into the window of the down event when this window (typically a mini-window) is no longer under the mouse. Call make_lispy_position a second time to generate this changed event. (syms_of_keyboard): Declare Qwindow_edges. static_pro frame_relative_event_pos.
* Fix key recording bug when an input method is activatedGregory Heytings2021-05-291-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | * lisp/international/quail.el (quail-add-unread-command-events): New function. (quail-start-translation, quail-start-conversion) (quail-update-translation, quail-next-translation) (quail-prev-translation, quail-next-translation-block) (quail-prev-translation-block, quail-minibuffer-message): Use 'quail-add-unread-command-events' (and partly revert commit 03e3440dbb). (Bug#48042) * lisp/subr.el (inhibit--record-char): Now obsolete. * lisp/term/xterm.el (xterm--init): New function, with most of the code of former 'terminal-init-xterm'. (terminal-init-xterm): Clear the lossage after terminal initialization (see Bug#44908). (xterm--read-event-for-query): Do not use 'inhibit--record-char' anymore (revert commit 3e6525d69f). * src/keyboard.c (syms_of_keyboard): Remove 'inhibit--record-char' (partly revert 03e3440dbb). (record_char, syms_of_keyboard_for_pdumper): Do not use 'inhibit_record_char anymore'.
* Major rewrite of adjust_frame_sizeMartin Rudalics2021-04-271-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Have adjust_frame_size pass native frame sizes to backends instead of text sizes. Expand frame size history management. Drop PIXELWISE argument from change_frame_size and convert native to text sizes only when calling adjust_frame_size. Use convention in arguments that -1 instead of 0 means that no size change is required. When adjusting frame sizes pick up delayed size changes (Bug#46827). * lisp/frame.el (frame-notice-user-settings, make-frame): Don't set frame size history. (frame--size-history): Rewrite doc-string. Handle new formats of `frame-size-history' entries. * src/dispextern.h (delayed_size_change): Extern it. (change_frame_size): Drop last argument from extern. * src/dispnew.c (delayed_size_change): Make it global. (handle_window_change_signal): Reformat. Drop last argument from change_frame_size call. (do_pending_window_change, init_display_interactive): Drop last argument from change_frame_size call. (change_frame_size_1): NEW_WIDTH and NEW_HEIGHT now specify native sizes. Drop last argument PIXELWISE. Queue a change when it either differs from F's current pixel sizes or F's previously queued sizes. Inject frame_size_history_extra call when queuing. Adopt convention that for queued sizes -1 means that no size change is required. Convert from native to text sizes when calling adjust_frame_size. (change_frame_size): Drop last argument PIXELWISE and drop it also in change_frame_size_1 calls. * src/frame.c (frame_size_history_add): Remove. (frame_inhibit_resize): Remove call to frame_size_history_add. (set_menu_bar_lines, set_tab_bar_lines): Simplify. Drop last argument from change_frame_size call. (frame_windows_min_size): No more static. (keep_ratio): Minor rewrite using macros. (frame_size_history_adjust, frame_size_history_plain) (frame_size_history_extra): New functions. (adjust_frame_size): Major rewrite. Adopt new convention that negative values for new sizes mean no change. Pick up delayed size changes from F's new_width and new_height slots (Bug#46827). Call set_window_size_hook with native instead of text sizes. Do not sanitize window sizes any more. Call frame_size_history_adjust instead of frame_size_history_add. Always set F's resized_p slot to true. (make_frame): Initialize new_width and new_height slots to -1. Simplify setup of initial sizes and an adjust_frame_size call. (Fframe_parameters): Drop processing F's new_pixelwise slot. (check_frame_pixels): Reorder to make declarations appear first. (Fset_frame_height, Fset_frame_width, Fset_frame_size): Pass explicit width and height values to adjust_frame_size instead of -1. (gui_set_frame_parameters): Minor rewrite making sure that explicit sizes and the corresponding parameter are passed to adjust_frame_size. Remove frame_size_history_add call. (gui_figure_window_size): Drop last two arguments. Simplify assignment of initial size. Set new_height and new_width slots to -1. Use adjust_frame_size to set sizes instead of returning them to caller. (syms_of_frame): Drop symbols used by frame size history; these are now built on-the-fly. Also drop some menu bar related symbols in favor of Qmenu_bar_lines. * src/frame.h (struct frame): Remove new_pixelwise. (SET_FRAME_COLS, SET_FRAME_LINES, SET_FRAME_WIDTH) (SET_FRAME_HEIGHT): Remove macros. (frame_size_history_add): Remove externs. (frame_windows_min_size, frame_size_history_plain) (frame_size_history_extra): Add externs. (FRAME_WINDOWS_WIDTH, FRAME_WINDOWS_HEIGHT): Rename to FRAME_INNER_WIDTH and FRAME_INNER_HEIGHT. (gui_figure_window_size): Drop last two arguments from extern. * src/gtkutil.c (xg_frame_resized): Rename arguments to WIDTH and HEIGHT. Consult delayed_size_change to handle case where WIDTH and HEIGHT do not match F's new_width and new_height values. Call change_frame_size with native sizes and without PIXELWISE argument. Instead of frame_size_history_add call frame_size_history_extra. (xg_frame_set_char_size): WIDTH and HEIGHT are native sizes now; fix adjust_frame_size call accordingly. Instead of frame_size_history_add call frame_size_history_extra. (style_changed_cb): Call xg_frame_set_char_size with native instead of text sizes. (tb_size_cb): Remove frame_size_history_add call. Call adjust_frame_size with INHIBIT 5. (free_frame_tool_bar, xg_change_toolbar_position): Remove frame_size_history_add call. (update_frame_tool_bar): Call adjust_frame_size with INHIBIT 2 and let it handle frame_inhibit_implied_resize and fullheight/-width. Remove frame_size_history_add call. * src/keyboard.c (Fsuspend_emacs): Call change_frame_size with native sizes. * src/nsfns.m (ns_set_tool_bar_lines): Call adjust_frame_size with INHIBIT 2 and let it handle frame_inhibit_implied_resize and fullheight/-width. Remove frame_size_history_add call. (Fx_create_frame): Drop two last arguments in gui_figure_window_size call. Do not SET_FRAME_WIDTH and SET_FRAME_HEIGHT, the adjust_frame_size in gui_figure_window_size did that already. * src/nsterm.m (ns_set_window_size): Drop PIXELWISE argument and its processing; WIDTH and HEIGHT represent native pixel sizes now. Call change_frame_size with native sizes. Remove call to frame_size_history_add. ([EmacsView viewDidResize:]): Call change_frame_size with native sizes. * src/term.c (Fresume_tty): Call change_frame_size with native sizes. * src/termhooks.h (*set_window_size_hook): Drop last argument PIXELWISE. * src/w32fns.c (w32_change_tab_bar_height) (w32_change_tool_bar_height): Fix handling of these in the initial phase before they have been resized at least once. (Fx_create_frame, w32_create_tip_frame): Drop two last arguments in gui_figure_window_size call. Do not SET_FRAME_WIDTH and SET_FRAME_HEIGHT (or SET_FRAME_COLS and SET_FRAME_LINES), the adjust_frame_size in gui_figure_window_size did that already. * src/w32inevt.c (resize_event, maybe_generate_resize_event): Pass native sizes to change_frame_size. * src/w32term.c (w32_read_socket): When WM_WINDOWPOSCHANGED pass native sizes to change_frame_size. (w32_new_font): Recalculate FRAME_TAB_BAR_HEIGHT. Simplify code. (w32fullscreen_hook): Call change_frame_size with native sizes. (w32_set_window_size): Drop argument PIXELWISE and its processing; WIDTH and HEIGHT are native sizes now. Remove frame_size_history_add calls. Pass native sizes to change_frame_size. * src/widget.c (set_frame_size): Set width and height of widget directly. Call frame_size_history_plain instead of frame_size_history_add. (update_from_various_frame_slots): Call frame_size_history_extra. (EmacsFrameRealize): Call frame_size_history_plain. (EmacsFrameResize): Call change_frame_size with native sizes. Call frame_size_history_extra instead of frame_size_history_add. (EmacsFrameSetCharSize): Call frame_size_history_extra. Drop PIXELWISE argument in x_set_window_size call and specify pixels. (pixel_to_text_size): Remove function. * src/xdisp.c (resize_mini_window): Replace FRAME_WINDOWS_HEIGHT with FRAME_INNER_HEIGHT. (redisplay_tab_bar): Don't set tab_bar_redisplayed when we did not redisplay it. (redisplay_tool_bar): Don't call it for external tool bar. Don't set tool_bar_redisplayed when we did not redisplay it. (redisplay_window): When the tool bar is external call update_frame_tool_bar directly. * src/xfns.c (x_set_menu_bar_lines): Call adjust_frame_size only if number of menu bar lines changed and fix 6th argument. (x_change_tab_bar_height, x_change_tool_bar_height): Fix handling of these in the initial phase before they have been resized at least once. (Fx_create_frame, x_create_tip_frame): Drop two last arguments in gui_figure_window_size call. Do not SET_FRAME_WIDTH and SET_FRAME_HEIGHT (or SET_FRAME_COLS and SET_FRAME_LINES), the adjust_frame_size in gui_figure_window_size did that already. * src/xmenu.c (update_frame_menubar): Fix 6th arg of adjust_frame_size call. (free_frame_menubar): For Motif frames fix fullscreen and `frame-inhibit-implied-resize' handling. Fix 6th arg of adjust_frame_size calls. * src/xterm.c (x_net_wm_state): Remove call to frame_size_history_add. (handle_one_xevent): For PropertyNotify and UnmapNotify events add frame_size_history_plain calls. For MapNotify and ConfigureNotify events add a frame_size_history_extra call. For ConfigureNotify events also handle delayed size changes and call change_frame_size with native sizes. (x_new_font): Recalculate FRAME_TAB_BAR_HEIGHT. Simplify code. (x_handle_net_wm_state): Remove frame_size_history_add call. (x_check_fullscreen): Remove frame_size_history_add call. Call change_frame_size with native height. (x_set_window_size_1): WIDTH and HEIGHT are now native. Remove some frame_size_history_add calls and add frame_size_history_extra calls instead. If the frame is not visible call adjust_frame_size directly instead of calling change_frame_size. (x_set_window_size): Drop PIXELWISE argument. WIDTH and HEIGHT represent native sizes now. (x_make_frame_visible, x_make_frame_invisible): Call frame_size_history_plain. * src/xterm.h (x_set_window_size): Drop last argument from extern declaration.
* * src/keyboard.c (Flossage_size): Improve prompt.Stefan Kangas2021-04-251-1/+1
|
* Fix unclean "can't happen" error handling in read_minibuf_unwindAlan Mackenzie2021-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Also fix a bug where, with minibuffer-follows-selected-frame neither nil nor t, a minibuffer could appear in two frames at the same time. * src/window.c (Fset_window_configuration): Add a new &optional parameter DONT-SET-MINIWINDOW, which inhibits the minibuffer from being restored from the supplied window configuration. (restore_window_configuration): Enhance to match the above. * src/minibuf.c (read_minibuf): Enhance the argument list to the restore_window_configuration calls to match the above. In the main case, restoring the minibuffer is inhibited. (read_minibuf_unwind): Should the frame with the expired minibuffer not be found ("can't happen"), unwind the stacked data nevertheless, rather than just exiting. * src/keyboard.c (read_char_help_form_unwind): Amend a call of Fset_window_configuration. * doc/lispref/windows.texi (Window Configurations): Document the new form of set-window-configuration. * etc/NEWS (Lisp Changes in Emacs 28.1): Amend the entry for set-window-configuration.
* Extend handled events in 'while-no-input-ignore-events' (Bug#47205)Michael Albinus2021-03-181-0/+6
| | | | | | | * 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)
* * src/keyboard.c parse_solitary_modifier): Accept `click` modifierStefan Monnier2021-03-121-0/+1
|
* Merge from origin/emacs-27Glenn Morris2021-03-121-2/+0
|\ | | | | | | | | fc83f37951 Fix initialization of 'while-no-input-ignore-events' 8f603da44c Update documentation of reading passwords
| * Fix initialization of 'while-no-input-ignore-events'Eli Zaretskii2021-03-051-2/+0
| | | | | | | | | | | | * src/keyboard.c (syms_of_keyboard_for_pdumper): Don't reset 'while-no-input-ignore-events' after loading the dump file. (Bug#46940)
| * Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* | * lisp/subr.el (esc-map): Initialize inside declarationStefan Monnier2021-01-041-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/commands.h (meta_map): * src/keymap.c (meta_map): Delete variable. (syms_of_keymap): Don't initialize esc-map here. (initial_define_key): * src/keymap.h (initial_define_key): Delete function. * src/keyboard.c (keys_of_keyboard): Don't initialize esc-map here. * src/window.h (keys_of_window): * src/window.c (keys_of_window): Delete function. * src/lisp.h (keys_of_casefiddle): * src/casefiddle.c (keys_of_casefiddle): Delete function. * src/emacs.c (main): Don't call them.
* | * lisp/subr.el (ctl-x-map): Initialize inside the declaration.Stefan Monnier2021-01-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/command.h (control_x_map): * src/keymap.c (control_x_map): Delete variable. (syms_of_keymap): * src/keyboard.c (keys_of_keyboard): * src/casefiddle.c (keys_of_casefiddle): * src/window.c (keys_of_window): Move initialization of ctl-x-map to subr.el. * src/lisp.h (syms_of_buffer): * src/buffer.c (keys_of_buffer): Delete function. * src/emacs.c (main): Don't call it.
* | * lisp/subr.el (global-map): Initialize inside declaration.Stefan Monnier2021-01-041-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/commands.h (global_map): * src/keymap.c (global_map): Delete variable. (syms_of_keymap): Don't initialize global_map here. (keys_of_keymap): Delete function. * src/lisp.h (keys_of_cmds): * src/cmds.c (keys_of_cmds): Delete function. * src/emacs.c (main): Don't call them. * src/window.c (keys_of_window): Don't initialize global_map here. * src/keyboard.c (keys_of_keyboard): Don't initialize global_map here.
* | * src/xdisp.c (syms_of_xdisp): New var redisplay-skip-fontification-on-inputStefan Monnier2021-01-041-1/+1
| | | | | | | | | | | | | | (handle_fontified_prop): Use it. * src/keyboard.h (input_was_pending): Declare. * src/keyboard.c (input_was_pending): Make non-static.
* | Add overflow check for INPUT_EVENT_POS_MINPaul Eggert2021-01-011-1/+2
| | | | | | | | | | | | | | | | * src/keyboard.c (INPUT_EVENT_POS_MIN): Don’t assume (-1 - INPUT_EVENT_POS_MAX) fits into ptrdiff_t. This fixes a purely-theoretical problem that cannot occur on two’s-complement arithmetic. The Solaris 10 compiler still complains incorrectly, but oh well.
* | Update copyright year to 2021Paul Eggert2021-01-011-1/+1
| | | | | | | | Run "TZ=UTC0 admin/update-copyright".
* | Add a new recursively bound `current-minibuffer-command' variableLars Ingebrigtsen2020-12-141-0/+7
| | | | | | | | | | | | | | | | | | | | * doc/lispref/commands.texi (Command Loop Info): Document it (bug#45177). * src/callint.c (Fcall_interactively): Bind it. * src/keyboard.c (syms_of_keyboard): Define current-minibuffer-command.
* | Followup to recent changes in keyboard.cEli Zaretskii2020-12-121-0/+2
| | | | | | | | | | | | | | * src/keyboard.c (prev_kbd_event): Now defined only if HAVE_X11. * lisp/subr.el (while-no-input-ignore-events): Remove 'buffer-switch': no longer used or defined. (Bug#5803)
* | * src/keyboard.c: Fix bug#5803.Stefan Monnier2020-12-121-58/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A long time ago, `read_key_sequence` used to read the keymaps at the start, so if something happened between this start and the moment the user actually hits a key, `read_key_sequence` could end up using the wrong keymaps. To work around this problem, the code used `record_asynch_buffer_change` to try and trigger `read_key_sequence` to re-read the keymaps in some known cases. Several years ago, `read_key_sequence` was changed so as to read the keymaps only once the user hits a key, making this machinery now redundant (and also harmful apparently in bug#5803 because it introduces "spurious" events). So we here remove `record_asynch_buffer_change` and the `BUFFER_SWITCH_EVENT` and `Qbuffer_switch` pseudo-events it generated. * src/termhooks.h (enum event_kind): Delete `BUFFER_SWITCH_EVENT`. * src/keyboard.c: (record_asynch_buffer_change): Delete function. (syms_of_keyboard): Delete `Qbuffer_switch`. (force_auto_save_soon, readable_events) (kbd_buffer_store_buffered_event, kbd_buffer_get_event) (make_lispy_event): * src/xterm.c (handle_one_xevent): * src/w32term.c (w32_read_socket): * src/process.c (wait_reading_process_output) (read_and_dispose_of_process_output, exec_sentinel): Simplify accordingly.