summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Fix display of stretch glyphsEli Zaretskii2021-09-172-38/+10
| | | | | | | | | * src/xterm.c (x_draw_stretch_glyph_string): * src/w32term.c (w32_draw_stretch_glyph_string): Fix drawing stretch glyphs when the window is hscrolled. (The original pre-Jan-2021 code was almost correct, except that it used 'window_box_left_offset' instead of 'window_box_left', and didn't restrict the background_width fixup to text-area.) (Bug#50564)
* ; * src/minibuf.c (Ftest_completion): Clarify doc string.Eli Zaretskii2021-09-161-2/+2
|
* Clarify test-completion doc stringLars Ingebrigtsen2021-09-161-0/+4
| | | | | * src/minibuf.c (Ftest_completion): Clarify what it means to be a valid completion (bug#50583).
* Doc fix for y-or-n-p; trailing space is no longer neededStefan Kangas2021-09-161-2/+4
| | | | | | | | | | * doc/lispref/minibuf.texi (Yes-or-No Queries): * doc/lispref/os.texi (Suspending Emacs): * doc/lispref/tips.texi (Programming Tips): * doc/misc/gnus-faq.texi (FAQ 5-9): * lisp/subr.el (y-or-n-p): * src/fns.c (Fyes_or_no_p): Doc fix to reflect that a trailing space is no longer needed; one is added or removed automatically.
* Avoid crashes due to clearing of a frame's face cacheEli Zaretskii2021-09-153-9/+11
| | | | | | | | | * src/xfaces.c (clear_face_cache): Don't clear fonts and faces of a frame that is being redisplayed, just because it's time for some routine maintenance. (Bug#50571) * src/xdisp.c (redisplay_internal): * src/frame.h (struct frame) <inhibit_clear_image_cache>: Update commentary of using this struct member.
* Avoid compiler warnings in comp.c on MS-WindowsEli Zaretskii2021-09-151-4/+16
| | | | | | * src/comp.c (DEF_DLL_FN, init_gccjit_functions): Don't load and don't define functions/macros if libgccjit doesn't have them, to avoid compiler warnings.
* A further fix for toolbar visibility problems on macOS (bug#50534)Alan Third2021-09-141-5/+3
| | | | | * src/nsterm.m (ns_update_begin): Ensure the toolbar's visibility is set correctly.
* Fix incorrectly appearing toolbar on NS (bug#50534)Alan Third2021-09-142-3/+2
| | | | | | | | | * src/nsmenu.m (update_frame_tool_bar): Ensure both sides of the test are booleans. * src/nsterm.m ([EmacsWindow createToolbar:]): Make the toolbar non-visible initially, in case things get out of sync. Remove call to update_frame_tool_bar: the window isn't yet associated with the view, so it will return immediately.
* * Clean-up some unnecessary macro usage in comp.cAndrea Corallo2021-09-131-11/+6
| | | | | | | * src/comp.c (emit_static_object) (Fcomp_native_driver_options_effective_p, add_driver_options) (Fcomp__compile_ctxt_to_file, Fcomp_libgccjit_version): Clean-up unenecessary 'defined (WINDOWSNT)' usage.
* Support mouse events clicked on the tab bar but outside of any tab (bug#41343)Juri Linkov2021-09-131-1/+1
| | | | | | | | | | | | | | | | * lisp/tab-bar.el (tab-bar--key-to-number): Return non-nil non-numeric t when no tab is used. Return nil for current-tab. (tab-bar-mouse-select-tab, tab-bar-mouse-close-tab): Do nothing when tab-bar--key-to-number returns non-nil non-numeric t for click events outside of any tab. (tab-bar-mouse-context-menu): Add context menu when mouse is clicked outside of tabs. Add "Duplicate" alongside with "Close" to the menu used when mouse is clicked on a tab. (toggle-tab-bar-mode-from-frame, toggle-frame-tab-bar): Move code closer to 'tab-bar-show'. * src/xdisp.c (handle_tab_bar_click): Return Qtab_bar with empty list when mouse is clicked on the tab bar but outside of any tab.
* Change value of DEFAULT_TAB_BAR_BUTTON_MARGIN from 4 to 1 (bug#50424)Juri Linkov2021-09-131-1/+1
|
* ; * src/w32term.c (w32_read_socket): Avoid compiler warning.Eli Zaretskii2021-09-111-2/+2
|
* ; * src/keyboard.c (make_lispy_position): Fix a recent change.Eli Zaretskii2021-09-111-1/+4
|
* Fix display of tab-bar buttonsAlan Third2021-09-112-6/+6
| | | | | | | * src/xterm.c (x_draw_image_relief): * src/w32term.c (w32_draw_image_relief): Fix the display of tab-bar buttons when mouse pointer moves off the button. (Bug#50424)
* 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.
* Fix restoring from pdumper file on MS-Windows 9XEli Zaretskii2021-09-111-1/+14
| | | | | | * src/pdumper.c (dump_map_file_w32): Use PAGE_WRITECOPY flag when calling CreateFileMapping for DUMP_MEMORY_ACCESS_READWRITE access, as that is required by Windows 9X. (Bug#50453)
* Add support for GCC compiler command-line optionsArthur Miller2021-09-101-0/+58
| | | | | | | | | * lisp/emacs-lisp/comp.el ('native-comp-compiler-options): New option. * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Add support for new 'native-comp-compiler-options'. * src/comp.c (Fcomp_native_compiler_options_effective_p): New function. (add_compiler_options): New function. (Fcomp__compile_ctxt_to_file): Call 'add_compiler_options'.
* Merge branch 'feature/tab-bar-events'Juri Linkov2021-09-099-97/+83
|\
| * Improve tab-bar event handling (bug#41343)Juri Linkov2021-09-054-35/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/tab-bar.el (tab-bar--key-to-number): Rename from tab--key-to-number. (tab-bar--event-to-item): New function from tab-bar-handle-mouse. (tab-bar-mouse-select-tab, tab-bar-mouse-close-tab) (tab-bar-mouse-context-menu, tab-bar-mouse-move-tab): Use tab-bar--event-to-item. * src/menu.c (x_popup_menu_1): Handle Qtab_bar in the second list element. * src/xdisp.c (tty_get_tab_bar_item): Change arg 'end' to bool 'close_p'. (tty_get_tab_bar_item): Detect if the close button was clicked. (tty_handle_tab_bar_click): Return a list with caption that has text properties.
| * Mouse wheel scrolling on the tab barJuri Linkov2021-08-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/tab-bar.el (tab-bar-map): Bind mouse-4/wheel-up/wheel-left to tab-previous and mouse-5/wheel-down/wheel-right to tab-next. Bind S-mouse-4/wheel-up/wheel-left to tab-bar-move-tab-backward and S-mouse-5/wheel-down/wheel-right to tab-bar-move-tab. (tab-bar-move-tab-backward): New command. (tab-bar-move-repeat-map): Use tab-bar-move-tab-backward instead of lambda. * src/xterm.c (handle_one_xevent): Remove restriction to allow clicking mouse-4 and mouse-5.
| * Bind [drag-mouse-1] to tab-bar-mouse-move-tab on tab-bar-mapJuri Linkov2021-08-181-4/+1
| | | | | | | | | | | | | | | | | | * lisp/tab-bar.el (tab-bar-mouse-move-tab): New command. (tab-bar-map): Bind [drag-mouse-1] to tab-bar-mouse-move-tab. (tab-bar-select-tab): Zero or nil arg means the current tab. * src/xdisp.c (handle_tab_bar_click): Remove restriction to allow dragging the tab to another tab.
| * Redesign tab-bar event processing (bug#41342, bug#41343)Juri Linkov2021-08-188-80/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 display of tab-bar buttonsEli Zaretskii2021-09-072-10/+16
| | | | | | | | | | | | | | | | | | | | * src/xterm.c (x_draw_image_relief): * src/w32term.c (w32_draw_image_relief): Fix calculation of relief thickness for tab-bar buttons. * lisp/tab-bar.el (tab-bar--load-buttons) (tab-bar-history-mode): Fix the :margin specification for tab-bar buttons. (Bug#50424)
* | Avoid segfault in command-modesBasil L. Contovounesios2021-09-041-0/+2
| | | | | | | | | | | | * src/data.c (Fcommand_modes): Check that bytecode object is interactive before accessing its interactive spec to avoid segfaulting (bug#50376).
* | Improve documentation of line truncation and wrappingEli Zaretskii2021-09-042-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/display.texi (Line Truncation, Visual Line Mode): * doc/lispref/display.texi (Truncation): Document that turning on line truncation disables wrapping, and vice versa. * src/buffer.c (syms_of_buffer) <truncate-lines>: * src/xdisp.c (syms_of_xdisp) <truncate-partial-width-windows>: Warn against turning on when 'visual-line-mode' is in effect. * lisp/simple.el (visual-line-mode): Document that this mode disables line truncation. (Bug#29664)
* | ; Fix typosStefan Kangas2021-09-034-6/+6
| |
* | Fix expansion of non-ASCII $HOMEEli Zaretskii2021-09-021-0/+2
| | | | | | | | | | * src/fileio.c (Fexpand_file_name): Make the file name multibyte if the value of $HOME is multibyte. (Bug#50266)
* | Fix 'clone-frame' on TTY framesEli Zaretskii2021-09-021-5/+6
| | | | | | | | | | | | * src/frame.c (Fmake_terminal_frame): Make a separate copy of the faces for the new frame before calling modify-frame-parameters, as on TTY frames that needs the faces already set up. (Bug#34715)
* | 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>.
* | * Add a dll loader entry for gcc_jit_context_new_cast (bug#50315)Kien Nguyen2021-09-011-0/+6
| | | | | | | | | | * src/comp.c: Add a dll loader entry for 'gcc_jit_context_new_cast' (bug#50315).
* | 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).
* | call-process doc string clarificationLars Ingebrigtsen2021-08-311-0/+2
| | | | | | | | | | * src/callproc.c (Fcall_process): Explicitly say that "output" means both stdout and stderr (bug#37906).
* | 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.
* | Implement proper type conversion in native compilerAndreas Schwab2021-08-301-108/+102
| | | | | | | | | | | | | | | | | | | | | | | | * src/comp.c (enum cast_kind_of_type): Remove. (comp_t): Add cast_ptr_to_int, cast_int_to_ptr, remove cast_type_sizes, cast_type_kind, cast_type_names, cast_union_fields, cast_union_field_biggest_type. (emit_coerce): Remove check for type size. (struct cast_type): Remove bytes_size. (define_type_punning): New function. (define_cast_from_to): Implement proper type conversion. (define_cast_functions): Adjust. (bug#50230)
* | ; * src/xfaces.c (gui_supports_face_attributes_p): Fix typo in comment.Eli Zaretskii2021-08-291-2/+2
| |
* | Disable the NS app when no frames are left (bug#14619, bug#21357, bug#23586)Alan Third2021-08-292-0/+11
| | | | | | | | | | * src/nsfns.m (Fx_create_frame): Enable the app. * src/nsterm.m (ns_delete_terminal): Disable the app.
* | Fix up deleting auto-save/killing buffer wrt. `auto-save-visited-mode'Lars Ingebrigtsen2021-08-251-3/+7
| | | | | | | | * src/buffer.c (Fkill_buffer): Respect `auto-save-visited-mode'.
* | Further checks for kill-buffer-delete-auto-save-filesLars Ingebrigtsen2021-08-251-0/+2
| | | | | | | | | | * src/buffer.c (Fkill_buffer): Check that the auto-save file exists before asking whether to delete it.
* | Improve documentation of 'inhibit-mouse-event-check'Eli Zaretskii2021-08-231-4/+5
| | | | | | | | | | | | * etc/NEWS: * src/callint.c (syms_of_callint): Fix wording of the documentation of 'inhibit-mouse-event-check'.
* | * lisp/mouse.el (context-menu-open): New command bound to [S-f10].Juri Linkov2021-08-231-1/+8
| | | | | | | | | | | | | | | | | | | | | | * doc/emacs/frames.texi (Menu Mouse Clicks): Mention S-F10 to pop up the context menu. * src/callint.c (Fcall_interactively): Use inhibit_mouse_event_check for the case 'e'. (inhibit-mouse-event-check): New variable. https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00733.html
* | Improve recently-changed docsEli Zaretskii2021-08-231-6/+5
| | | | | | | | | | | | * src/frame.c (Fnext_frame): * doc/lispref/frames.texi (Finding All Frames): Improve wording and style of the 'next-frame's documentation.
* | Clarify the documentation of `next-frame'Lars Ingebrigtsen2021-08-231-9/+15
| | | | | | | | | | | | | | * doc/lispref/frames.texi (Finding All Frames): Clarify what it means to "consider". * src/frame.c (Fnext_frame): Rewrite doc string to say what the parameters actually mean (bug#13339).
* | Add new variable 'kill-buffer/delete-auto-save-files'Lars Ingebrigtsen2021-08-231-20/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * doc/emacs/files.texi (Auto Save Files): Document it. * lisp/cus-start.el (standard): Add customize form. * lisp/files.el (delete-auto-save-files): Move definition to C (since it's used in the C layer). * src/buffer.c (Fkill_buffer): Use the new variable (and remove the old code that apparently didn't trigger for kill-buffer/delete-auto-save-files. (syms_of_buffer): Add new variable kill-buffer-delete-auto-save-files and move definition of delete-auto-save-files here (bug#21612).
* | Clarify :stderr in the make-process doc stringLars Ingebrigtsen2021-08-231-1/+4
| | | | | | | | | | * src/process.c (Fmake_process): Elaborate upon what :stderr does (bug#50166).
* | Fix recent parse-partial-sexp argument validationBasil L. Contovounesios2021-08-221-2/+2
| | | | | | | | | | | | * src/syntax.c (parse-partial-sexp): Also handle markers as arguments (bug#49944). Tweak error message to follow conventions in "(elisp) Signaling Errors".
* | Set a unique ID for eln files on macOS (bug#45934)Andrea Corallo2021-08-221-0/+9
| | | | | | | | | | * src/comp.c (Fcomp__compile_ctxt_to_file): Set gcc's -install_name parameter to the real filename.
* | Set label for NSToolbarItem (bug#50159)Masahiro Nakamura2021-08-222-0/+8
| | | | | | | | | | | | | | | | | | * src/nsmenu.m (update_frame_tool_bar): Get label text and pass it to ... ([EmacsToolbar addDisplayItemWithImage:idx:tag:labelText:helpText:enabled:]): ... this that sets label for NSToolbarItem. * src/nsterm.h ([EmacsToolbar addDisplayItemWithImage:idx:tag:labelText:helpText:enabled:]): Add labelText argument.
* | Make Qhide declaration non-target-specificMattias Engdegård2021-08-222-1/+2
| | | | | | | | | | | | * src/xfns.c (syms_of_xfns): Move DEFSYM from here... * src/menu.c (syms_of_menu): ... to here. This fixes the NS build after dd7d966eb40b.
* | Don't show menu titles with the text property 'hide' (bug#50067)Juri Linkov2021-08-221-0/+8
| | | | | | | | | | | | | | | | * lisp/mouse.el (context-menu-map): Add menu title "Context Menu" propertized with the text property 'hide'. * src/menu.c (x_popup_menu_1): Don't show the title with the non-nil text property 'hide' on GTK and NS.