Merge from origin/emacs-29

f0300fb059 ; Tweak "(emacs)Bug Reference" formatting/wording.
ea62a14ea3 Fix display of vscrolled windows
4cefa3c0b1 ; * doc/emacs/files.texi (Backup): Clarify "saving" (bug#...
db7b571aaa ; Improve documentation of 'world-clock'
6a0bb7beae * doc/emacs/misc.texi (emacsclient Options): Suggest forw...
859b4227e3 Update go-ts-mode to support latest tree-sitter-go grammar
407e85ce13 Fix c++-ts-mode defun navigation (bug#65885)
aca5064f12 ; Fix last change.
55aab2d471 ; * etc/PROBLEMS: An entry about focus issues with XFCE (...
19cee16576 ; * doc/emacs/misc.texi (emacsclient Options): Fix typo. ...
2a41b6ba51 ; * src/filelock.c (Flock_file): Doc fix (bug#70216).
This commit is contained in:
Eli Zaretskii 2024-04-13 07:37:13 -04:00
commit adbcf268bc
9 changed files with 94 additions and 43 deletions

View file

@ -569,9 +569,10 @@ Emacs carefully copies the old contents to another file, called the
@dfn{backup} file, before actually saving.
Emacs makes a backup for a file only the first time the file is
saved from a buffer. No matter how many times you subsequently save
the file, its backup remains unchanged. However, if you kill the
buffer and then visit the file again, a new backup file will be made.
saved from the buffer that visits it. No matter how many times you
subsequently save the file, its backup remains unchanged. However, if
you kill the buffer and then visit the file again, a new backup file
will be made.
For most files, the variable @code{make-backup-files} determines
whether to make backup files. On most operating systems, its default

View file

@ -3374,29 +3374,30 @@ merge requests resulting in different URLs.
@vindex bug-reference-auto-setup-functions
If @code{bug-reference-mode} is activated,
@code{bug-reference-mode-hook} has been run and still
@code{bug-reference-bug-regexp}, and @code{bug-reference-url-format}
aren't both set, it'll try to setup suitable values for these two
variables itself by calling the functions in
@code{bug-reference-auto-setup-functions} one after the other until
one is able to set the variables.
@code{bug-reference-mode-hook} has been run, and either
@code{bug-reference-bug-regexp} or @code{bug-reference-url-format} is
still @code{nil}, the mode will try to automatically find a suitable
value for these two variables by calling the functions in
@code{bug-reference-auto-setup-functions} one by one until one
succeeds.
@vindex bug-reference-setup-from-vc-alist
@vindex bug-reference-forge-alist
@vindex bug-reference-setup-from-mail-alist
@vindex bug-reference-setup-from-irc-alist
Right now, there are three types of setup functions.
Right now, there are three types of setup functions.
@enumerate
@item
Setup for version-controlled files configurable by the variables
@code{bug-reference-forge-alist}, and
@code{bug-reference-setup-from-vc-alist}. The defaults are able to
setup GNU projects where @url{https://debbugs.gnu.org} is used as
set up GNU projects where @url{https://debbugs.gnu.org} is used as
issue tracker and issues are usually referenced as @code{bug#13} (but
many different notations are considered, too), and several kinds of
modern software forges such as GitLab, Gitea, SourceHut, or GitHub.
If you deploy a self-hosted instance of such a forge, the easiest way
to tell bug-reference about it is through
many different notations are considered, too), as well as several
other kinds of software forges such as GitLab, Gitea, SourceHut, and
GitHub. If you deploy a self-hosted instance of such a forge, the
easiest way to tell bug-reference about it is through
@code{bug-reference-forge-alist}.
@item
@ -3413,7 +3414,7 @@ Rcirc, @xref{Top, Rcirc,, rcirc, The Rcirc Manual}, and ERC,
@end enumerate
For almost all of those modes, it's enough to simply enable
@code{bug-reference-mode}, only Rmail requires a slightly different
@code{bug-reference-mode}; only Rmail requires a slightly different
setup.
@smallexample
@ -3444,33 +3445,35 @@ to be performed whenever another messages is displayed.
@heading Adding support for third-party packages
@vindex bug-reference-auto-setup-functions
Adding support for bug-reference' auto-setup is usually quite
straight-forward: write a setup function of zero arguments which
Adding support for bug-reference auto-setup is usually quite
straightforward: write a setup function of zero arguments which
gathers the required information (e.g., List-Id/To/From/Cc mail header
values in the case of a MUA), and then calls one of the following
helper functions:
@itemize @bullet
@item
@code{bug-reference-maybe-setup-from-vc} which does the setup
according to @code{bug-reference-setup-from-vc-alist},
@code{bug-reference-maybe-setup-from-vc}, which does the setup
according to @code{bug-reference-setup-from-vc-alist};
@item
@code{bug-reference-maybe-setup-from-mail} which does the setup
according to @code{bug-reference-setup-from-mail-alist},
@code{bug-reference-maybe-setup-from-mail}, which does the setup
according to @code{bug-reference-setup-from-mail-alist}; and
@item
and @code{bug-reference-maybe-setup-from-irc} which does the setup
@code{bug-reference-maybe-setup-from-irc}, which does the setup
according to @code{bug-reference-setup-from-irc-alist}.
@end itemize
A setup function should return non-@code{nil} if it could setup bug-reference
mode which is the case if the last thing the function does is calling
one of the helper functions above.
A setup function should return non-@code{nil} if it could set up
bug-reference mode, which is the case if the last thing the function
does is call one of the helper functions above.
Finally, the setup function has to be added to
@code{bug-reference-auto-setup-functions}.
Note that these auto-setup functions should check as a first step if
they are applicable, e.g., by checking the @code{major-mode} value.
they are applicable, e.g., by checking the value of @code{major-mode}.
@heading Integration with the debbugs package

View file

@ -2166,12 +2166,13 @@ running on a text terminal, it creates a new frame in the current text
terminal.
@item -T @var{tramp-prefix}
@itemx --tramp-prefix=@var{tramp-prefix}
@itemx --tramp=@var{tramp-prefix}
Set the prefix to add to filenames for Emacs to locate files on remote
machines (@pxref{Remote Files}) using TRAMP (@pxref{Top, The Tramp
Manual,, tramp, The Tramp Manual}). This is mostly useful in
combination with using the Emacs server over TCP (@pxref{TCP Emacs
server}). By ssh-forwarding the listening port and making the
combination with using the Emacs server from a remote host. By
ssh-forwarding the listening socket, or ssh-forwarding the listening
port @pxref{TCP Emacs server} and making the
@var{server-file} available on a remote machine, programs on the
remote machine can use @command{emacsclient} as the value for the
@env{EDITOR} and similar environment variables, but instead of talking
@ -2183,16 +2184,29 @@ Setting the environment variable @env{EMACSCLIENT_TRAMP} has the same
effect as using the @samp{-T} option. If both are specified, the
command-line option takes precedence.
For example, assume two hosts, @samp{local} and @samp{remote}, and
that the local Emacs listens on tcp port 12345. Assume further that
For example, assume two hosts, @samp{local} and @samp{remote}.
@example
local$ ssh -R "/home/%r/.emacs.socket":"$@{XDG_RUNTIME_DIR:-$@{TMPDIR:-/tmp@}/emacs%i@}$@{XDG_RUNTIME_DIR:+/emacs@}/server" remote
remote$ export EMACS_SOCKET_NAME=$HOME/.emacs.socket
remote$ export EMACSCLIENT_TRAMP=/ssh:remote:
remote$ export EDITOR=emacsclient
remote$ $EDITOR /tmp/foo.txt #Should open in local emacs.
@end example
If you are using a platform where @command{emacsclient} does not use
Unix domain sockets (i.e., MS-Windows), or your SSH implementation is
not able to forward them (e.g., OpenSSH before version 6.7), you can
forward a TCP port instead. In this example, assume that the local
Emacs listens on tcp port 12345. Assume further that
@file{/home} is on a shared file system, so that the server file
@file{~/.emacs.d/server/server} is readable on both hosts.
@example
local$ ssh -R12345:localhost:12345 remote
remote$ export EDITOR="emacsclient \
--server-file=server \
--tramp=/ssh:remote:"
remote$ export EMACS_SERVER_FILE=server
remote$ export EMACSCLIENT_TRAMP=/ssh:remote:
remote$ export EDITOR=emacsclient
remote$ $EDITOR /tmp/foo.txt #Should open in local emacs.
@end example

View file

@ -1629,6 +1629,18 @@ underlying functionality in plasmashell gets fully disabled as well.
At least a restart of plasmashell is required for the clipboard
history to be cleared.
*** XFCE: Selected frame loses focus
This can happen, e.g., in Ediff: when you move between the differences
by typing 'n' or 'p' into the control frame, input focus unexpectedly
switches to the buffers where Emacs shows the differences, instead of
being left in the Ediff control frame.
The reason is a bug in the window manager: it shifts input focus when
raising a frame. A workaround is to activate the "focus stealing
prevention" option of the window manager (in XFCE settings, under
"window manager tweaks", in the "focus" tab).
*** CDE: Frames may cover dialogs they created when using CDE.
This can happen if you have "Allow Primary Windows On Top" enabled which

View file

@ -1207,7 +1207,9 @@ BEG and END are described in `treesit-range-rules'."
"struct_specifier"
"enum_specifier"
"union_specifier"
"class_specifier"
;; Make sure this doesn't match
;; storage_class_specifier.
"^class_specifier$"
"namespace_definition"
"preproc_def"
"preproc_function_def")

View file

@ -113,6 +113,13 @@
(ignore-errors
(or (treesit-query-string "" '((iota) @font-lock-constant-face) 'go) t)))
;; tree-sitter-go changed method_spec to method_elem in
;; https://github.com/tree-sitter/tree-sitter-go/commit/b82ab803d887002a0af11f6ce63d72884580bf33
(defun go-ts-mode--method-elem-supported-p ()
"Return t if Go grammar uses `method_elem' instead of `method_spec'."
(ignore-errors
(or (treesit-query-string "" '((method_elem) @cap) 'go) t)))
(defvar go-ts-mode--font-lock-settings
(treesit-font-lock-rules
:language 'go
@ -137,11 +144,13 @@
:language 'go
:feature 'definition
'((function_declaration
`((function_declaration
name: (identifier) @font-lock-function-name-face)
(method_declaration
name: (field_identifier) @font-lock-function-name-face)
(method_spec
(,(if (go-ts-mode--method-elem-supported-p)
'method_elem
'method_spec)
name: (field_identifier) @font-lock-function-name-face)
(field_declaration
name: (field_identifier) @font-lock-property-name-face)

View file

@ -459,7 +459,11 @@ Each element has the form (TIMEZONE LABEL).
TIMEZONE should be a string of the form AREA/LOCATION, where AREA is
the name of a region -- a continent or ocean, and LOCATION is the name
of a specific location, e.g., a city, within that region.
LABEL is a string to display as the label of that TIMEZONE's time."
LABEL is a string to display as the label of that TIMEZONE's time.
This option has effect only on systems that support Posix-style
zoneinfo files specified as CONTINENT/CITY. In particular,
MS-Windows doesn't support that; use `legacy-style-world-list' instead."
:type '(repeat (list string string))
:version "23.1")
@ -478,7 +482,10 @@ TIMEZONE should be a string of the form:
See the documentation of the TZ environment variable on your system,
for more details about the format of TIMEZONE.
LABEL is a string to display as the label of that TIMEZONE's time."
LABEL is a string to display as the label of that TIMEZONE's time
This is the only option that has effect on MS-Windows, where you also
cannot specify the [offset][,date[/time],date[/time]] part."
:type '(repeat (list string string))
:version "23.1")

View file

@ -638,8 +638,11 @@ unlock_all_files (void)
}
DEFUN ("lock-file", Flock_file, Slock_file, 1, 1, 0,
doc: /* Lock FILE.
If the option `create-lockfiles' is nil, this does nothing. */)
doc: /* Check whether FILE was modified since it was visited, and lock it.
If user option `create-lockfiles' is nil, this does not create
a lock file for FILE, but it still checks whether FILE was modified
outside of the current Emacs session, and if so, asks the user
whether to modify FILE. */)
(Lisp_Object file)
{
#ifndef MSDOS

View file

@ -20202,7 +20202,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
/* The vscroll should be preserved in this case, since
`pixel-scroll-precision-mode' must continue working normally
when a mini-window is resized. (bug#55312) */
if (!w->preserve_vscroll_p || !window_frozen_p (w))
if (!w->preserve_vscroll_p && !window_frozen_p (w))
w->vscroll = 0;
w->preserve_vscroll_p = false;