1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00
Commit graph

312 commits

Author SHA1 Message Date
Steven Allen
b0eaaf7366 More reliably check if a frame is the daemon's initial frame
Frames created when Emacs is running as a daemon may not have the
"client" frame parameter set, e.g., when:

1. Created from the user's init file.
2. Created via "emacsclient -e" (e.g., "emacsclient -e '(make-frame)'").

The "client" parameter simply indicates that the frame was created by
emacsclient directly (or recursively from another emacsclient frame).

Instead, this commit checks if (a) Emacs is running as a daemon and (b)
the target frame is the "terminal frame".  When run as a daemon, Emacs's
terminal frame is always the daemon's initial frame.

* lisp/desktop.el (desktop-clear):
(desktop-restoring-frameset-p):
* lisp/display-fill-column-indicator.el
(display-fill-column-indicator--turn-on):
* lisp/frame.el (frame-notice-user-settings):
* lisp/obsolete/linum.el (linum-on):
* lisp/progmodes/flymake.el (flymake-start):
* lisp/tab-bar.el (tab-bar--update-tab-bar-lines): Fix the "is this the
initial daemon-frame" checks.  (Bug#79686)
2025-10-30 20:27:19 +02:00
Juri Linkov
b5ec833bc8 * lisp/tab-bar.el (frameset-session-filter-tabs): New function.
Push new function to 'frameset-session-filter-alist'
with 'tabs' key (bug#79291).
2025-08-28 09:09:18 +03:00
Juri Linkov
d487591edb * lisp/tab-bar.el: Revert caching in 'tab-bar-format-align-right'.
(tab-bar--align-right-cache): Remove variable.
(tab-bar-format-align-right): Remove uses of
'tab-bar--align-right-cache' (bug#79141).
2025-08-12 20:49:02 +03:00
Juri Linkov
99080d0c04 Cache only the last string in 'tab-bar-format-align-right' (bug#78953)
* lisp/tab-bar.el (tab-bar--align-right-cache):
Rename from 'tab-bar--align-right-hash'.
(tab-bar-format-align-right): Use it to store
the string in the car, and the width in the cdr.
2025-07-10 09:40:51 +03:00
Juri Linkov
280d6f70a3 Handle multiple mouse events in display-buffer-override-next-command
* lisp/window.el (display-buffer-override-next-command):
Use 'mouse-event-p' to wait for more following mouse events.

* lisp/frame.el (other-frame-prefix):
* lisp/tab-bar.el (other-tab-prefix):
* lisp/windmove.el (windmove-display-in-direction):
* lisp/window.el (other-window-prefix, same-window-prefix):
Update the docstring to explain the behavior in regard
to multiple consecutive mouse events (bug#78945).
2025-07-09 09:48:17 +03:00
Juri Linkov
c4674bfa3a Cache 'string-pixel-width' in 'tab-bar-format-align-right' (bug#78953)
* lisp/tab-bar.el (tab-bar--align-right-hash): New internal variable.
(tab-bar-format-align-right): Use memoization for 'string-pixel-width'.
2025-07-09 09:32:18 +03:00
Juri Linkov
8b1978fa6e Fix tab-bar-format-align-right to not call tab-bar-format-global twice
* lisp/tab-bar.el (tab-bar-format-align-right): Add optional arg 'rest'
to handle it specially in 'tab-bar-format-list'.  Use the value from 'rest'
instead of calling format functions twice by 'tab-bar-format-list'.
(tab-bar-format-list): When 'format-list' contains the item
'tab-bar-format-align-right', collect the rest of formatted items
and call 'tab-bar-format-align-right' explicitly with the collected
list (bug#78953).
2025-07-09 09:28:05 +03:00
Juri Linkov
b13c583bc7 Better fix for ignoring 'tab-bar-lines' in daemon's initial frame
* lisp/tab-bar.el (tab-bar--update-tab-bar-lines):
Revert '(not (daemonp))' to update 'default-frame-alist'
even in daemon mode (bug#78896).

* lisp/frame.el (frame-notice-user-settings): For daemon's
initial frame don't modify the frame parameter 'tab-bar-lines'.
2025-06-29 20:06:06 +03:00
Juri Linkov
cd8319677d * lisp/tab-bar.el: Ignore daemon's initial frame (bug#78896).
(tab-bar--update-tab-bar-lines): Don't set the frame parameter
'tab-bar-lines' in daemon's initial frame because it messes up the
frames when 'format-mode-line' called from 'tab-bar-format-global'
on daemon's initial frame forces focus switch to daemon's initial
frame.  Also don't set 'default-frame-alist' in daemon mode because
'frame-notice-user-settings' copies the frame parameter 'tab-bar-lines'
from 'default-frame-alist' to daemon's initial frame.  Here updating
'default-frame-alist' is not much needed anyway since the frame
parameter 'tab-bar-lines' for new frames is set in 'make_terminal_frame'
and 'x-create-frame'.  'default-frame-alist' might be need only
to handle non-default 'tab-bar-show', but this can be handled by
'toggle-frame-tab-bar' called from 'server-after-make-frame-hook'.
(toggle-frame-tab-bar): Document a useful case of calling it
from 'server-after-make-frame-hook'.
2025-06-27 20:41:05 +03:00
James Thomas
a4ca0cd7f0 Add repeat map for tab-bar-history (bug#78804)
Add repeat map similar to that of winner-mode (to which
tab-bar-history is an alternative).

* lisp/tab-bar.el (tab-bar-history-repeat-map): Make the change.
2025-06-16 09:36:22 +03:00
Stefan Kangas
d8d524071d Use defvar-keymap for some trivial keymaps
* lisp/bindings.el (mode-line-window-dedicated-keymap)
(mode-line-buffer-identification-keymap):
* lisp/emulation/cua-rect.el (cua--overlay-keymap, cua--overlay-key):
* lisp/mh-e/mh-mime.el (mh-mime-security-button-map):
* lisp/mh-e/mh-utils.el (mh-hidden-header-keymap):
* lisp/net/eudc-bob.el (eudc-bob-generic-keymap, eudc-bob-image-keymap)
(eudc-bob-sound-keymap, eudc-bob-url-keymap, eudc-bob-mail-keymap):
* lisp/progmodes/etags-regen.el (etags-regen-mode-map):
* lisp/progmodes/octave.el (octave-help-mode-map):
* lisp/replace.el (multi-query-replace-map):
* lisp/simple.el (process-menu-mode-map, messages-buffer-mode-map):
* lisp/startup.el (splash-screen-keymap):
* lisp/tab-bar.el (tab-bar-mode-map):
* lisp/textmodes/ispell.el (ispell-minor-keymap):
* lisp/textmodes/tex-mode.el (latex-mode-map, plain-tex-mode-map):
* lisp/tree-widget.el (tree-widget-button-keymap):
* lisp/vc/vc-hooks.el (vc-mode-line-map): Use defvar-keymap.
2025-03-16 13:48:11 +01:00
Stefan Kangas
77b7e2d37b Automatically document when setopt is needed
* lisp/help-fns.el (help--recommend-setopt): New function to
automatically document the need to use `setopt` to set the values of
any defcustoms with a `:set` property.
(help-fns-describe-variable-functions): Add above new function to
hook.

* lisp/follow.el (follow-mode-prefix-key):
* lisp/minibuffer.el (minibuffer-regexp-prompts):
* lisp/register.el (register-use-preview):
* lisp/savehist.el (savehist-autosave-interval):
* lisp/saveplace.el (save-place-autosave-interval):
* lisp/tab-bar.el (tab-bar-define-keys):
* lisp/textmodes/text-mode.el (text-mode-ispell-word-completion):
Delete now redundant text from docstrings.
2025-03-12 00:40:17 +01:00
shipmints
efd483cf0e mouse-face properties on tab-bar tab captions (bug#76394)
* etc/NEWS: Announce 'tab-bar' 'mouse-face' support.

* src/xdisp.c (note_tab_bar_highlight): Handle mouse-face property.

* lisp/tab-bar.el
(tab-bar-tab-highlight): New face.
(tab-bar-tab-name-format-mouse-face): New function adds the 'mouse-face'
'tab-bar-tab-highlight' to the tab name.
(tab-bar-tab-name-format-functions): Add
'tab-bar-tab-name-format-mouse-face'.
2025-03-06 20:37:44 +02:00
Visuwesh
ea715b0183 Recommend 'tab-bar-history-mode' over 'winner-mode'
* lisp/winner.el (winner-mode):
* lisp/tab-bar.el (tab-bar-mode): Update the docstring to
suggest 'tab-bar-history-mode' instead of 'winner-mode' when
using 'tab-bar-mode' instead.  (Bug#76439)
2025-02-27 20:15:05 +02:00
Stefan Kangas
bf97946d7d Merge branch 'scratch/no-purespace' into 'master' 2025-02-01 04:56:52 +01:00
shipmints
f45a776fe3 Add new variable tab-bar-format-tab-help-text-function
* lisp/tab-bar.el (tab-bar--format-tab):
Add new variable 'tab-bar-format-tab-help-text-function' and a default
function 'tab-bar-format-tab-help-text-default'.  'tab-bar--format-tab'
respects this new variable when producing a tab's help text, normally
shown in the echo area or via tooltips (bug#75950).
2025-01-31 09:09:50 +02:00
shipmints
a5965217fc * lisp/tab-bar.el (tab-bar-select-tab): Fix wc-bl/wc-bbl when nil
Remove the nil-check conditionals around 'wc-bl' and 'wc-bbl' that reset
frame parameters 'buffer-list' and 'buried-buffer-list'. This ensures
originating nil values correctly propagate (bug#75935).
2025-01-30 20:35:09 +02:00
shipmints
6c46e2a363 Add new user option tab-bar-define-keys
* lisp/tab-bar.el (tab-bar-define-keys):
Add new defcustom tab-bar-define-keys.  Reorganize key binding functions
to accommodate.  Also remove checks for tab-bar-mode enabled in
'tab-bar-select-tab-modifiers', as unnecessary and which prevented user
changes from being accepted in cases where the user defers enabling
tab-bar-mode (bug#75918).
2025-01-30 20:33:17 +02:00
shipmints
815c4dc0e0 Add abnormal hook tab-bar-post-undo-close-tab-functions
* lisp/tab-bar.el (tab-bar-undo-close-tab):
Add new abnormal hook tab-bar-post-undo-close-tab-functions (bug#75919).
2025-01-30 20:29:52 +02:00
Juri Linkov
6b71d0b178 * lisp/tab-bar.el (tab-bar-select-tab): Fix tab-bar-history-mode.
Reset the values of 'tab-bar-history-back' and 'tab-bar-history-forward'
to nil to not retain a previous tab's history after switching to another
tab using window-state.
2025-01-14 20:20:42 +02:00
Paul Eggert
4da38c6321 Update copyright year to 2025
Run "TZ=UTC0 admin/update-copyright".
2025-01-01 07:39:17 +00:00
Stefan Kangas
d6aeb1a260 Delete remaining calls to purecopy
* lisp/button.el (default-button):
* lisp/calendar/holidays.el (holiday-solar-holidays)
(holiday-bahai-holidays, holiday-islamic-holidays)
(holiday-christian-holidays, holiday-hebrew-holidays)
(holiday-oriental-holidays, holiday-general-holidays):
* lisp/comint.el (comint-file-name-prefix):
* lisp/composite.el (unicode-category-table):
* lisp/cus-face.el (custom-declare-face):
* lisp/custom.el (custom-add-load, custom-add-package-version)
(custom-add-version, custom-add-link, custom-declare-group)
(custom-declare-variable):
* lisp/dired.el (dired-listing-switches):
* lisp/epa-hook.el (epa-file-name-regexp):
* lisp/faces.el (x-font-regexp, x-font-regexp-head)
(x-font-regexp-slant, x-font-regexp-weight, )
(set-face-attribute, set-face-documentation, face-x-resources)
(face-font-registry-alternatives, face-font-family-alternatives)
(term-file-prefix):
* lisp/find-file.el (ff-special-constructs):
* lisp/format.el (format-alist):
* lisp/help.el (help-for-help):
* lisp/image-file.el (image-file-name-extensions):
* lisp/info.el:
* lisp/isearch.el (isearch-help-for-help-internal)
(search-whitespace-regexp):
* lisp/jka-cmpr-hook.el (jka-compr-load-suffixes)
(jka-compr-mode-alist-additions)
(jka-compr-compression-info-list, jka-compr-build-file-regexp):
* lisp/language/ethiopic.el (font-ccl-encoder-alist):
* lisp/language/korea-util.el (default-korean-keyboard):
* lisp/language/tibetan.el (tibetan-precomposition-rule-regexp)
(tibetan-precomposed-regexp):
* lisp/locate.el (locate-ls-subdir-switches):
* lisp/lpr.el (lpr-command):
* lisp/mail/rmail.el (rmail-secondary-file-regexp)
(rmail-secondary-file-directory, rmail-highlighted-headers)
(rmail-ignored-headers, rmail-spool-directory, rmail-file-name):
* lisp/mail/sendmail.el (mail-default-directory)
(mail-signature-file, mail-citation-prefix-regexp)
(mail-personal-alias-file, mail-header-separator):
* lisp/menu-bar.el (yank-menu):
* lisp/net/eudc.el (eudc-tools-menu):
* lisp/newcomment.el (comment-padding, comment-end):
* lisp/obsolete/autoload.el (autoload-generate-file-autoloads):
* lisp/progmodes/hideshow.el (hs-special-modes-alist):
* lisp/ps-print.el (ps-page-dimensions-database):
* lisp/rfn-eshadow.el (file-name-shadow-tty-properties):
* lisp/shell.el (shell-dumb-shell-regexp):
* lisp/simple.el (overwrite-mode-binary, overwrite-mode-textual)
(mark-inactive, shell-command-switch)
(next-error-overlay-arrow-position):
* lisp/subr.el (package--builtin-versions, eval-after-load):
* lisp/tab-bar.el ([tab-bar]):
* lisp/term/pgtk-win.el (x-gtk-stock-map):
* lisp/term/x-win.el (x-gtk-stock-map):
* lisp/tool-bar.el ([tool-bar]):
* lisp/widget.el (define-widget): Remove calls to purecopy.
2024-12-12 22:48:19 +01:00
Stefan Kangas
4df832750c Don't start docstrings with "This function"
* lisp/calculator.el (calculator-add-operators):
* lisp/erc/erc-log.el (erc-generate-log-file-name-with-date)
(erc-generate-log-file-name-short):
* lisp/eshell/esh-mode.el (eshell-begin-on-new-line):
* lisp/progmodes/hideif.el (hif-merge-ifdef-region):
* lisp/tab-bar.el (tab-bar--event-to-item):
* lisp/textmodes/artist.el (artist-no-rb-unset-point2)
(artist-no-rb-unset-points):
* lisp/which-key.el (which-key--hide-popup): Don't start function
docstrings with "This function".
2024-11-01 23:56:12 +01:00
Juri Linkov
2c062dfdf5 Call tab-bar-tab-post-open-functions during tabs initialization
* lisp/tab-bar.el (tab-bar-tabs): Run the hook
'tab-bar-tab-post-open-functions' after creating the first tab
in the selected frame's tab-bar list of tabs (bug#74087).
Suggested by Ship Mints <shipmints@gmail.com>.
2024-10-30 20:32:28 +02:00
Eli Zaretskii
6dcd3d2404 Merge from origin/emacs-30
b420e149b1 Fix a typo in ediff-init.el
e1304e9b1b Fix 'chart-space-usage' on MS-Windows
04c44405bf Fix alignment and documentation of vtable.el
4d6fadb8d2 ; * lisp/which-key.el: Fix ':package-version' (bug#73072).
54071b9cef ; Improve doc strings of 'tab-bar-mode' and 'tab-line-mode'
87a8b12a0c Fix test failure in erc-networks-tests
dad0935cfc ; * doc/emacs/building.texi (Lisp Libraries): Update (bug...
e4dc6711b0 Fix :hook in 'use-package'
c1cd036d27 ; * doc/lispref/modes.texi (Mode Line Data): Fox wording.
ae2463796f ; Caveats about using :eval in 'mode-line-format'
4047072c7d Update FSF's address
24f12bdd77 Support the new option in ruby-ts-mode too
6c15b7710d Add new option ruby-bracketed-args-indent
7799ef4335 Fix Rmail base64 and qp decoding of MIME payloads
0def396fa8 Update to Org 9.7.11
8c044bd972 ; Fix recent changes in documentation
e0d8879bcd * test/lisp/emacs-lisp/tabulated-list-tests.el: Add missi...
4ff4b78f92 ; Small doc fixes
da980ad838 ; Reword some "allows Xing"
2ca7d5649c ; More accurate text about how `equal` compares various o...

# Conflicts:
#	etc/NEWS
2024-09-07 06:25:15 -04:00
Eli Zaretskii
54071b9cef ; Improve doc strings of 'tab-bar-mode' and 'tab-line-mode'
* lisp/tab-line.el (tab-line-mode):
* lisp/tab-bar.el (tab-bar-mode): Doc fixes (bug#73049)
2024-09-05 22:09:40 +03:00
Sean Whitton
da980ad838 ; Reword some "allows Xing"
* doc/emacs/anti.texi (Antinews):
* etc/NEWS:
* etc/NEWS.29:
* lisp/tab-bar.el (tab-bar-select-restore-windows):
* lisp/vc/vc-git.el (vc-git-print-log-follow): Reword to avoid
"allows Xing".  This is reported to be better for non-native
readers.  Based on suggestions of Eli Zaretskii <eliz@gnu.org>.
2024-09-01 11:20:25 +01:00
Eli Zaretskii
d1f896b5f8 Merge from origin/emacs-30
4b60267d83 Make Python skeletons available in 'python-ts-mode' as well
62dcbfb776 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
1baa62b2ac ; * etc/NEWS: Fix typos.
dfcfaa0ef5 More accurate documentation of 'equal' in ELisp Reference
baaf97ce1a ; Fix some ungrammatical uses of "allows to"

# Conflicts:
#	etc/NEWS
2024-08-31 08:14:13 -04:00
Sean Whitton
baaf97ce1a ; Fix some ungrammatical uses of "allows to"
* doc/emacs/anti.texi (Antinews):
* etc/NEWS:
* etc/NEWS.29:
* lib/cdefs.h:
* lisp/tab-bar.el (tab-bar-select-restore-windows):
* lisp/vc/vc-git.el (vc-git-print-log-follow):
* m4/gnulib-common.m4 (gl_CHECK_FUNCS_SET_RESULTS):
(gl_CHECK_FUNCS_ANDROID): Fix ungrammatical uses of "allows to".
2024-08-30 11:47:35 +01:00
Juri Linkov
60da504cf7 * lisp/tab-bar.el: Improve tab-bar-auto-width-predicate-default (bug#71883).
(tab-bar--auto-width-faces-default): New variable with the
value from the default value of tab-bar-auto-width-faces.
(tab-bar-auto-width-faces): Set the default value to
tab-bar--auto-width-faces-default.
(tab-bar-auto-width-predicate-default): For backwards-compatibility
use the old logic of checking tab-bar-auto-width-faces when its value
was changed.  Otherwise, check for a symbol, but remove "current-group"
from the list of symbols.
2024-08-19 19:56:31 +03:00
Joseph Turner
9ed761a793 Add abnormal hook to determine which tabs to auto-widen
* lisp/tab-bar.el (tab-bar-auto-width-predicate-default):  Default value
for tab-bar-auto-width-functions.
(tab-bar-auto-width-functions): New abnormal hook.
(tab-bar-auto-width): Run new abnormal hook until success instead of
comparing text properties.
2024-08-19 19:50:02 +03:00
Juri Linkov
7b49261b5e * lisp/tab-bar.el (tab-bar--format-tab-group): Add 'current-group'.
Use current-group symbol for current tab group item (bug#71883).
2024-08-06 10:01:05 +03:00
Juri Linkov
7a14f60b90 * lisp/tab-bar.el (tab-bar-tab-group-format-default): Hide hints.
Don't display hints when tab-bar-show-inactive-group-tabs is customized
to t (bug#71939).  Suggested by Ship Mints <shipmints@gmail.com>.
2024-08-05 09:56:38 +03:00
Po Lu
96097d3623 Merge from savannah/emacs-30
1154d8aafe Better resolve bug#72188
ceb5a15222 MacOS: Let EmacsView implement NSTextInputClient
9f7c1ace9f NS: Set frame position when entering/exiting fullscreen (...
74fe889a93 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
abefd9514b * lisp/tab-bar.el (tab-bar-move-tab-to-group): Fix for a ...
e09982f8f5 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
5cf64d8377 Fix sporadic crashes and `select' failures in dumped images
a475360af9 Correct display of Doc View documents after tab switching
b0d927e1dc Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
469bc7c968 Use 'kill-process' as a fallback when a pipe gets broken ...
158835668d ; * doc/lispref/modes.texi (Mode Line Data): Fix formatting.
2024-08-01 08:25:31 +08:00
Juri Linkov
63e609f6aa * lisp/tab-bar.el (tab-bar-show-inactive-group-tabs): New defcustom.
(tab-bar-format-tabs-groups): Use it (bug#71939).
Suggested by Ship Mints <shipmints@gmail.com>.
2024-07-29 21:27:30 +03:00
Juri Linkov
abefd9514b * lisp/tab-bar.el (tab-bar-move-tab-to-group): Fix for a new group's tab.
Move tab with a new group to the end of the tab bar (bug#72352)
Suggested by Ship Mints <shipmints@gmail.com>
2024-07-29 21:16:16 +03:00
Juri Linkov
339310d020 * lisp/tab-bar.el (tab-bar-select-restore-windows): Improve the docstring.
Suggested by Kévin Le Gouguec <kevin.legouguec@gmail.com> in bug#71779.
2024-06-27 19:58:27 +03:00
Juri Linkov
4a0958642d * lisp/tab-bar.el (tab-bar-tab-group-face-function): Improve doc (bug#71733). 2024-06-24 19:57:57 +03:00
Po Lu
ed122417b9 Improve scaling of tab bar items on high-density displays
* lisp/tab-bar.el (tab-bar-auto-width-max)
(tab-bar-auto-width-min): Accept values of a new format where
the pixel width is a list and is subject to scaling.
(tab-bar-auto-width-1): New function.
(tab-bar-auto-width): Scale pixel values from t-b-a-w-min and
t-b-a-w-max.
2024-06-08 15:18:27 +08:00
Juri Linkov
13d8b0eb63 * lisp/tab-bar.el (tab-bar-mouse-1): Avoid infinite recursion (bug#70086). 2024-05-06 20:10:43 +03:00
Juri Linkov
6e835dfaca * lisp/tab-bar.el (tab-bar-select-restore-windows): Use 'special-mode'. 2024-05-06 19:48:04 +03:00
Juri Linkov
9ecd65a660 * lisp/tab-bar.el: Support mouse clicks for multi-item 'global-mode-string'.
(tab-bar-format-global): Split elements of 'global-mode-string'
to separate items of the tab bar, so events for each item are
handled separately (bug#70086).
2024-05-06 19:43:50 +03:00
Juri Linkov
14cd4fce4b * lisp/tab-bar.el: Support mouse clicks bound in keymap properties.
(tab-bar--event-to-item): Handle mouse bindings for commands
bound in keymap properties of global-mode-string (bug#70086).
(tab-bar-mouse-down-1, tab-bar-mouse-1, tab-bar-touchscreen-begin):
Add the symbol 'global' to the list of handled items.
2024-05-02 20:55:03 +03:00
Juri Linkov
a914667a00 Make the buffer displayed by tab-bar-select-restore-windows internal
* lisp/tab-bar.el (tab-bar-select-restore-windows): Make the buffer
" *Old buffer %s*" internal with the leading space in its name.
2024-05-02 20:44:04 +03:00
Juri Linkov
50fab7062d * lisp/tab-bar.el (tab-bar-mode-map): New keymap (bug#69578).
(tab-bar-select-tab-modifiers): Call tab-bar--undefine-keys
before set-default in :set of defcustom.
(tab-bar--define-keys, tab-bar--undefine-keys):
Change keybindings in tab-bar-mode-map instead of the global map.
Move checking of global-key-binding to tab-bar-mode--tab-key-bind.
(tab-bar-mode--tab-key-bind): New internal function.
2024-04-05 19:23:08 +03:00
Juri Linkov
c3781bf59e New functions to set and use context of window points (bug#33871)
* lisp/dired.el (dired-mode): Set buffer-local
'window-point-context-set-function' to remember 'dired-filename'
or 'position' in the window with the Dired buffer.
Set buffer-local 'window-point-context-use-function' to restore
the remembered position of the window point.

* lisp/tab-bar.el (tab-bar--tab): Use window-point-context-set.
(tab-bar-select-restore-context): New user option.
(tab-bar-select-tab): Use window-point-context-use.

* lisp/window.el: Add '(context . writable)' to
'window-persistent-parameters'.
(window-point-context-set, window-point-context-use): New functions.
(window-point-context-set-default-function)
(window-point-context-use-default-function): New functions.
(window-point-context-set-function)
(window-point-context-use-function): New variables.
2024-04-02 20:19:21 +03:00
Juri Linkov
c29b6df227 * lisp/tab-bar.el (tab-bar-select-restore-windows): New defcustom.
(tab-bar-select-restore-windows): New function.
(tab-bar-select-tab): Let-bind window-restore-killed-buffer-windows
to tab-bar-select-restore-windows (bug#68235).
2024-03-17 19:57:05 +02:00
Juri Linkov
3cb0614507 * lisp/tab-bar.el (tab-bar-tab-post-select-functions): New hook (bug#69093).
(tab-bar-select-tab): Call tab-bar-tab-post-select-functions at the end.
2024-03-05 19:14:28 +02:00
Juri Linkov
29e59b835c * lisp/tab-bar.el: Fixes for point in window configuration (bug#68235)
(tab-bar--tab): Instead of 'point-marker', use 'copy-marker' with the TYPE
argument set to 'window-point-insertion-type'.  This will allow point to
follow the output after switching tabs when point is at the end of
a comint/compilation buffer.
(tab-bar-select-tab): Remove ad-hoc rule for the reverted dired buffer.
2024-01-09 19:22:40 +02:00
Po Lu
ecf08f0621 Merge from savannah/emacs-29
dc4e6b1329 ; Update copyright years in more files
64b3777631 ; Run set-copyright from admin.el
8e1c56ae46 ; Add 2024 to copyright years

# Conflicts:
#	doc/misc/modus-themes.org
#	doc/misc/texinfo.tex
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	etc/themes/modus-operandi-theme.el
#	etc/themes/modus-themes.el
#	etc/themes/modus-vivendi-theme.el
#	lib/alloca.in.h
#	lib/binary-io.h
#	lib/c-ctype.h
#	lib/c-strcasecmp.c
#	lib/c-strncasecmp.c
#	lib/careadlinkat.c
#	lib/cloexec.c
#	lib/close-stream.c
#	lib/diffseq.h
#	lib/dup2.c
#	lib/filemode.h
#	lib/fpending.c
#	lib/fpending.h
#	lib/fsusage.c
#	lib/getgroups.c
#	lib/getloadavg.c
#	lib/gettext.h
#	lib/gettime.c
#	lib/gettimeofday.c
#	lib/group-member.c
#	lib/malloc.c
#	lib/md5-stream.c
#	lib/md5.c
#	lib/md5.h
#	lib/memmem.c
#	lib/memrchr.c
#	lib/nanosleep.c
#	lib/save-cwd.h
#	lib/sha1.c
#	lib/sig2str.c
#	lib/stdlib.in.h
#	lib/strtoimax.c
#	lib/strtol.c
#	lib/strtoll.c
#	lib/time_r.c
#	lib/xalloc-oversized.h
#	lisp/auth-source-pass.el
#	lisp/emacs-lisp/lisp-mnt.el
#	lisp/emacs-lisp/timer.el
#	lisp/info-look.el
#	lisp/jit-lock.el
#	lisp/loadhist.el
#	lisp/mail/rmail.el
#	lisp/net/ntlm.el
#	lisp/net/webjump.el
#	lisp/progmodes/asm-mode.el
#	lisp/progmodes/project.el
#	lisp/progmodes/sh-script.el
#	lisp/textmodes/flyspell.el
#	lisp/textmodes/reftex-toc.el
#	lisp/textmodes/reftex.el
#	lisp/textmodes/tex-mode.el
#	lisp/url/url-gw.el
#	m4/alloca.m4
#	m4/clock_time.m4
#	m4/d-type.m4
#	m4/dirent_h.m4
#	m4/dup2.m4
#	m4/euidaccess.m4
#	m4/fchmodat.m4
#	m4/filemode.m4
#	m4/fsusage.m4
#	m4/getgroups.m4
#	m4/getloadavg.m4
#	m4/getrandom.m4
#	m4/gettime.m4
#	m4/gettimeofday.m4
#	m4/gnulib-common.m4
#	m4/group-member.m4
#	m4/inttypes.m4
#	m4/malloc.m4
#	m4/manywarnings.m4
#	m4/mempcpy.m4
#	m4/memrchr.m4
#	m4/mkostemp.m4
#	m4/mktime.m4
#	m4/nproc.m4
#	m4/nstrftime.m4
#	m4/pathmax.m4
#	m4/pipe2.m4
#	m4/pselect.m4
#	m4/pthread_sigmask.m4
#	m4/readlink.m4
#	m4/realloc.m4
#	m4/sig2str.m4
#	m4/ssize_t.m4
#	m4/stat-time.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/stdio_h.m4
#	m4/stdlib_h.m4
#	m4/stpcpy.m4
#	m4/strnlen.m4
#	m4/strtoimax.m4
#	m4/strtoll.m4
#	m4/time_h.m4
#	m4/timegm.m4
#	m4/timer_time.m4
#	m4/timespec.m4
#	m4/unistd_h.m4
#	m4/warnings.m4
#	nt/configure.bat
#	nt/preprep.c
#	test/lisp/register-tests.el
2024-01-02 10:28:14 +08:00