1. 02 Sep, 2019 1 commit
  2. 01 Sep, 2019 6 commits
  3. 31 Aug, 2019 6 commits
    • Juri Linkov's avatar
      Frame-local tab-bar and window-local tab-line. · 3e0ad29a
      Juri Linkov authored
      * etc/NEWS: Add 'tab-bar-mode' and 'global-tab-line-mode'.
      
      * etc/TODO: Remove tab-related items.
      
      * lisp/cus-start.el: Add tab-bar-mode, tab-bar-max-label-size.
      
      * lisp/frame.el (frame-notice-user-settings): handle tab-bar-lines.
      
      * lisp/loadup.el: Load "tab-bar".
      
      * lisp/menu-bar.el (menu-bar-options-save): Add tab-bar-mode.
      (menu-bar-showhide-menu): Define showhide-tab-bar.
      
      * lisp/startup.el (tab-bar-images-pixel-height): New defconst.
      (command-line): Reset tab-bar-mode.
      (x-apply-session-resources): Add "tabBar", "TabBar".
      
      * lisp/subr.el (read-key): Add tab-bar.
      
      * lisp/tab-bar.el: New file.
      * lisp/tab-line.el: New file.
      
      * lisp/window.el (window--dump-frame): Add tab-bar-height.
      
      * src/dispextern.h (enum window_part): Add ON_TAB_LINE.
      (struct glyph_matrix): Add tab_line_p.
      (struct glyph_row): Add tab_line_p.
      (MATRIX_TAB_LINE_ROW): New macro.
      (MATRIX_FIRST_TEXT_ROW): Handle more mode lines.
      (MR_PARTIALLY_VISIBLE_AT_TOP): Add WINDOW_TAB_LINE_HEIGHT.
      (MATRIX_TAB_LINE_HEIGHT, CURRENT_TAB_LINE_HEIGHT)
      (DESIRED_TAB_LINE_HEIGHT): New macros.
      (enum face_id): Add TAB_BAR_FACE_ID and TAB_LINE_FACE_ID.
      (struct it): Add tab_line_p.
      (tab_bar_item_idx, tab_bar_item_image): New enums.
      (DEFAULT_TAB_BAR_LABEL_SIZE, DEFAULT_TAB_BAR_BUTTON_MARGIN)
      (DEFAULT_TAB_BAR_BUTTON_RELIEF, DEFAULT_TAB_BAR_IMAGE_HEIGHT):
      New constants.
      
      * src/dispnew.c (adjust_glyph_matrix): Use window_wants_tab_line.
      (shift_glyph_matrix): Add WINDOW_TAB_LINE_HEIGHT.
      (clear_current_matrices, clear_desired_matrices):
      Call clear_glyph_matrix on tab_bar_window.
      (blank_row): Add WINDOW_TAB_LINE_HEIGHT.
      (required_matrix_height): Change 2 to 3.
      (fake_current_matrices): Reset tab_line_p.
      (adjust_frame_glyphs_for_window_redisplay): Handle tab_bar_window.
      Add FRAME_TAB_BAR_HEIGHT and FRAME_TAB_BAR_LINES.
      (free_glyphs): Handle tab_bar_window.
      (update_frame): Handle tab_bar_window.
      (update_window): Handle row->tab_line_p.
      (scrolling_window): Change arg type from bool to int.
      Change header_line_p to tab_line_p.
      (buffer_posn_from_coords): Add window_wants_tab_line.
      (mode_line_string): Use MATRIX_TAB_LINE_ROW for part ON_TAB_LINE.
      
      * src/frame.c (frame_default_tab_bar_height): New internal variable.
      (adjust_frame_size): Handle tab_bar_window.
      (make_frame): Reset tab_bar_redisplayed, tab_bar_resized and
      last_tab_bar_item.
      (Ftab_bar_pixel_width): New function.
      (frame_parms): Add tab-bar-lines.
      (gui_figure_window_size): Add new arg tabbar_p.
      (syms_of_frame): Add Qtab_bar_size, Qupdate_frame_tab_bar,
      Qfree_frame_tab_bar, Qtab_bar_lines, Stab_bar_pixel_width.
      Add Qtab_bar_lines to frame_inhibit_implied_resize.
      (tab-bar-mode): New variable.
      
      * src/frame.h (GCALIGNED_STRUCT): Add tab_bar_window,
      desired_tab_bar_string, current_tab_bar_string.
      (GCALIGNED_STRUCT): Add tab_bar_items, last_tab_bar_item,
      minimize_tab_bar_window_p, tab_bar_redisplayed, tab_bar_resized,
      tab_bar_lines, tab_bar_height, n_tab_bar_rows, n_tab_bar_items.
      (fset_tab_bar_items, fset_tab_bar_window)
      (fset_current_tab_bar_string, fset_desired_tab_bar_string):
      New inlines.
      (FRAME_TAB_BAR_LINES, FRAME_TAB_BAR_HEIGHT): New macros.
      (FRAME_TOP_MARGIN, FRAME_TOP_MARGIN_HEIGHT):
      Use FRAME_TAB_BAR_LINES.
      
      * src/fringe.c (draw_fringe_bitmap_1, update_window_fringes):
      Add WINDOW_TAB_LINE_HEIGHT.
      
      * src/gtkutil.c (xg_frame_set_char_size): Add FRAME_TABBAR_WIDTH.
      (x_wm_set_size_hint): Add FRAME_TABBAR_WIDTH.
      
      * src/keyboard.c (read_char): Handle Qtab_bar.
      (kbd_buffer_get_event): Handle TAB_BAR_EVENT.
      (make_lispy_position): Add WINDOW_TAB_LINE_HEIGHT.
      Handle TAB_BAR_EVENT.
      (tab_bar_items_vector, tab_bar_item_properties, ntab_bar_items):
      New internal variables.
      (tab_bar_items, process_tab_bar_item, set_prop_tab_bar)
      (parse_tab_bar_item, init_tab_bar_items, append_tab_bar_item):
      New functions.
      (read_char_x_menu_prompt, read_key_sequence): Handle Qtab_bar.
      (tab-bar-separator-image-expression): New variable.
      
      * src/keymap.c (syms_of_keymap): Add Qtab_bar and Qtab_line.
      
      * src/menu.c (x_popup_menu_1, Fx_popup_dialog): Handle Qtab_bar.
      
      * src/termhooks.h (enum event_kind): Add TAB_BAR_EVENT.
      (GCALIGNED_STRUCT): Add change_tab_bar_height_hook.
      
      * src/w32fns.c (w32_frame_parm_handlers): Add w32_set_tab_bar_lines.
      
      * src/w32term.c (w32_draw_window_cursor): Add WINDOW_TAB_LINE_HEIGHT.
      
      * src/window.c (window_body_height): Add WINDOW_TAB_LINE_HEIGHT.
      (Fwindow_tab_line_height): New function.
      (coordinates_in_window): Use window_wants_tab_line with
      CURRENT_TAB_LINE_HEIGHT.
      (window_relative_x_coord): Add ON_TAB_LINE.
      (Fcoordinates_in_window_p): Add ON_TAB_LINE.
      (window_from_coordinates): Add new arg tab_bar_p.
      (Fwindow_line_height): Use window_wants_tab_line with
      WINDOW_TAB_LINE_HEIGHT.
      (Fwindow_lines_pixel_dimensions): Add WINDOW_TAB_LINE_HEIGHT.
      (make_window): Set tab_line_height to -1.
      (window_wants_tab_line): New function.
      (window_internal_height): Use window_wants_tab_line.
      (window_scroll_pixel_based): Add WINDOW_TAB_LINE_HEIGHT.
      (Frecenter): Set minimize_tab_bar_window_p to 1.
      (GCALIGNED_STRUCT): Add frame_tab_bar_lines and frame_tab_bar_height.
      (Fcurrent_window_configuration): Set frame_tab_bar_lines and
      frame_tab_bar_height.
      (set_window_scroll_bars): Add WINDOW_TAB_LINE_HEIGHT.
      (syms_of_window): Add Qtab_line_format and Swindow_tab_line_height.
      
      * src/window.h (GCALIGNED_STRUCT): Add tab_line_height.
      (WINDOW_TAB_BAR_P, WINDOW_TAB_LINE_HEIGHT, WINDOW_TAB_LINE_LINES):
      New macros.
      (WINDOW_TOP_EDGE_Y, WINDOW_BOTTOM_EDGE_Y, WINDOW_TAB_LINE_HEIGHT):
      Add WINDOW_TAB_BAR_P.
      
      * src/xdisp.c (window_box_height): Add window_wants_tab_line with
      MATRIX_TAB_LINE_ROW and CURRENT_TAB_LINE_HEIGHT.
      (pos_visible_p): Use window_wants_tab_line.
      Add WINDOW_TAB_LINE_HEIGHT.
      (get_glyph_string_clip_rects): Add WINDOW_TAB_LINE_HEIGHT.
      (get_phys_cursor_geometry): Add WINDOW_TAB_LINE_HEIGHT.
      (remember_mouse_glyph): Use MATRIX_TAB_LINE_ROW for part
      ON_TAB_LINE.
      (init_iterator): Use MATRIX_TAB_LINE_ROW for TAB_LINE_FACE_ID.
      Add WINDOW_TAB_LINE_HEIGHT.  Add window_wants_tab_line.
      (Fwindow_text_pixel_size): Add WINDOW_TAB_LINE_HEIGHT.
      (prepare_menu_bars): Call update_tab_bar.
      (update_tab_bar, build_desired_tab_bar_string)
      (display_tab_bar_line, tab_bar_height, Ftab_bar_height)
      (redisplay_tab_bar, tab_bar_item_info, get_tab_bar_item)
      (handle_tab_bar_click, note_tab_bar_highlight): New functions.
      (compute_window_start_on_continuation_line): Use window_wants_tab_line.
      (try_cursor_movement): Use window_wants_tab_line with
      CURRENT_TAB_LINE_HEIGHT.
      (redisplay_window): Use window_wants_tab_line with
      CURRENT_TAB_LINE_HEIGHT.
      (try_window_reusing_current_matrix): Use window_wants_tab_line
      with WINDOW_TAB_LINE_HEIGHT.
      (Fdump_tab_bar_row): New function.
      (compute_line_metrics): Add WINDOW_TAB_LINE_HEIGHT.
      (display_line): Use window_wants_tab_line.
      (display_mode_line): Set tab_line_p to true if face_id is
      TAB_LINE_FACE_ID.
      (Fformat_mode_line): Handle Qtab_line and Qtab_bar.
      (gui_clear_end_of_line): Add WINDOW_TAB_LINE_HEIGHT.
      (erase_phys_cursor): Use WINDOW_TAB_LINE_HEIGHT.
      (show_mouse_face): Use tab_bar_window.
      (note_mode_line_or_margin_highlight): Use MATRIX_TAB_LINE_ROW for
      area ON_TAB_LINE.
      (note_mouse_highlight): Call note_tab_bar_highlight,
      (expose_frame): Handle tab_bar_window.
      (syms_of_xdisp): Add Sdump_tab_bar_row and Stab_bar_height.
      (auto-resize-tab-bars, auto-raise-tab-bar-buttons)
      (tab-bar-border, tab-bar-button-margin, tab-bar-button-relief)
      (tab-bar-max-label-size): New variables.
      
      * src/xfaces.c (lookup_basic_face): Add TAB_LINE_FACE_ID and
      TAB_BAR_FACE_ID.
      (syms_of_xfaces): Define Qtab_bar and Qtab_line.
      
      * src/xfns.c (x_set_tab_bar_lines, x_change_tab_bar_height):
      New functions.
      (xic_set_statusarea): Add FRAME_TABBAR_TOP_HEIGHT.
      (frame_geometry): Add FRAME_TAB_BAR_HEIGHT and Qtab_bar_size.
      
      * src/xterm.c (x_draw_image_relief): Use tab_bar_button_relief.
      (x_draw_image_relief): Use TAB_BAR_FACE_ID.
      (handle_one_xevent): Handle tab_bar_window.
      (x_set_window_size_1): Add FRAME_TABBAR_WIDTH.
      (x_create_terminal): Set change_tab_bar_height_hook.
      
      * src/xterm.h (struct x_output): Add tabbar_top_height,
      tabbar_bottom_height, tabbar_left_width, tabbar_right_width
      tabbar_widget, tabbar_in_hbox, tabbar_is_packed.
      (FRAME_TABBAR_TOP_HEIGHT): Add FRAME_TABBAR_TOP_HEIGHT,
      FRAME_TABBAR_BOTTOM_HEIGHT, FRAME_TABBAR_HEIGHT,
      FRAME_TABBAR_LEFT_WIDTH, FRAME_TABBAR_RIGHT_WIDTH,
      FRAME_TABBAR_WIDTH.
      3e0ad29a
    • Paul Eggert's avatar
      Check instead of relying on NOTREACHED · 77910055
      Paul Eggert authored
      NOTREACHED was designed for traditional lint decades ago,
      and _Noreturn now normally subsumes its function.
      In the one case in Emacs where NORETURN might help and _Noreturn does
      not, check for NOTREACHED instead of assuming it.
      * lib-src/etags.c (main):
      * src/xterm.c (x_connection_closed):
      Remove NOTREACHED after a call to a _Noreturn function, as NOTREACHED
      is no longer needed there.  Also, one of the NOTREACHEDs was
      misplaced, which defeated traditional lint checking anyway.
      * lib-src/pop.c (pop_getline): Redo so as to not need NOTREACHED.
      * src/emacs.c (main): Use eassume (false) rather than NOTREACHED,
      so that running with ENABLE_CHECKING catches any internal error
      causing the toplevel Frecursive_edit to return.
      77910055
    • Glenn Morris's avatar
    • Andreas Schwab's avatar
      Fix compilation with CHECK_STRUCTS · 172b99a4
      Andreas Schwab authored
      * src/pdumper.c (dump_hash_table): Update hash of Lisp_Hash_Table.
      172b99a4
    • Eli Zaretskii's avatar
    • Eli Zaretskii's avatar
      Avoid signaling errors from ls-lisp--insert-directory on macOS · 61683531
      Eli Zaretskii authored
      * lisp/ls-lisp.el (ls-lisp-sanitize): Don't assume the
      directory entries for ".." and "." will either both be present
      or both absent.  (Bug#37236)
      61683531
  4. 30 Aug, 2019 6 commits
  5. 29 Aug, 2019 9 commits
  6. 28 Aug, 2019 3 commits
  7. 27 Aug, 2019 9 commits
    • Paul Eggert's avatar
      Use XDG conventions more consistently · 4118297a
      Paul Eggert authored
      Fit in better with the XDG conventions.
      Something like this was suggested in 2008 (Bug#583)
      and the XDG conventions seem to have settled down by now.
      * doc/emacs/custom.texi (Init File, Init Syntax, Find Init):
      * doc/lispref/files.texi (Standard File Names):
      * doc/lispref/os.texi (Init File):
      * doc/misc/url.texi (Customization):
      * etc/NEWS:
      Adjust accordingly.
      * lisp/startup.el (startup--load-user-init-file):
      If init-file-name is nil, do not load from it; instead
      just use the alt-file.
      (find-init-path): Remove; no longer used.
      (command-line): Don't check twice for XDG.
      Look at XDG_CONFIG_HOME instead of assuming it's ~/.config.
      Prefer XDG configuration if it exists; the user can disable
      this by setting XDG_CONFIG_HOME to some other place.
      * lisp/subr.el (user-emacs-directory):
      Prefer XDG configuration if it exists.
      4118297a
    • Paul Eggert's avatar
      Port recent gnutls fixes to gcc -Wpointer-sign · fa41fa70
      Paul Eggert authored
      * src/gnutls.c (Fgnutls_format_certificate):
      Fix pointer signedness problem.
      fa41fa70
    • Juri Linkov's avatar
      Browser-like Info-history button menu (bug#37184) · ba5d9795
      Juri Linkov authored
      * doc/misc/info.texi (Help-Int): Using tool-bar to navigate history.
      
      * lisp/info.el (Info-history-menu): New function.
      (Info-history-back-menu, Info-history-forward-menu): New commands.
      (Info-mode-map): Bind Info-history-back-menu and
      Info-history-forward-menu to tool-bar on C-key.
      ba5d9795
    • Michael Albinus's avatar
      Deactivate part of tramp--test-check-files on macOS (Bug#36940) · ba1f7797
      Michael Albinus authored
      * test/lisp/net/tramp-tests.el (tramp--test-check-files): Do not
      search for environment variables on macOS.  (Bug#36940)
      ba1f7797
    • Eli Zaretskii's avatar
      ; Fix commentary of last change. · b5e18f9f
      Eli Zaretskii authored
      b5e18f9f
    • Eli Zaretskii's avatar
      Fix crashes on MS-Windows when using GnuTLS connections · 6769b649
      Eli Zaretskii authored
      * src/gnutls.c (init_gnutls_functions) [WINDOWSNT]: Define and
      load gnutls_free by an explicit call to GetProcAddress.
      (gnutls_free) [WINDOWSNT]: Define as a macro that dereferences
      a function pointer.  (Bug#31946)
      (Fgnutls_format_certificate): Use make_string_from_bytes
      instead of going through an intermediate malloc'ed buffer.
      6769b649
    • Alex Branham's avatar
      Fix filename completion in shell mode buffers · e4d17d8c
      Alex Branham authored
      * lisp/shell.el (shell-dynamic-complete-functions): Move
      pcomplete-completions-at-point down the list so that filename
      completion has a chance to complete before pcompletion.
      
      Fixes bug#34330
      e4d17d8c
    • Michael Albinus's avatar
    • Lars Ingebrigtsen's avatar
      Fix completion in `read-library-name' · ed44217d
      Lars Ingebrigtsen authored
      * lisp/emacs-lisp/find-func.el (read-library-name): Only list
      .el/.el.gz files when completing (bug#36945).
      ed44217d