summaryrefslogtreecommitdiff
path: root/lisp/cus-start.el
Commit message (Collapse)AuthorAgeFilesLines
* Small fix for type of 'display-fill-column-indicator-character'Philipp Stephani2020-05-091-1/+1
| | | | | | * lisp/cus-start.el (standard): Don't mark t as safe file-local value for 'display-fill-column-indicator-character', as that value isn't allowed.
* Fix customization of 'display-fill-column-indicator-character'Eli Zaretskii2020-05-091-2/+9
| | | | | * lisp/cus-start.el (display-fill-column-indicator-character): Fix the customization form. (Bug#41145)
* Tab-bar related fixes.Juri Linkov2020-01-301-1/+1
| | | | | | | | | * lisp/cus-start.el (tab-bar-mode): Use dedicated group 'tab-bar'. * lisp/tab-bar.el (tab-bar-history-mode): Add :group 'tab-bar'. (tab-bar-get-buffer-tab): Add optional arg 'ignore-current-tab'. * lisp/desktop.el (desktop-buffers-not-to-save-function): Add docstring.
* Update copyright year to 2020Paul Eggert2020-01-011-1/+1
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Fine-grained NS modifier key settings (bug#38296)Mattias Engdegård2019-11-271-12/+85
| | | | | | | | | | | | | | | | | | | | | | | | For the ns-KEY-modifier and ns-right-KEY-modifier variables, KEY being 'control', 'command', 'alternate' and 'function', allow values on the form (:ordinary SYMBOL :function :SYMBOL :mouse SYMBOL), so that the key can be used for different modifiers (or none) in different contexts. This is particularly useful for using the macOS Option key for extended character entry while still using it as an Emacs modifier for function keys and mouse clicks. * src/nsterm.m (mod_of_kind, right_mod, nil_or_none): Helper functions. (EV_MODIFIERS2): Add KIND argument. (EV_MODIFIERS): Adapt call to EV_MODIFIERS2. (ns_get_shifted_character): Use correct event kind for modifiers. (ns-alternate-modifier, ns-right-alternate-modifier) (ns-command-modifier, ns-right-command-modifier) (ns-control-modifier, ns-right-control-modifier) (ns-function-modifier): Rewrite doc strings for new data format. (QCordinary, QCfunction, QCmouse): Define symbols. * lisp/cus-start.el: Conform to new data types. * doc/emacs/macos.texi (Mac / GNUstep Basics) (Mac / GNUstep Customization): Improved documentation. * etc/NEWS: Mention the change.
* Provide default value for tab-name/frame-name reading minibufferJuri Linkov2019-10-201-6/+10
| | | | | | | | | | | * lisp/tab-bar.el (tab-bar-rename-tab, tab-bar-rename-tab-by-name): Provide default value for read-string. (tab-bar-select-tab-by-name): Alias for tab-bar-switch-to-tab. * lisp/frame.el (set-frame-name): Provide default value for read-string in interactive spec. * lisp/cus-start.el (tab-bar-position): Use choice instead of boolean.
* New variable tab-bar-positionJuri Linkov2019-10-151-0/+6
| | | | | | * lisp/cus-start.el: Add customization for tab-bar-position. * src/dispnew.c (syms_of_display): New variable Vtab_bar_position. (adjust_frame_glyphs_for_window_redisplay): Use it.
* Set alternate faces for some line numbers (bug#27734)Juanma Barranquero2019-10-061-0/+14
| | | | | | | | | | | | | | | | | | | | | | * lisp/faces.el (line-number-major-tick, line-number-minor-tick): New faces. * lisp/cus-start.el (display-line-numbers-major-tick) (display-line-numbers-minor-tick): Add customization info. * lisp/frame.el: Add `display-line-numbers-major-tick' and `display-line-numbers-minor-tick' to list of variables which should trigger redisplay of the current buffer. * src/xdisp.c (syms_of_xdisp) <display-line-numbers-major-tick> <display-line-numbers-major-tick>: Defvar new options. (syms_of_xdisp) <line-number-major-tick, line-number-minor-tick>: Defsym new faces. (maybe_produce_line_number): Use new faces for line numbers that are multiple of `display-line-numbers-major-tick' and `display-line-numbers-minor-tick'. * etc/NEWS (value): Announce new feature. * doc/emacs/display.texi (Display Custom): Describe it. Wording by Robert Pluim <rpluim@gmail.com>
* Remove unused code and reformat to 70 columns.feature/tabsJuri Linkov2019-10-011-1/+0
|
* Frame-local tab-bar and window-local tab-line.Juri Linkov2019-08-311-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* Set custom :version for recently modified undo optionsGlenn Morris2019-08-101-3/+3
| | | | | * lisp/cus-start.el (undo-limit, undo-strong-limit, undo-outer-limit): Bump :version.
* * lisp/cus-start.el: Add :safe to display-fill-column-indicator (bug#36861)Juri Linkov2019-08-061-45/+57
| | | | | | (display-fill-column-indicator) (display-fill-column-indicator-column) (display-fill-column-indicator-character): Add :safe predicates.
* Fix display-fill-column-indicator custom spec typoLars Ingebrigtsen2019-07-131-2/+3
| | | | | | | | | | | * lisp/cus-start.el (standard): Fix typo in display-fill-column-indicator custom spec. Debugger entered--Lisp error: (wrong-type-argument stringp integer) string-match("\\([0-9]+\\)\\(\\.\\([0-9]+\\)\\)?" integer) customize-version-lessp("25.3" integer) [...] customize-changed-options("")
* ;Corrected display-fill-column-indicator mode.Jimmy Aguilar Mena2019-05-051-4/+7
| | | | Small corrections in the documentation and code format to merge into master.
* display-fill-column-indicator interface correctionsJimmy Aguilar Mena2019-05-051-0/+5
| | | | | | | | *lisp/display-fill-column-indicator.el: Fixed character selection for the indicator based in the current faces. Extended condition to set display-fill-column-indicator-character in graphical displays. *src/xdisp.c: Fixed some long lines.
* Start display-fill-column-indicator-mode.Jimmy Aguilar Mena2019-05-051-0/+5
|
* Rewrite minibuffer window resizing codeMartin Rudalics2019-03-111-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | * src/frame.c (resize_mini_frames): New variable. * src/window.c (resize_mini_window_apply): New function. (grow_mini_window, shrink_mini_window): Remove PIXELWISE argument. Call resize_mini_window_apply to apply changes. (Fresize_mini_window_internal): Call resize_mini_window_apply to apply changes. (Qwindow__resize_mini_frame): New symbol. * src/window.h (grow_mini_window, shrink_mini_window): Adjust external declarations. * src/xdisp.c (resize_mini_window): For minibuffer-only frames call 'window--resize-mini-frame' if resize_mini_frames is non-nil. Offload parts of logic to grow_mini_window and shrink_mini_window which are now called without the PIXELWISE argument. (Vresize_mini_windows): Mention 'resize-mini-frames' in doc-string. * lisp/cus-start.el (resize-mini-frames): Add customization support. * lisp/window.el (window--resize-mini-window): Simplify code. (window--resize-mini-frame): New function. * doc/lispref/minibuf.texi (Minibuffer Windows): Describe new option 'resize-mini-frames'. * etc/NEWS: Mention new option 'resize-mini-frames'.
* Add portable dumperDaniel Colascione2019-01-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a new portable dumper as an alternative to unexec. Use it by default. * src/dmpstruct.awk: New file. * src/doc.c (get_doc_string): use will_dump_p(). * src/editfns.c (styled_format): silence compiler warning with UNINIT. * src/emacs-module.c (syms_of_module): staticpro ltv_mark. * src/emacs.c (gflags): new variable. (init_cmdargs): unwrap (string_starts_with_p, find_argument, dump_error_to_string) (load_pdump): new functions. (main): detect pdumper and --temacs invocation; actually load portable dump when detected; set gflags as appropriate; changes to init functions throughout to avoid passing explicit 'initialized' argument. * src/eval.c (inhibit_lisp_code): remove unused variable. (init_eval_once_for_pdumper): new function. (init_eval_once): call it. * src/filelock.c: CANNOT_DUMP -> will_dump_p() * src/fingerprint-dummy.c: new file * src/fingerprint.h: new file * src/fns.c: CANNOT_DUMP -> will_dump_p(), etc. (weak_hash_tables): remove (hashfn_equal, hashfn_eql): un-staticify (make_hash_table): set new 'next_weak' hash table field; drop global weak_hash_tables logic. (copy_hash_table): drop global weak_hash_tables logic. (hash_table_rehash): new function. (hash_lookup, hash_put, hash_remove_from_table, hash_clear): rehash if needed. (sweep_weak_table): un-staticify; explain logic; bool-ify. (sweep_weak_hash_tables): remove function. * src/font.c (syms_of_font): remember pdumper stuff. * src/fontset.c (syms_of_fontset): remember pdumper stuff. * src/frame.c (make_initial_frame): don't reset Vframe_list. (init_frame_once_for_pdumper, init_frame_once): new functions. (syms_of_frame): remove redundant staticpro. * src/fringe.c (init_fringe_once_for_pdumper): new functin. (init_fringe_once): call it. * src/ftcrfont.c (syms_of_ftcrfont_for_pdumper): new function. (syms_of_ftcrfont): call it. * src/ftfont.c (syms_of_ftfont_for_pdumper): new function. (syms_of_ftfont): call it. * src/ftxont.c (syms_of_ftxfont_for_pdumper): new function. (syms_of_ftxfont): call it. * src/gmalloc.c: adjust for pdumper througout (DUMPED): remove weird custom dumped indicator. * src/gnutls.c (syms_of_gnutls): pdumper note for gnutls_global_initialized. * src/image.c (syms_of_image): add pdumper comment, initializer note. * src/insdel.c (prepare_to_modify_buffer_1): account for buffer contents possibly being in dump image. * src/keyboard.c (syms_of_keyboard_for_pdumper): new function. (syms_of_keyboard): staticpro more; call pdumper syms function. * src/lisp.h: add comments throughout (gflags): declare. (will_dump_p, will_bootstrap_p, will_dump_with_pdumper_p) (dumped_with_pdumper_p, will_dump_with_unexec_p) (dumped_with_unexec_p, definitely_will_not_unexec_p): new functions. (POWER_OF_2, ROUNDUP): move macros. (PSEUDOVECTOR_TYPE, PSEUDOVECTOR_TYPEP): take vectorlike header pointer instead of vector; constify. (Lisp_Hash_Table): add comment about need to rehash on access; add comment for next_weak. (HASH_KEY, HASH_VALUE, HASH_HASH, HASH_TABLE_SIZE): const-ify. (hash_table_rehash): declare. (hash_rehash_needed_p, hash_rehash_if_needed): new functions. (finalizers, doomed_finalizers): declare extern. (SUBR_SECTION_ATTRIBUTE): new macro. (staticvec, staticidx): un-static-ify. (sweep_weak_hash_tables): remove declaration. (sweep_weak_table): declare. (hashfn_eql, hashfn_equal): declare. (number_finalizers_run): new variable. (Vdead): externify when ENABLE_CHECKING. (gc_root_type): new enumeration. (gc_root_visitor): new struct. (visit_static_gc_roots): declare. (vectorlike_nbytes): declare. (vector_nbytes): define as trivial inline function wrapper for vectorlike_nbytes. (init_obarray_once): change signature. (primary_thread): extern-ify. (init_buffer): change signature. (init_frame_once): declare. * src/lread.c (readevalloop): adjust for new dumped predicates. (init_obarray_once): new function. (ndefsubr): new variable. (defsubr): increment it. (load_path_check): adjust for pdumper. (load_path_default): use pdumper functions; adjust for dump search. * src/macfont.m (macfont_init_font_change_handler): avoid shadowing global. (syms_of_macfont_for_pdumper): new function. (syms_of_macfont): call it. * src/menu.c (syms_of_menu): staticpro more stuff. * src/minibuf.c (Ftry_completion): rehash if needed. (init_minibuf_once_for_pdumper): new function. (init_minibuf_once): call it. * src/nsfont.m (syms_of_nsfns): staticpro more. * src/nsfont.m (syms_of_nsfont_for_pdumper): new function. (syms_of_nsfont): call it. * src/nsterm.m (syms_of_nsfont): remember pdumper stuff. * src/pdumper.c: new file. * src/pdumper.h: new file. * src/process.c (init_process_emacs): use new pdumper functions instead of CANNOT_DUMP. * src/profiler.c (syms_of_profiler_for_pdumper): new function. (syms_of_profiler_for_pdumper): call it. * src/search.c (syms_of_search_for_pdumper): new function. (syms_of_search_for_pdumper): call it. * src/sheap.c (bss_sbrk_did_unexec): remove. * src/sheap.h (bss_sbrk_did_unexec): remove. * src/syntax.c (syms_of_syntax): don't redundantly staticpro re_match_object. * src/sysdep.c: use will_dump_with_unexec_p() instead of bss hack thing. * src/syssignals.h (init_sigsegv): declare. * src/systime.h (init_timefns): remove bool from signature. * src/textprop.c (syms_of_textprop): move staticpro. * src/thread.c (main_thread_p): constify. * src/thread.h (main_thread_p): constify. * src/timefns.c (init_timefns): remove bool from signature. (syms_of_timefns_for_pdumper): new function. (syms_of_timefns): call it. * src/w32.c: rearrange code. * src/w32.h (w32_relocate): declare. * src/w32fns.c (syms_of_w32fns): add pdumper note. * src/w32font.c (syms_of_w32font_for_pdumper): new function. (syms_of_w32font): call it. * src/w32heap.c (using_dynamic_heap): new variable. (init_heap): use it. * src/w32menu.c (syms_of_w32menu): add pdumper note. * src/w32proc.c (ctrl_c_handler, mainCRTStartup, _start, open_input_file) (rva_to_section, close_file_data): move here. * src/w32uniscribe.c (syms_of_w32uniscribe_for_pdumper): new function. (syms_of_w32uniscribe): call it. * src/window.c (init_window_once_for_pdumper): new function. (init_window_once): call it; staticpro more stuff. * src/xfont.c (syms_of_xfont_for_pdumper): new function. (syms_of_xfont): call it. * src/xftfont.c (syms_of_xftfont_for_pdumper): new function. (syms_of_xftfont): call it. * src/xmenu.c (syms_of_xmenu_for_pdumper): new function. (syms_of_xmenu): call it. * src/xselect.c (syms_of_xselect_for_pdumper): new function. (syms_of_xselect): call it. * src/xsettings.c (syms_of_xsettings): add more pdumper notes. * src/term.c (syms_of_xterm): add pdumper note. * src/dispnew.c (init_faces_initial): new function. (init_display_interactive): rename from init_display; use will_dump_p instead of !initialized. Initialize faces early for pdumper if needed. (init_display): new function. (syms_of_display_for_pdumper): new function. (syms_of_display): call it. * src/dbusbind.c (syms_of_dbusbind): Add TODO for bus reset on pdumper load. * src/data.c (Fdefalias): Use will_dump_p instead of Vpurify_flag. (Fmake_variable_buffer_local): silence compiler warning with -Og by making valcontents UNINIT. (arith_driver): silence compiler warning with UNINIT. * src/conf_post.h (ATTRIBUTE_SECTION): new macro. * src/composite.c (composition_gstring_put_cache): rehash hash table if needed. * src/coding.c (init_coding_once, syms_of_coding): remember pdumper stuff. * src/charset.h (charset_table_size, charset_table_user): declare. * src/charset.c (charset_table_used, charset_table_size): un-static. (init_charset_oncem, syms_of_charset): remember pdumper stuff. * src/category.c (category_table_version): remove obsolete variable. * src/callint.c (syms_of_callint): staticpro 'preserved_fns' (init_callproc): use will_dump_p instead of !CANNOT_DUMP. * src/bytecode.c (exec_byte_code): rehash table tables if needed * src/buffer.c (alloc_buffer_text, free_buffer_text): account for pdumper (init_buffer_once): add TODO; remember stuff for pdumper. (init_buffer): don't take initialized argument; adjust for pdumper. * src/atimer.c (init_atimer): initialize subr only if !initialized. * src/alloc.c: (vector_marked_p, set_vector_marked) (vectorlike_marked_p, set_vectorlike_marked, cons_marked_p) (set_cons_marked, string_marked_p, set_string_marked) (symbol_marked_p, set_symbol_marked, interval_marked_p) (set_interval_marked): new accessor routines. Use them instead of raw GC access throughout. (Vdead): make non-static when ENABLE_CHECKING. (vectorlike_nbytes): rename of 'vector_nbytes'; take a vectorlike header as input instead of a vector. (number_finalizers_run): new internal C variable. (mark_maybe_object): check for pdumper objects. (valid_pointer_p): don't be gratuitously inefficient under rr(1). (make_pure_c_string): add support for size_byte = -2 mode indicating that string data points into Emacs image rodata. (visit_vectorlike_root): visits GC roots embedded in vectorlike objects. (visit_buffer_root): visits GC roots embedded in our totally-not-a-buffer buffer global objects. (visit_static_gc_roots): visit GC roots in the Emacs data section. (mark_object_root_visitor): root callback used for conventional GC marking (weak_hash_tables): new internal variable for tracking found weak hash tables during GC. (mark_and_sweep_weak_table_contents): new weak hash table marking. (garbage_collect_1): use new GC root visitor machinery. (mark_vectorlike): accept a vectorlike_header instead of a Lisp_Vector. (mark_frame, mark_window, mark_hash_table): new functions. (mark_object): initialize 'm'; check for pdumper objects and use new mark-bit accessors throughout. Remove some object-specific marking code and move to helper functions above. (survives_gc_p): check for pdumper objects. (gc-sweep): clear pdumper mark bits. (init_alloc_once_for_pdumper): new helper function for early init called both during normal init and pdumper load. (init_alloc_once): pdumper integration. * src/Makefile.in: Rewrite dumping for pdumper; add pdumper.o; invoke temacs with --temacs command line option; build dmpstruct.h from dmpstruct.awk; stop relying on CANNOT_DUMP; clean up pdumper intermediate files during build. * nextstep/Makefile.in: build emacs.pdmp into NS packages * lisp/startup.el: account for new '--temacs' and '--dump-file' command line option. * lisp/loadup.el: rewrite early init to account for pdumper; use injected 'dump-mode' variable (set via the new '--temacs' option) instead of parsing command line. * lisp/cus-start.el: Check 'dump-mode' instead of 'purify-flag', since the new 'dump-mode' * lib-src/make-fingerprint.c: new program * lib-src/Makefile.in: built make-fingerprint utility program * configure.ac: Add --with-pdumper toggle to control pdumper support; add --with-unexec toggle to control unexec support. Add --with-dumping option to control which dumping strategy we use by default. Adjust for pdumper throughout. Check for posix_madvise. * Makefile.in: Add @DUMPING@ substitution; add pdumper mode. * .gitignore: Add make-fingerprint, temacs.in, fingerprint.c, dmpstruct.h, and pdumper dump files.
* Merge from origin/emacs-26Paul Eggert2018-12-311-1/+1
|\ | | | | | | | | | | 2fcf2df Fix copyright years by hand 26bed8b Update copyright year to 2019 2814292 Fix value of default frame height. (Bug#33921)
| * Update copyright year to 2019Paul Eggert2019-01-011-1/+1
| | | | | | | | Run 'TZ=UTC0 admin/update-copyright $(git ls-files)'.
* | Always define 'define-fringe-bitmap'Stefan Monnier2018-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/cus-start.el: Test 'fringe-bitmaps' to see if fringe.c was compiled. * lisp/fringe.el: Use lexical-binding. (define-fringe-bitmap): Provide a fallback implementation. * lisp/progmodes/flymake.el (flymake-double-exclamation-mark): Define unconditionally. * lisp/progmodes/gdb-mi.el (define-fringe-bitmap): Don't declare any more. (breakpoint, hollow-right-triangle): Define unconditionally.
* | Allow 'make-cursor-line-fully-visible' name a functionEli Zaretskii2018-09-301-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (cursor_row_fully_visible_p): Handle the case of make-cursor-line-fully-visible being a function. Accept a 3rd argument; if non-zero, assume the caller already tested the conditions for the cursor being fully-visible, and don't recheck them. All callers changed. (try_cursor_movement, try_window_id): Call cursor_row_fully_visible_p instead of testing the value of make-cursor-line-fully-visible directly. (syms_of_xdisp) <make-cursor-line-fully-visible>: Update the doc string. Define a symbol Qmake_cursor_line_fully_visible. (Bug#32848) * lisp/cus-start.el (standard): Update the Custom form. * etc/NEWS: Mention the change in possible values of 'make-cursor-line-fully-visible'.
* | Merge from origin/emacs-26Glenn Morris2018-09-101-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7efcdf7 (origin/emacs-26) Clarify completion text in the ELisp manual 30b0b0e Fix handling of abbreviated control command in gdb-mi.el 5cf282d Clarify documentation of functions reading character events 96281c5 Record :version for built-in variables while dumping 82160cf * src/process.c (connect_network_socket): Fix memory leak. (... 6c616e4 * Makefile.in (appdatadir): Use the non-obsolete location "me... 9618e16 Better fix for bug#32550 30d94e4 Fix Bug#32550 57bcdc7 Don't call XGetGeometry for frames without outer X window (Bu... 82fc6b6 * lisp/calculator.el: Fix doc typo. ddc7c64 Standardize calc bug reporting instructions Conflicts: lisp/cus-start.el
| * Record :version for built-in variables while dumpingEli Zaretskii2018-09-071-1/+2
| | | | | | | | | | | | | | * lisp/cus-start.el (standard): Record the ':version; of the symbols when dumping, so that 'describe-variable' could tell which built-in variables were added/changed in recent versions.
* | Give auto-save-no-message a proper version attributeEli Zaretskii2018-08-111-1/+1
| | | | | | | | | | * lisp/cus-start.el (standard): Give 'auto-save-no-message' the proper version attribute. (Bug#31039)
* | Add variable auto-save-no-messageFederico Tedin2018-08-111-0/+1
| | | | | | | | | | | | | | | | * src/keyboard.c (auto-save-no-message): New variable, allows suppressing auto-saving message. * lisp/cus-start.el (standard): Add 'auto-save-no-message' variable. * doc/emacs/files.texi (Auto Save): Document 'auto-save-no-message'. * etc/NEWS: Mention 'auto-save-no-message'. (Bug#31039)
* | Merge from origin/emacs-26Glenn Morris2018-04-041-3/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3109d2b (origin/emacs-26) ; * lisp/ldefs-boot.el: Update. 86825c4 * etc/NEWS: Remove temporary markup. 737d0a2 * Update etc/AUTHORS fbd03ba * ChangeLog.3: Update 56794ac Fix Bug#31022 a231c33 Update "Calendrical Calculations" cites 1527235 ; * doc/lispref/compile.texi (Compilation Functions): Fix wor... b07decd ; * doc/lispref/compile.texi (Compilation Functions): Fix typo a64c11a Fix term.el rendering following a window resize (Bug#30544) 1e6f09a * files.el (auto-save-visited-mode): Don't prompt for filenames. eb8b13f ; * etc/NEWS: Improve the entry about pinentry.el removal. 52501ec Quote a few backticks in docstrings. Conflicts: etc/NEWS lisp/ldefs-boot.el
| * Fix Bug#31022Michael Albinus2018-04-031-3/+4
| | | | | | | | | | * lisp/cus-start.el (temporary-file-directory): Suppress file name handlers when calling `shell-command-to-string'. (Bug#31022)
* | Fix handling of modifier keys on macOSPhilipp Stephani2018-02-041-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | * src/nsterm.m (keyDown:): Distinguish between shift-like and control-like modifier keys. Allow treating ⌘ as shift-like modifier (e.g. for the Gujarati – QUERTY input method, where ⌘ switches to QUERTY.) * lisp/cus-start.el (standard): Change nil to none for ns-command-modifier; update description. * etc/NEWS: Add NEWS entry.
* | Small cus-start fix for custom-delayed-init-variablesGlenn Morris2018-01-161-7/+9
|/ | | | | * lisp/cus-start.el (custom-delayed-init-variables): Only modify it during startup.
* Update copyright year to 2018Paul Eggert2018-01-011-1/+1
| | | | Run admin/update-copyright.
* Make the value nil in text-quoting-style mean what it does in Emacs 25.Alan Mackenzie2017-10-011-3/+2
| | | | | | | | | | | | | | | | | | | | This is a partial reversion of yesterday's commit by the same author, which changed the meaning of nil and introduced the new value t. * src/doc.c (text_quoting_style, text-quoting-style) (internal--text-quoting-flag): Revert yesterday's changes. * lisp/cus-start.el: (top level): Amend the entry for text-quoting-style. * etc/NEWS: Amend the entry for text-quoting-style. * doc/lispref/control.texi (Signalling Errors) * doc/lispref/display.texi (Displaying Messages) * doc/lispref/strings.texi (Formatting Strings): Bind text-quoting-style to grave rather than nil to inhibit translation of quotes. * doc/lispref/help.texi (Keys in Documentation): Revert the description of the proposed new default, t.
* Make text-quoting-style customizable. Introduce t and new meaning for nil.Alan Mackenzie2017-10-011-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | A value of nil for text-quoting-style now means "no translation". t means "Use curved quotes if displayable". * src/doc.c (text-quoting-style (function)): modify for new semantics. (text-quoting-style (variable)): Amend the doc string, set the default value to t. * lisp/cus-start.el: (top level): Create a customize entry for text-quoting-style in group display. * etc/NEWS: Amend the entry for text-quoting-style. * doc/emacs/display.texi (Text Display): Describe the translation of ASCII quotes to curved quotes, and how to influence or inhibit it. * doc/lispref/control.texi (Signalling Errors) * doc/lispref/display.texi (Displaying Messages) * doc/lispref/strings.texi (Formatting Strings): Describe binding text-quoting-style to nil to inhibit unwanted quote translation. * doc/lispref/help.texi (Keys in Documentation): Change text-quoting-style from a variable to a user option. Describe its changed set of values. State that it can be customized freely.
* Improve handling of iconification of child frames (Bug#28611)Martin Rudalics2017-10-011-0/+7
| | | | | | | | | | * src/frame.c (Ficonify_frame): Handle `iconify-child-frame' option. (syms_of_frame): New symbols Qiconify_top_level and Qmake_invisible. (iconify_child_frame): New option. * lisp/cus-start.el (iconify-child-frame): Add customization properties. * doc/lispref/frames.texi (Child Frames): Describe new option `iconify-child-frame'. Don't index "top-level frame" twice.
* Prefer HTTPS to FTP and HTTP in documentationPaul Eggert2017-09-131-1/+1
| | | | | | | | | | | | | Most of this change is to boilerplate commentary such as license URLs. This change was prompted by ftp://ftp.gnu.org's going-away party, planned for November. Change these FTP URLs to https://ftp.gnu.org instead. Make similar changes for URLs to other organizations moving away from FTP. Also, change HTTP to HTTPS for URLs to gnu.org and fsf.org when this works, as this will further help defend against man-in-the-middle attacks (for this part I omitted the MS-DOS and MS-Windows sources and the test tarballs to keep the workload down). HTTPS is not fully working to lists.gnu.org so I left those URLs alone for now.
* Add a minor mode interface for display-line-numbersAlexander Gramiak2017-07-221-4/+4
| | | | | | | | | | | | | | | * lisp/cus-start.el: Use the new display-line-numbers group. * lisp/display-line-numbers.el: New file. * doc/emacs/custom.texi (Init Rebinding): Re-add entry that used to belong to linum-mode. * doc/emacs/modes.texi (Minor Modes): Summarize the mode. * etc/NEWS: Document display-line-numbers-mode and its customization variables, and mention that display-line-numbers-width is buffer-local. * src/xdisp.c (syms_of_xdisp) <display-line-numbers-width>: Fix a typo.
* Minor tweaks of new line number display variablesMartin Rudalics2017-07-121-1/+1
| | | | | | | | | | | * src/xdisp.c (Vdisplay_line_numbers): Tweak doc-string. (Vdisplay_line_number_width): Rename to Vdisplay_line_numbers_width. (maybe_produce_line_number): Comply with above rename. * lisp/cus-start.el (standard): * lisp/frame.el (top-level): * etc/NEWS: Comply with renaming of `display-line-number-width' to `display-line-numbers-width'.
* * lisp/cus-start.el (standard): Spelling fix.Paul Eggert2017-07-081-1/+1
|
* Implement line numbers that disregard narrowingEli Zaretskii2017-07-061-1/+8
| | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (display_count_lines_logically): New function, counts line numbers disregarding narrowing. Suggested by Andy Moreton <andrewjmoreton@gmail.com>. (maybe_produce_line_number): Call display_count_lines_logically instead of display_count_lines. Adapt BEGV, ZV, etc. to display-line-numbers-widen. (syms_of_xdisp) <display-line-numbers-widen>: New buffer-local variable. * lisp/cus-start.el (standard): Provide a customization form for display-line-numbers-widen. * lisp/frame.el: Add display-line-numbers-widen, display-line-numbers-current-absolute, and display-line-number-width to the list of variables that should trigger redisplay of the current buffer. * doc/emacs/display.texi (Display Custom): Document display-line-numbers-widen.
* Add documentation for display-line-numbersEli Zaretskii2017-06-301-1/+1
| | | | | | | | | | | | | | | | | * doc/emacs/custom.texi (Init Rebinding): * doc/emacs/modes.texi (Minor Modes): Remove references to linum-mode. * doc/emacs/display.texi (Display Custom): Describe the line-number display. (Optional Mode Line): Fix the index entry to not conflict with that in "Display Custom". * doc/emacs/basic.texi (Position Info): Add cross-reference to "Display Custom", for line-number display. * src/xdisp.c (syms_of_xdisp): <display-line-numbers>: Mention display-line-numbers-disable in the doc string. * lisp/cus-start.el (standard): Fix lst change.
* Support displaying zero as the number of the current lineEli Zaretskii2017-06-301-0/+7
| | | | | | | | | | | | | * src/xdisp.c (syms_of_xdisp) <display-line-numbers-current-absolute>: New variable. <display-line-numbers>: Doc fix. (maybe_produce_line_number): Support nil value of display-line-numbers-current-absolute. * lisp/cus-start.el (standard): Add customization form for display-line-numbers-current-absolute. * etc/NEWS: Document recently introduced features.
* Initial support for visually-relative line numbersEli Zaretskii2017-06-261-1/+3
| | | | | | | | | | | | | | | | | | Works very slowly. * src/xdisp.c (display_count_lines_visually): New function. (maybe_produce_line_number): Support 'visual' mode of line-number display. * src/xdisp.c (maybe_produce_line_number): Update IT's metrics also when glyph_row is NULL. This is important for move_it_* functions. (syms_of_xdisp) <display-line-number-width>: Now buffer-local. (try_window_id, redisplay_window, try_cursor_movement): For 'visual' line-number display, disable the same redisplay optimizations as for 'relative'. * lisp/cus-start.el (standard): Add new value for the customization form of display-line-numbers.
* Rename display-line-widthEli Zaretskii2017-06-241-1/+1
| | | | | | | * etc/NEWS: * src/xdisp.c (syms_of_xdisp, maybe_produce_line_number): * lisp/cus-start.el: Rename display-line-width to display-line-number-width.
* Finish up native display of line numbersEli Zaretskii2017-06-171-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xdisp.c (maybe_produce_line_number): Produce a blank before the number, for R2L rows. Increment 'g' in the loop even if glyph_row is NULL. Accept 2nd argument FORCE and produce the line-number glyphs if it is non-zero. (move_it_in_display_line_to): Account for the space taken by the line-number glyphs. Call maybe_produce_line_number with 2nd argument non-zero. (set_cursor_from_row): Fix calculation of cursor X coordinate in R2L rows with display-produced glyphs at the beginning. (syms_of_xdisp) <line-number>: New face symbol. <relative, display-line-width>: New symbols. (maybe_produce_line_number): Use the line-number face for displaying line numbers. Support relative line-number display. Support user-defined width for displaying line numbers. (try_cursor_movement, try_window_id): Disable these optimizations when displaying relative line numbers. * src/dispextern.h (struct it): New member 'pt_lnum'. * lisp/faces.el (line-number): New face. * lisp/cus-start.el (standard): Provide customization forms for display-line-numbers and display-line-width. * lisp/menu-bar.el (menu-bar-showhide-menu): Add menu-bar item to turn display-line-numbers on and off. * etc/NEWS: Document the new feature.
* Add customizable to display raw bytes as hexVasilij Schneidermann2017-06-011-0/+1
| | | | | | | | | | | | | | | * src/xdisp.c (get_next_display_element): Dispatch used format string for unprintables based on new display-raw-bytes-as-hex variable. (display-raw-bytes-as-hex): New variable. (Bug#27122) * lisp/cus-start.el: Add defcustom form for display-raw-bytes-as-hex. * doc/emacs/display.texi: Document the new variable. * etc/NEWS: Mention display-raw-bytes-as-hex. * test/manual/redisplay-testsuite.el (test-redisplay-5-toggle) (test-redisplay-5): New tests. (test-redisplay): Call test-redisplay-5.
* Revert "Add customizable to display raw bytes as hex"Eli Zaretskii2017-06-011-1/+0
| | | | This reverts commit 7c9ac111c5e5d92e620b666893993d5dc562e483.
* Add customizable to display raw bytes as hexEli Zaretskii2017-06-011-0/+1
| | | | | | | | | | | | | | | * src/xdisp.c (get_next_display_element): Dispatch used format string for unprintables based on new display-raw-bytes-as-hex variable. (display-raw-bytes-as-hex): New variable. (Bug#27122) * lisp/cus-start.el: Add defcustom form for display-raw-bytes-as-hex. * doc/emacs/display.texi: Document the new variable. * etc/NEWS: Mention display-raw-bytes-as-hex. * test/manual/redisplay-testsuite.el (test-redisplay-5-toggle) (test-redisplay-5): New tests. (test-redisplay): Call test-redisplay-5.
* Fix typo in last change to auto-hscroll-modeStephen Berman2017-05-191-1/+1
| | | | * lisp/cus-start.el (standard): Fix typo in value of auto-hscroll-mode.
* Adjust defcustom form for 'auto-hscroll-mode'Eli Zaretskii2017-05-191-1/+9
| | | | | * lisp/cus-start.el (standard) <auto-hscroll-mode>: Adjust the defcustom form. Suggested by Stephen Berman <stephen.berman@gmx.net>.
* Fix doc and customization type of `window-combination-limit' (Bug#26673)Martin Rudalics2017-04-271-2/+4
| | | | | | | | * src/window.c (Vwindow_combination_limit): Fix doc-string. * lisp/cus-start.el (window-combination-limit): Fix customization type. * doc/lispref/windows.texi (Recombining Windows): Fix documentation of `window-combination-limit'.