summaryrefslogtreecommitdiff
path: root/lisp/startup.el
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'origin/master' into athena/unstableSean Whitton2021-01-31
|\
| * Use `lexical-binding` in all `lisp/international` filesStefan Monnier2021-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/startup.el (keyboard-type): Make obsolete and lex-bound. * admin/unidata/unidata-gen.el (unidata-gen-file) (unidata-gen-charprop): Mark the generated files to use lexical binding. * lisp/international/isearch-x.el: Use lexical-binding. (junk-hist): Declare locally. * lisp/international/iso-cvt.el: * lisp/international/utf-7.el: * lisp/international/robin.el: * lisp/international/ogonek.el: * lisp/international/latin1-disp.el: * lisp/international/kkc.el: * lisp/international/kinsoku.el: * lisp/international/ja-dic-utl.el: Use lexical-binding. * lisp/international/ja-dic-cnv.el: Use lexical-binding. (skkdic-breakup-string): Remove unused var `kana-len`. * lisp/international/latexenc.el: Use lexical-binding. (tex-start-of-header): Declare. * lisp/international/mule-diag.el: Use lexical-binding. (list-character-sets): Remove unused var `pos`. (list-character-sets-1): Remove unused vars `tail` and `charset`. (list-charset-chars): Remove unused vars `chars` and `plane`. (describe-coding-system): Remove unused var `extra-spec`. (mule--print-opened): New var. (print-fontset): Bind it. (print-fontset-element): Use it instead of `print-opened`. * lisp/international/quail.el: Use lexical-binding. (quail-start-translation, quail-start-conversion): Remove unused var `generated-events`. (quail-help-insert-keymap-description): Use local dynbound var `the-keymap`.
* | Merge remote-tracking branch 'origin/master' into athena/unstableSean Whitton2021-01-19
|\|
| * * lisp/startup.el: Fix bug#45857, bug#30994, and bug#45913.Stefan Monnier2021-01-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (command-line): Don't re-evaluate the `custom-delayed-init-variables` a second time after reading the `early-init.el` file. (x-apply-session-resources): Set `blink-cursor-mode` rather than `no-blinking-cursor`. * lisp/frame.el (blink-cursor-start): Turn `blink-cursor-mode` off if `blink-cursor-mode` was set to nil. (blink-cursor-mode): Default to it being enabled regardless of `window-system`. * lisp/custom.el (custom-initialize-delay): Fox docstring now that autoload.el preserves the `:initialize` info.
| * * lisp/startup.el (command-line): Remove redundant set of no-blinking-cursorStefan Monnier2021-01-14
| | | | | | | | | | | | | | This is redundant because this was set based on "X" resources under (memq window-system '(x w32 ns)) but the exact same resources and values are tested in `x-apply-session-resources` which is also used for those 3 window systems.
| * * lisp/startup.el (command-line): Remove redundant set of no-blinking-cursorStefan Monnier2021-01-14
| | | | | | | | | | | | | | This was set when (or noninteractive emacs-basic-display), but the code that sets `emacs-basic-display` also sets `no-blinking-cursor` and `blink-cursor-mode`s value already tests `noninteractive` alongside `no-blinking-cursor`.
| * Fix marking "delayed-initialization" vars as dynamically scopedStefan Monnier2021-01-14
| | | | | | | | | | | | | | | | | | | | | | | | | | We used to mark those vars as dynbound in `custom-reevaluate-setting` which forced us to bind `current-load-list` around it to avoid having the vars be associated with the wrong file. Move this marking to `custom-initialize-delay` so we don't need this workaround. * lisp/custom.el (custom-initialize-delay): Mark the var as dynamic. (custom-reevaluate-setting): Don't use `defvar` here. * lisp/startup.el (command-line): Don't let-bind `current-load-list` around calls to `custom-reevaluate-setting`.
| * Merge from origin/emacs-27Glenn Morris2021-01-14
| |\ | | | | | | | | | | | | | | | | | | | | | 488204cdc6 (origin/emacs-27) Remove one of recently added warnings ab... 55bc1560ac Fix assertion failure in window_box_height (Bug#45737) 27743e9e70 Fix cl-concatenate inlining 32a3758c84 Fix infloop in 'pixel-scroll-mode' 74d18957b8 Fix inhibiting the default.el loading in user init file
| | * Fix inhibiting the default.el loading in user init fileEli Zaretskii2021-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/startup.el (startup--load-user-init-file): Test the value of 'inhibit-default-init', not just the LOAD-DEFAULTS argument, because loading the user's init file could have set the value of the former. (command-line): Call 'startup--load-user-init-file' with last arg t: there's no longer any need to test the value of 'inhibit-default-init' here, as it will be tested by the called function. (Bug#45708)
| | * Update copyright year to 2021Paul Eggert2021-01-01
| | | | | | | | | | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
| * | * lisp/emacs-lisp/package.el: Load package-quickstart without package.elStefan Monnier2021-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Speed up startup when `package-quickstart` is in use by making it possible to load the quickstart file without having to load `package.el` at all. (package-user-dir, package-directory-list, package-quickstart-file): Preload those variables. (package--get-activatable-pkg): New fun, extracted from `package-activate`. (package-activate): Use it. (package--activate-all): New function, extracted from `package-activate-all`. (package-activate-all): Use it and make the function preloaded. (package--archives-initialize): New function. (package-install): Use it. (list-packages): Avoid `switch-to-buffer`. (package-get-descriptor): New function. * lisp/startup.el (command-line): Simplify the code now that package-user-dir and package-directory-list are preloaded. * lisp/emacs-lisp/autoload.el (make-autoload): Add support for `:initialize #'custom-initialize-delay` in `defcustom`.
| * | Update copyright year to 2021Paul Eggert2021-01-01
| | | | | | | | | | | | Run "TZ=UTC0 admin/update-copyright".
| * | Default the init file to init.el, not initLars Ingebrigtsen2020-12-17
| | | | | | | | | | | | | | | * lisp/startup.el (startup--load-user-init-file): Make the default init file be "init.el", not "init" (bug#45197).
| * | Prefer setq-local in most filesStefan Kangas2020-12-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/apropos.el (apropos-print): * lisp/buff-menu.el (Buffer-menu-mode): * lisp/calc/calc.el (calc-trail-buffer): * lisp/chistory.el (command-history-mode): * lisp/dabbrev.el: * lisp/dframe.el (dframe-frame-mode): * lisp/doc-view.el (doc-view-presentation-mode): * lisp/ebuff-menu.el (electric-buffer-menu-mode) (electric-buffer-update-highlight): * lisp/edmacro.el (edit-kbd-macro): * lisp/face-remap.el (buffer-face-set, buffer-face-toggle): * lisp/files.el: (find-file-noselect-1, hack-local-variables-confirm) (set-visited-file-name, revert-buffer--default): * lisp/filesets.el (filesets-spawn-external-viewer): * lisp/find-dired.el (find-dired): * lisp/find-lisp.el (find-lisp-find-dired-internal): * lisp/finder.el (finder-mode): * lisp/font-core.el (font-lock-default-function): * lisp/format.el (format-annotate-function): * lisp/help-fns.el (describe-variable): * lisp/help-mode.el (help-mode): * lisp/icomplete.el (icomplete-minibuffer-setup) (icomplete--in-region-setup): * lisp/ido.el (ido-completion-help, ido-tidy): * lisp/international/robin.el (robin-activate): * lisp/leim/quail/hangul.el (hangul-input-method-activate): * lisp/leim/quail/uni-input.el (ucs-input-activate): * lisp/man.el (Man-mode): * lisp/master.el (master-set-slave): * lisp/minibuffer.el (minibuffer-completion-help) (read-file-name-default): * lisp/outline.el (outline-minor-mode): * lisp/pcomplete.el (pcomplete-comint-setup): * lisp/proced.el (proced-mode): * lisp/recentf.el (recentf-edit-list, recentf-open-files-items): * lisp/replace.el (occur-1): * lisp/reveal.el (reveal-mode): * lisp/ruler-mode.el (ruler--save-header-line-format): * lisp/scroll-lock.el (scroll-lock-mode): * lisp/startup.el (normal-top-level, normal-splash-screen): * lisp/strokes.el (strokes-list-strokes): * lisp/thumbs.el (thumbs-insert-image, thumbs-show-thumbs-list): * lisp/tree-widget.el (tree-widget-set-theme): * lisp/window.el (read-buffer-to-switch): * lisp/xwidget.el (xwidget-webkit-begin-edit-textarea): Prefer setq-local.
* | | Merge remote-tracking branch 'origin/master' into athena/unstableSean Whitton2020-11-01
|\| |
| * | Merge from origin/emacs-27Glenn Morris2020-10-02
| |\| | | | | | | | | | | | | | | | | | | | | | | | | 78eacf31e8 ; Fix many typos in symbols in docs and comments d5d12707d6 * doc/misc/flymake.texi (Using Flymake): Fix a typo. (Bug... # Conflicts: # lisp/allout.el # lisp/progmodes/ebrowse.el
| | * ; Fix many typos in symbols in docs and commentsStefan Kangas2020-10-02
| | |
* | | Merge remote-tracking branch 'origin/master' into athena/unstableSean Whitton2020-09-06
|\| |
| * | Fix PWD startup checking with symlinksPaul Eggert2020-08-26
| | | | | | | | | | | | | | | | | | * lisp/startup.el (normal-top-level): Do not put "." after "/"; it’s not needed and with current file-name-as-directory it does the wrong thing if PWD is a symlink.
| * | Allow directories to be called .el in -add-subdirs-to-load-pathRobert Pluim2020-08-26
| |/ | | | | | | | | * lisp/startup.el (normal-top-level-add-subdirs-to-load-path): Allow the directories to be called "<foo>.el" (bug#32266).
* | Merge remote-tracking branch 'origin/master' into athena/unstableSean Whitton2020-08-21
|\|
| * Let Emacs start even if curdir is inaccessiblePaul Eggert2020-08-17
| | | | | | | | | | | | | | * lisp/startup.el (normal-top-level): Also delete PWD if file-attributes fails for either $PWD or default-directory, instead of failing out of the top level. This fixes a regression from Emacs 26 (Bug#42903).
* | move addition to package-directory-listSean Whitton2020-08-05
| | | | | | | | This should mean it gets into the list even in batch mode.
* | attempt to register as an Emacsen flavourSean Whitton2020-07-25
| |
* | ... but not too earlySean Whitton2020-07-22
| |
* | alternative place for adding to package-directory-alistSean Whitton2020-07-22
| |
* | add Debian customisations to startup.elSean Whitton2020-07-04
|/
* ; Fix some typos and doc issues (bug#40695)Štěpán Němec2020-04-18
|
* Fix edge case errors in filename-matching regexpsMattias Engdegård2020-04-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These changes fix actual or latent bugs in regexps that match file names, such as PATTERN arguments to 'directory-files'. See https://lists.gnu.org/archive/html/emacs-devel/2020-04/msg00265.html * admin/authors.el (authors-obsolete-files-regexps) (authors-renamed-files-regexps): * lisp/auth-source-pass.el (auth-source-pass-entries): * lisp/calendar/todo-mode.el (todo-show, todo-find-filtered-items-file) (todo-filter-items, todo-reset-nondiary-marker, todo-reset-done-string) (todo-reset-comment-string, todo-reset-highlight-item): * lisp/cedet/semantic/db-ebrowse.el (semanticdb-load-ebrowse-caches): * lisp/cedet/semantic/texi.el (semantic-texi-associated-files): * lisp/cedet/srecode/map.el (srecode-map-update-map): * lisp/dired.el (dired-re-no-dot): * lisp/emacs-lisp/autoload.el (update-directory-autoloads): * lisp/emacs-lisp/shadow.el (load-path-shadows-find): * lisp/files.el (auto-mode-alist, directory-files-no-dot-files-regexp): * lisp/finder.el (finder-compile-keywords): * lisp/generic-x.el (inetd-conf-generic-mode, named-boot-generic-mode) (resolve-conf-generic-mode, etc-modules-conf-generic-mode): * lisp/gnus/gnus-agent.el (gnus-agent-read-agentview) (gnus-agent-regenerate-group, gnus-agent-update-files-total-fetched-for): * lisp/gnus/gnus-cache.el (gnus-cache-articles-in-group): * lisp/gnus/gnus-score.el (gnus-score-search-global-directories): * lisp/gnus/gnus-util.el (gnus-delete-directory): * lisp/gnus/gnus-uu.el (gnus-uu-dir-files): * lisp/gnus/nndraft.el (nndraft-request-group): * lisp/gnus/nnmh.el (nnmh-request-group, nnmh-request-create-group): (nnmh-request-delete-group, nnmh-active-number, nnmh-update-gnus-unreads): * lisp/gnus/nnspool.el (nnspool-request-group): * lisp/gnus/spam-stat.el (spam-stat-process-directory) (spam-stat-test-directory): * lisp/help-fns.el (help-fns--first-release): * lisp/help.el (view-emacs-news): * lisp/international/quail.el (quail-update-leim-list-file): * lisp/international/titdic-cnv.el (batch-titdic-convert): * lisp/mail/mspools.el (mspools-set-vm-spool-files) (mspools-get-spool-files): * lisp/mail/rmail.el (rmail-secondary-file-regexp) (rmail-speedbar-match-folder-regexp): * lisp/net/ange-ftp.el (ange-ftp-delete-directory): * lisp/net/tramp.el (tramp-use-absolute-autoload-file-names): * lisp/obsolete/gulp.el (gulp-send-requests): * lisp/obsolete/vc-arch.el (vc-arch-trim-revlib): * lisp/org/ob-core.el (org-babel-remove-temporary-directory): * lisp/progmodes/ebnf2ps.el (ebnf-file-suffix-regexp, ebnf-style-database): * lisp/progmodes/executable.el (executable-command-find-posix-p): * lisp/startup.el (command-line): * lisp/textmodes/refer.el (refer-get-bib-files): * lisp/url/url-about.el (url-probe-protocols): * lisp/vc/vc-rcs.el (vc-rcs-register, vc-rcs-unregister): * test/lisp/net/tramp-archive-tests.el (tramp-archive-test19-directory-files-and-attributes): * test/lisp/net/tramp-tests.el (tramp-test19-directory-files-and-attributes): Replace ^ and $ with \` and \', respectively. Use (rx (or (not ".") "...")), translated into "[^.]\\|\\.\\.\\.", to match anything but "." and "..", instead of several incorrect regexps.
* Make emacs prefer an existing ~/.emacs.d to an existing XDG locationRobert Pluim2020-01-16
| | | | | | | | | | | | | | | * doc/emacs/custom.texi (Find Init): Update description of how Emacs finds its init file directory and the interaction with $XDG_CONFIG_HOME (Early Init File): Correct XDG location of early-init.el * etc/NEWS: Update description to make it clear the ~/.emacs.d is preferred, even if the XDG location exists. * lisp/startup.el: Prefer ~/.emacs.d even if the XDG location exists. * lib-src/emacsclient.c (open_config): Prefer home directory the XDG location.
* Always use lexical-binding in lisp-interaction-mode (bug#38835)Mattias Engdegård2020-01-13
| | | | | | | | | | * lisp/progmodes/elisp-mode.el (lisp-interaction-mode): Set lexical-binding. * lisp/startup.el (command-line, startup--get-buffer-create-scratch): Don't set lexical-binding here. * doc/lispref/variables.texi: * etc/NEWS: Make it clear that lisp-interaction-mode uses lexical-binding.
* Update copyright year to 2020Paul Eggert2020-01-01
| | | | Run "TZ=UTC0 admin/update-copyright $(git ls-files)".
* Don't warn about pure-space overflowEli Zaretskii2019-12-14
| | | | | | * lisp/startup.el (command-line-1): Don't warn about pure-space overflow if we were dumped with pdumper. (Bug#38492)
* * lisp/startup.el (command-line): Fix last change in package--activatedStefan Monnier2019-11-11
|
* * lisp/startup.el (package--activated): Fix redundant definitionStefan Monnier2019-11-09
|
* Avoid changing value of defcustom package-enable-at-startupStefan Kangas2019-11-06
| | | | | | | | | | | | | | * lisp/emacs-lisp/package.el (package--activated): New variable to avoid changing value of defcustom 'package-enable-at-startup'. (package-initialize): Don't set 'package-enable-at-startup'. (package-initialize, package-activate-all): Set 'package--activated' instead of 'package-enable-at-startup'. (package--initialized): Add doc string. * lisp/startup.el (command-line): Check if 'package--activated' is non-nil before activating packages. * doc/lispref/package.texi (Packaging Basics): Update docs.
* Enable tab-bar-mode from X resourcesJuri Linkov2019-10-13
| | | | | | | | | * lisp/startup.el (x-apply-session-resources): Enable tab-bar-mode when X resource "tabBar" class "TabBar" is "on", "yes" or "1". * doc/man/emacs.1.in: * doc/emacs/xresources.texi (Table of Resources): Document X resource "tabBar" (class "TabBar").
* Use quit-window in some functionsAndreas Politz2019-10-13
| | | | | | | | | * lisp/strokes.el: * lisp/startup.el (fancy-startup-tail): * lisp/progmodes/verilog-mode.el (verilog-complete-word) (verilog-show-completions): * lisp/progmodes/idlwave.el (idlwave-quit-help): Use `quit-window' (bug#24213).
* Merge branch 'feature/tabs'Juri Linkov2019-10-01
|\
| * Remove unused code and reformat to 70 columns.Juri Linkov2019-10-01
| |
| * Frame-local tab-bar and window-local tab-line.Juri Linkov2019-08-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Add bug reporting and link the manual on the about screenStefan Kangas2019-09-28
| | | | | | | | | | | | * lisp/startup.el (fancy-about-text, normal-about-screen): Clarify that "Contribute" also describes how to report bugs. Add new link "Emacs Manual". (Bug#20697)
* | Fix running on MS-Windows with non-existing home directoryEli Zaretskii2019-09-28
| | | | | | | | | | | | * lisp/startup.el (startup--xdg-or-homedot): Don't access a non-existent user home directory on windows-nt systems. (Bug#37536)
* | Fix error in display-startup-screenLars Ingebrigtsen2019-09-26
| | | | | | | | | | * lisp/startup.el (use-fancy-splash-screens-p): Fix error in display-startup-screen if create-image fails (bug#22072).
* | Also prefer .emacs.d if .emacs existsPaul Eggert2019-09-19
| | | | | | | | | | | | Problem reported by Katsumi Yamaoka (Bug#37456). * lisp/startup.el (startup--xdg-or-homedot): Also prefer .emacs.d if a traditional .emacs file exists.
* | Fix auto-save with user-emacs-directoryPaul Eggert2019-09-11
| | | | | | | | | | * lisp/startup.el (auto-save-list-file-prefix): Delay initialization, since the value depends on user-emacs-directory (Bug#37354).
* | Calculate user-emacs-directory on startupPaul Eggert2019-08-31
|/ | | | | | | | | | Problem reported by Glenn Morris (Bug#583#56). * lisp/startup.el (startup--xdg-config-default): New constant. (startup--xdg-config-home-emacs): New var. (startup--xdg-or-homedot): New function. (normal-top-level): Use it to set user-emacs-directory early on. (command-line): Also use it to determine the startup init directory. * lisp/subr.el (user-emacs-directory): Just initialize to nil.
* Prefer ~/.config/emacs to ~/.emacs.d if neither existsPaul Eggert2019-08-30
| | | | | | | | | | | | That way, when Emacs starts in a fresh home directory, it prefers the new (XDG) convention rather than the old one. * lisp/files.el (locate-user-emacs-file): Make the parent directories of user-emacs-directory if needed. This is useful if user-emacs-directory is "~/.config/emacs" and "~/.config" does not yet exist. * lisp/startup.el (command-line): * lisp/subr.el (user-emacs-directory): Prefer XDG_CONFIG_HOME to ~/.emacs.d if neither exists.
* Use XDG conventions more consistentlyPaul Eggert2019-08-27
| | | | | | | | | | | | | | | | | | | | | | 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.
* Revert "Recompute user-emacs-directory-relative defcustoms one more time"Eli Zaretskii2019-08-24
| | | | | This reverts commit bb5cd7c4caf415e40836edbbc4e62b0dd411d73f. See bug#37173.