aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPo Lu2023-03-28 09:41:22 +0800
committerPo Lu2023-03-28 09:41:22 +0800
commit64206ee3af9b59da9591aae400439bdea2cda09f (patch)
tree88c333f058f0afac551daca0d8cf2f2e9d8012ea
parent05f3f9c1c09c3e7a4d9c1d9ac16a34742a4124c1 (diff)
parent66b4394461589d0db8690b7971000f687bd3ad57 (diff)
downloademacs-64206ee3af9b59da9591aae400439bdea2cda09f.tar.gz
emacs-64206ee3af9b59da9591aae400439bdea2cda09f.zip
Merge remote-tracking branch 'origin/master' into feature/android
-rw-r--r--configure.ac4
-rw-r--r--doc/emacs/trouble.texi652
-rw-r--r--doc/lispref/modes.texi36
-rw-r--r--doc/misc/eglot.texi28
-rw-r--r--doc/misc/tramp.texi30
-rw-r--r--doc/misc/transient.texi14
-rw-r--r--etc/NEWS.298
-rw-r--r--etc/PROBLEMS27
-rw-r--r--etc/refcards/orgcard.tex2
-rw-r--r--lisp/emacs-lisp/comp.el5
-rw-r--r--lisp/emacs-lisp/easy-mmode.el28
-rw-r--r--lisp/emacs-lisp/gv.el2
-rw-r--r--lisp/help-fns.el2
-rw-r--r--lisp/help.el7
-rw-r--r--lisp/net/eww.el20
-rw-r--r--lisp/net/tramp-cmds.el10
-rw-r--r--lisp/net/tramp-crypt.el12
-rw-r--r--lisp/net/tramp-gvfs.el2
-rw-r--r--lisp/net/tramp-sh.el10
-rw-r--r--lisp/net/tramp-smb.el2
-rw-r--r--lisp/net/tramp.el10
-rw-r--r--lisp/org/org-version.el4
-rw-r--r--lisp/org/org.el2
-rw-r--r--lisp/org/ox-texinfo.el11
-rw-r--r--lisp/progmodes/python.el9
-rw-r--r--lisp/progmodes/ruby-ts-mode.el48
-rw-r--r--lisp/savehist.el5
-rw-r--r--lisp/subr.el6
-rw-r--r--lisp/transient.el17
-rw-r--r--lisp/treesit.el16
-rw-r--r--lisp/window.el16
-rw-r--r--src/nsterm.m4
-rw-r--r--src/timefns.c9
-rw-r--r--src/treesit.c10
-rw-r--r--test/Makefile.in9
-rw-r--r--test/infra/Dockerfile.emba8
-rw-r--r--test/infra/gitlab-ci.yml32
-rw-r--r--test/lisp/emacs-lisp/benchmark-tests.el4
-rw-r--r--test/lisp/progmodes/python-tests.el38
-rw-r--r--test/lisp/progmodes/ruby-ts-mode-tests.el25
-rw-r--r--test/src/fns-tests.el2
41 files changed, 719 insertions, 467 deletions
diff --git a/configure.ac b/configure.ac
index 168bebf5bfc..fc846ce840b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2762,8 +2762,8 @@ if test "${with_ns}" != no; then
2762 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}" 2762 GNUSTEP_LOCAL_HEADERS="-I${GNUSTEP_LOCAL_HEADERS}"
2763 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \ 2763 test "x${GNUSTEP_LOCAL_LIBRARIES}" != "x" && \
2764 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}" 2764 GNUSTEP_LOCAL_LIBRARIES="-L${GNUSTEP_LOCAL_LIBRARIES}"
2765 CPPFLAGS="$CPPFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" 2765 CPPFLAGS="$CPPFLAGS -isystem ${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
2766 CFLAGS="$CFLAGS -I${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}" 2766 CFLAGS="$CFLAGS -isystem ${GNUSTEP_SYSTEM_HEADERS} ${GNUSTEP_LOCAL_HEADERS}"
2767 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}" 2767 LDFLAGS="$LDFLAGS -L${GNUSTEP_SYSTEM_LIBRARIES} ${GNUSTEP_LOCAL_LIBRARIES}"
2768 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread" 2768 LIBS_GNUSTEP="-lgnustep-gui -lgnustep-base -lobjc -lpthread"
2769 dnl GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS to 0 or 1. 2769 dnl GNUstep defines BASE_NATIVE_OBJC_EXCEPTIONS to 0 or 1.
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index e168514fcb9..ded9d02cf54 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -496,8 +496,43 @@ Customization}.
496 If you think you have found a bug in Emacs, please report it. We 496 If you think you have found a bug in Emacs, please report it. We
497cannot promise to fix it, or always to agree that it is a bug, but we 497cannot promise to fix it, or always to agree that it is a bug, but we
498certainly want to hear about it. The same applies for new features 498certainly want to hear about it. The same applies for new features
499you would like to see added. The following sections will help you to 499you would like to see added. This section will help you to determine
500construct an effective bug report. 500whether you found a bug, and if so, construct an effective bug report.
501
502The general procedure when you find something that could be a bug is
503as follows:
504
505@itemize @bullet
506@item
507See if what you found is a known problem or a bug that was already
508reported and/or fixed. @xref{Known Problems}, where you will find how
509to look for known problems and bugs.
510
511@item
512If you are unsure whether the behavior you see is a bug, see @ref{Bug
513Criteria}, which tells what we consider as clear bugs in Emacs.
514
515@item
516Once you decide you found a bug, see @ref{Understanding Bug
517Reporting}, which helps you in describing what you see in the most
518efficient manner, making our job of reproducing the issue and
519investigating it easier.
520
521@item
522Next, see @ref{Checklist, Checklist for Bug Reports}, where we
523describe in detail how to submit a bug report and what information to
524include in it. In a nutshell, you submit a bug report via electronic
525mail using the Emacs command @code{report-emacs-bug}, which assists
526you in doing so. Submitting a bug report starts the process of
527investigating and fixing the bug, where you will receive copies of
528email messages discussing the bug, in which we might ask you to
529provide more information, test possible fixes, etc.
530
531@item
532Finally, if you want to propose specific changes to Emacs, whether to
533fix a bug, add a new feature, or improve our documentation, please see
534@ref{Sending Patches}, for details about submitting such changes.
535@end itemize
501 536
502@menu 537@menu
503* Known Problems:: How to read about known problems and bugs. 538* Known Problems:: How to read about known problems and bugs.
@@ -509,9 +544,10 @@ construct an effective bug report.
509 544
510@node Known Problems 545@node Known Problems
511@subsection Reading Existing Bug Reports and Known Problems 546@subsection Reading Existing Bug Reports and Known Problems
547@cindex known bugs and problems
512 548
513 Before reporting a bug, if at all possible please check to see if it 549 Before reporting a bug, if at all possible, please check to see if
514is already known about. Indeed, it may already have been fixed in a 550we already know about it. Indeed, it may already have been fixed in a
515later release of Emacs, or in the development version. Here is a list 551later release of Emacs, or in the development version. Here is a list
516of the main places you can read about known issues: 552of the main places you can read about known issues:
517 553
@@ -519,20 +555,26 @@ of the main places you can read about known issues:
519@item 555@item
520The @file{etc/PROBLEMS} file; type @kbd{C-h C-p} to read it. This 556The @file{etc/PROBLEMS} file; type @kbd{C-h C-p} to read it. This
521file contains a list of particularly well-known issues that have been 557file contains a list of particularly well-known issues that have been
522encountered in compiling, installing and running Emacs. Often, there 558encountered in compiling, installing and running Emacs, with special
523are suggestions for workarounds and solutions. 559emphasis on issues caused by other software that cannot be easily
560solved in Emacs. Often, you will find there suggestions for
561workarounds and solutions.
524 562
525@cindex bug tracker 563@cindex bug tracker
564@cindex issue tracker
565@cindex search known bugs
526@item 566@item
527The GNU Bug Tracker at @url{https://debbugs.gnu.org}. Emacs bugs are 567The GNU Bug Tracker at @url{https://debbugs.gnu.org}. Emacs bugs and
528filed in the tracker under the @samp{emacs} package. The tracker 568issues are filed in the tracker under the @samp{emacs} package. The
529records information about the status of each bug, the initial bug 569tracker records information about the status of each bug, the initial
530report, and the follow-up messages by the bug reporter and Emacs 570bug report, and the follow-up messages by the bug reporter and Emacs
531developers. You can search for bugs by subject, severity, and other 571developers who participate in discussing and fixing the bug. You can
532criteria. 572search for bugs by subject, severity, and other criteria. For more
573complex search criteria, use
574@url{https://debbugs.gnu.org/cgi/search.cgi}.
533 575
534@cindex debbugs package 576@cindex debbugs package
535Instead of browsing the bug tracker as a webpage, you can browse it 577Instead of browsing the bug tracker as a web page, you can browse it
536from Emacs using the @code{debbugs} package, which can be downloaded 578from Emacs using the @code{debbugs} package, which can be downloaded
537via the Package Menu (@pxref{Packages}). This package provides the 579via the Package Menu (@pxref{Packages}). This package provides the
538command @kbd{M-x debbugs-gnu} to list bugs, and @kbd{M-x 580command @kbd{M-x debbugs-gnu} to list bugs, and @kbd{M-x
@@ -558,14 +600,14 @@ used, and is mainly of historical interest. At one time, it was used
558for bug reports in development (i.e., not yet released) versions of 600for bug reports in development (i.e., not yet released) versions of
559Emacs. You can read the archives for 2003 to mid 2007 at 601Emacs. You can read the archives for 2003 to mid 2007 at
560@url{https://lists.gnu.org/r/emacs-pretest-bug/}. Nowadays, 602@url{https://lists.gnu.org/r/emacs-pretest-bug/}. Nowadays,
561it is an alias for @samp{bug-gnu-emacs}. 603email messages sent to this list are redirected to
604@samp{bug-gnu-emacs}.
562 605
563@item 606@item
564The @samp{emacs-devel} mailing list. Sometimes people report bugs to 607The @samp{emacs-devel} mailing list. Sometimes people report bugs to
565this mailing list. This is not the main purpose of the list, however, 608this mailing list. This is not the main purpose of the list, however,
566and it is much better to send bug reports to the bug list. You should 609and it is much better to send bug reports to the bug list. You should
567not feel obliged to read this list before reporting a bug. 610not feel obliged to read this list before reporting a bug.
568
569@end itemize 611@end itemize
570 612
571 613
@@ -628,20 +670,21 @@ to begin by reporting them to the package developers.
628 670
629@node Understanding Bug Reporting 671@node Understanding Bug Reporting
630@subsection Understanding Bug Reporting 672@subsection Understanding Bug Reporting
631@cindex bug reporting 673@cindex bug reporting, principles
632@cindex report an Emacs bug, how to 674@cindex report an Emacs bug, how to
633 675
634 When you decide that there is a bug, it is important to report it 676 When you decide that there is a bug, it is important to report it,
635and to report it in a way which is useful. What is most useful is an 677and to report it in a way which is useful. What is most useful is an
636exact description of what commands you type, starting with the shell 678exact description of what commands you type, starting with the shell
637command to run Emacs, until the problem happens. 679command to run Emacs, until the problem happens, and the effects
680produced by typing those commands.
638 681
639 The most important principle in reporting a bug is to report 682 The most important principle in reporting a bug is to report
640@emph{facts}. Hypotheses and verbal descriptions are no substitute 683@emph{facts}. Hypotheses and verbal descriptions are no substitute
641for the detailed raw data. Reporting the facts is straightforward, 684for the detailed raw data. Reporting the facts is straightforward,
642but many people strain to posit explanations and report them instead 685but many people strain to posit explanations and report them instead
643of the facts. If the explanations are based on guesses about how 686of the facts. If the explanations are based on guesses about how
644Emacs is implemented, they will be useless; meanwhile, lacking the 687Emacs is implemented, they night not be useful; meanwhile, lacking the
645facts, we will have no real information about the bug. If you want to 688facts, we will have no real information about the bug. If you want to
646actually @emph{debug} the problem, and report explanations that are 689actually @emph{debug} the problem, and report explanations that are
647more than guesses, that is useful---but please include the raw facts 690more than guesses, that is useful---but please include the raw facts
@@ -661,19 +704,23 @@ problem. There is no way we could guess that we should try visiting a
661file with a @samp{z} in its name. 704file with a @samp{z} in its name.
662 705
663 You should not even say ``visit a file'' instead of @kbd{C-x C-f}. 706 You should not even say ``visit a file'' instead of @kbd{C-x C-f}.
664Similarly, rather than saying ``if I have three characters on the 707That's because a file can be visited in more than one way, and there's
665line'', say ``after I type @kbd{@key{RET} A B C @key{RET} C-p}'', if 708no certainty that all of them reproduce the problem. Similarly,
666that is the way you entered the text. 709rather than saying ``if I have three characters on the line'', say
710``after I type @kbd{@key{RET} A B C @key{RET} C-p}'', if that is the
711way you entered the text---that is, tell us about the text which in
712your case produced the problem.
667 713
668 If possible, try quickly to reproduce the bug by invoking Emacs with 714 If possible, try quickly to reproduce the bug by invoking Emacs with
669@command{emacs -Q} (so that Emacs starts with no initial 715@command{emacs -Q} (so that Emacs starts with no initial
670customizations; @pxref{Initial Options}), and repeating the steps that 716customizations; @pxref{Initial Options}), and repeating the steps that
671you took to trigger the bug. If you can reproduce the bug this way, 717you took to trigger the bug. If you can reproduce the bug this way,
672that rules out bugs in your personal customizations. Then your bug 718that rules out bugs in your personal customizations and makes the bug
673report should begin by stating that you started Emacs with 719much easier to reproduce. Then your bug report should begin by
674@command{emacs -Q}, followed by the exact sequence of steps for 720stating that you started Emacs with @command{emacs -Q}, followed by
675reproducing the bug. If possible, inform us of the exact contents of 721the exact sequence of steps for reproducing the bug. If possible,
676any file that is needed to reproduce the bug. 722inform us of the exact contents of any file that is needed to
723reproduce the bug.
677 724
678 Some bugs are not reproducible from @command{emacs -Q}; some are not 725 Some bugs are not reproducible from @command{emacs -Q}; some are not
679easily reproducible at all. In that case, you should report what you 726easily reproducible at all. In that case, you should report what you
@@ -687,6 +734,7 @@ separate bug report for each.
687@subsection Checklist for Bug Reports 734@subsection Checklist for Bug Reports
688@cindex checklist before reporting a bug 735@cindex checklist before reporting a bug
689@cindex bug reporting, checklist 736@cindex bug reporting, checklist
737@cindex report bugs in Emacs
690 738
691 Before reporting a bug, first try to see if the problem has already 739 Before reporting a bug, first try to see if the problem has already
692been reported (@pxref{Known Problems}). 740been reported (@pxref{Known Problems}).
@@ -706,7 +754,7 @@ information; you should still read and follow the guidelines below, so
706you can enter the other crucial information by hand before you send 754you can enter the other crucial information by hand before you send
707the message. You may feel that some of the information inserted by 755the message. You may feel that some of the information inserted by
708@kbd{M-x report-emacs-bug} is not relevant, but unless you are 756@kbd{M-x report-emacs-bug} is not relevant, but unless you are
709absolutely sure it is best to leave it, so that the developers can 757absolutely sure, it is best to leave it, so that the developers can
710decide for themselves. 758decide for themselves.
711 759
712When you have finished writing your report, type @kbd{C-c C-c} and it 760When you have finished writing your report, type @kbd{C-c C-c} and it
@@ -721,24 +769,26 @@ If you cannot send mail from inside Emacs, you can copy the
721text of your report to your normal mail client (if your system 769text of your report to your normal mail client (if your system
722supports it, you can type @kbd{C-c M-i} to have Emacs do this for you) 770supports it, you can type @kbd{C-c M-i} to have Emacs do this for you)
723and send it to that address. Or you can simply send an email to that 771and send it to that address. Or you can simply send an email to that
724address describing the problem. 772address describing the problem, including the necessary information
773mentioned below.
725 774
726If you want to submit code to Emacs (to fix a problem or implement a 775If you want to submit code to Emacs (to fix a problem or implement a
727new feature), the easiest way to do this is to send a patch to the 776new feature), the easiest way to do this is to send a patch to the
728Emacs issue tracker. This is done with the @kbd{M-x 777Emacs issue tracker. Use the @kbd{M-x submit-emacs-patch} command for
729submit-emacs-patch} command, and works much the same as when reporting 778that, which works much the same as when reporting bugs; @pxref{Sending
730bugs. 779Patches}.
731 780
732In any case, your report will be sent to the @samp{bug-gnu-emacs} 781In any case, your report will be sent to the @samp{bug-gnu-emacs}
733mailing list, and stored in the GNU Bug Tracker at 782mailing list, and stored in the GNU Bug Tracker at
734@url{https://debbugs.gnu.org}. Please include a valid reply email 783@url{https://debbugs.gnu.org}. Please include a valid reply email
735address, in case we need to ask you for more information about your 784address, in case we need to ask you for more information about your
736report. Submissions are moderated, so there may be a delay before 785report. Submissions are moderated, so there may be a delay before
737your report appears. 786your report actually appears on the tracker.
738 787
739You do not need to know how the GNU Bug Tracker works in order to 788You do not need to know how the GNU Bug Tracker works in order to
740report a bug, but if you want to, you can read the tracker's online 789report a bug, but if you want to, you can read the tracker's
741documentation to see the various features you can use. 790@uref{https://debbugs.gnu.org/Advanced.html, online documentation} to
791see the various features you can use.
742 792
743All mail sent to the @samp{bug-gnu-emacs} mailing list is also 793All mail sent to the @samp{bug-gnu-emacs} mailing list is also
744gatewayed to the @samp{gnu.emacs.bug} newsgroup. The reverse is also 794gatewayed to the @samp{gnu.emacs.bug} newsgroup. The reverse is also
@@ -749,55 +799,43 @@ tracker.
749 799
750If your data is more than 500,000 bytes, please don't include it 800If your data is more than 500,000 bytes, please don't include it
751directly in the bug report; instead, offer to send it on request, or 801directly in the bug report; instead, offer to send it on request, or
752make it available online and say where. 802make it available online and say where. Large attachments are best
803sent compressed.
753 804
754The GNU Bug Tracker will assign a bug number to your report; please 805The GNU Bug Tracker will assign a bug number to your report; please
755use it in the following discussions. 806use it in the following discussions, keeping the bug address in the
807list of recipients, so that the bug discussion is recorded by the
808tracker. The bug address will look like
809@samp{@var{nnnnn}@@debbugs.gnu.org}, where @var{nnnnn} is the bug
810number.
756 811
757 To enable maintainers to investigate a bug, your report 812 To enable maintainers to investigate a bug, your report
758should include all these things: 813should include all these things:
759 814
760@itemize @bullet 815@itemize @bullet
761@item 816@item
762The version number of Emacs. Without this, we won't know whether there is any 817A description of what behavior you observe that you believe is
763point in looking for the bug in the current version of GNU Emacs. 818incorrect. For example, ``The Emacs process gets a fatal signal'', or,
764 819``The resulting text is as follows, which I think is wrong.''
765@findex emacs-version
766@kbd{M-x report-emacs-bug} includes this information automatically,
767but if you are not using that command for your report you can get the
768version number by typing @kbd{M-x emacs-version @key{RET}}. If that
769command does not work, you probably have something other than GNU
770Emacs, so you will have to report the bug somewhere else.
771
772@item
773The type of machine you are using, and the operating system name and
774version number (again, automatically included by @w{@kbd{M-x
775report-emacs-bug}}). @w{@kbd{M-x emacs-version @key{RET}}} provides
776this information too. Copy its output from the @file{*Messages*}
777buffer, so that you get it all and get it accurately, or use
778@w{@kbd{C-u M-x emacs-version @key{RET}}} to insert the version
779information into the current buffer.
780
781@item
782The operands given to the @code{configure} command when Emacs was
783installed (automatically included by @kbd{M-x report-emacs-bug}).
784
785@item
786A complete list of any modifications you have made to the Emacs source.
787(We may not have time to investigate the bug unless it happens in an
788unmodified Emacs. But if you've made modifications and you don't tell
789us, you are sending us on a wild goose chase.)
790 820
791Be precise about these changes. A description in English is not 821Of course, if the bug is that Emacs gets a fatal signal, then one can't
792enough---send a unified context diff for them. 822miss it. But if the bug is incorrect text, the maintainer might fail to
823notice what is wrong. Why leave it to chance?
793 824
794Adding files of your own, or porting to another machine, is a 825Even if the problem you experience is a fatal signal, you should still
795modification of the source. 826say so explicitly. Suppose something strange is going on, such as, your
827copy of the source is out of sync, or you have encountered a bug in the
828C library on your system. (This has happened!) Your copy might crash
829and the copy here might not. If you @emph{said} to expect a crash, then
830when Emacs here fails to crash, we would know that the bug was not
831happening. If you don't say to expect a crash, then we would not know
832whether the bug was happening---we would not be able to draw any
833conclusion from our observations.
796 834
797@item 835Usually, description of the behavior and of the way to reproduce the
798Details of any other deviations from the standard procedure for installing 836problem needs to specify one or more of the following aspects:
799GNU Emacs.
800 837
838@itemize @minus
801@item 839@item
802The complete text of any files needed to reproduce the bug. 840The complete text of any files needed to reproduce the bug.
803 841
@@ -825,6 +863,47 @@ information (such as passwords) may end up recorded in the dribble
825file. 863file.
826 864
827@item 865@item
866If the bug is that the Emacs Manual or the Emacs Lisp Reference Manual
867fails to describe the actual behavior of Emacs, or that the text is
868confusing, copy in the text from the manual which you think is
869at fault. If the section is small, just the section name is enough.
870
871@item
872If the manifestation of the bug is an Emacs error message, it is
873important to report the precise text of the error message, and a
874backtrace showing how the Lisp program in Emacs arrived at the error.
875
876To get the error message text accurately, copy it from the
877@file{*Messages*} buffer into the bug report. Copy all of it, not just
878part.
879
880@item
881Check whether any programs you have loaded into the Lisp world,
882including your initialization file, set any variables that may affect
883the functioning of Emacs. Also, see whether the problem happens in a
884freshly started Emacs without loading your initialization file (start
885Emacs with the @code{-Q} switch to prevent loading the init files).
886If the problem does @emph{not} occur then, you must report the precise
887contents of any programs that you must load into the Lisp world in
888order to cause the problem to occur.
889
890@item
891If the problem does depend on an init file or other Lisp programs that
892are not part of the standard Emacs system, then you should make sure it
893is not a bug in those programs by complaining to their maintainers
894first. After they verify that they are using Emacs in a way that is
895supposed to work, they should report the bug.
896
897@item
898If you wish to mention something in the GNU Emacs source, show the line
899of code with a few lines of context. Don't just give a line number.
900
901The line numbers in the development sources don't match those in your
902sources. It would take extra work for the maintainers to determine what
903code is in your version at a given line number, and we could not be
904certain.
905
906@item
828@findex open-termscript 907@findex open-termscript
829@cindex termscript file 908@cindex termscript file
830@vindex TERM@r{, environment variable, and display bugs} 909@vindex TERM@r{, environment variable, and display bugs}
@@ -834,27 +913,70 @@ entry for the terminal from @file{/etc/termcap} (since that file is
834not identical on all machines), and the output that Emacs actually 913not identical on all machines), and the output that Emacs actually
835sent to the terminal. 914sent to the terminal.
836 915
837The way to collect the terminal output is to execute the Lisp expression 916The way to collect the terminal output is to invoke the command
917@kbd{M-x open-termscript} just after starting Emacs; it will prompt
918you for the name of the file where to record all terminal output until
919the Emacs process is killed. If the problem happens when Emacs starts
920up, put the Lisp expression
838 921
839@example 922@example
840(open-termscript "~/termscript") 923(open-termscript "~/termscript")
841@end example 924@end example
842 925
843@noindent 926@noindent
844using @kbd{M-:} or from the @file{*scratch*} buffer just after 927into your Emacs initialization file so that the termscript file will
845starting Emacs. From then on, Emacs copies all terminal output to the 928be open when Emacs displays the screen for the first time.
846specified termscript file as well, until the Emacs process is killed.
847If the problem happens when Emacs starts up, put this expression into
848your Emacs initialization file so that the termscript file will be
849open when Emacs displays the screen for the first time.
850 929
851Be warned: it is often difficult, and sometimes impossible, to fix a 930Be warned: it is often difficult, and sometimes impossible, to fix a
852terminal-dependent bug without access to a terminal of the type that 931terminal-dependent bug without access to a terminal of the type that
853stimulates the bug. 932stimulates the bug.
933@end itemize
934
935@item
936The version number of Emacs. Without this, we won't know whether there is any
937point in looking for the bug in the current version of GNU Emacs.
938
939@findex emacs-version
940@kbd{M-x report-emacs-bug} includes this information automatically,
941but if you are not using that command for your report you can get the
942version number by typing @kbd{M-x emacs-version @key{RET}}. If that
943command does not work, you probably have something other than GNU
944Emacs, so you will have to report the bug somewhere else.
945
946@item
947The type of machine you are using, and the operating system name and
948version number (again, automatically included by @w{@kbd{M-x
949report-emacs-bug}}). @w{@kbd{M-x emacs-version @key{RET}}} provides
950this information too. Copy its output from the @file{*Messages*}
951buffer, so that you get it all and get it accurately, or use
952@w{@kbd{C-u M-x emacs-version @key{RET}}} to insert the version
953information into the current buffer.
954
955@item
956The command-line arguments given to the @code{configure} command when
957Emacs was built (automatically included by @kbd{M-x
958report-emacs-bug}).
959
960@item
961A complete list of any modifications you have made to the Emacs source.
962(We may not have time to investigate the bug unless it happens in an
963unmodified Emacs. But if you've made modifications and you don't tell
964us, you are sending us on a wild goose chase.)
965
966Be precise about these changes. A description in English is not
967enough---send a unified context diff for them.
968
969Adding files of your own, or porting to another machine, is a
970modification of the source.
971
972@item
973Details of any other deviations from the standard procedure for installing
974GNU Emacs.
854 975
855@item 976@item
856If non-@acronym{ASCII} text or internationalization is relevant, the locale that 977If non-@acronym{ASCII} text or internationalization is relevant, the locale that
857was current when you started Emacs. On GNU/Linux and Unix systems, or 978was current when you started Emacs. This is automatically included by @kbd{M-x
979report-emacs-bug}; alternatively, on GNU/Linux and Unix systems, or
858if you use a POSIX-style shell such as Bash, you can use this shell 980if you use a POSIX-style shell such as Bash, you can use this shell
859command to view the relevant values: 981command to view the relevant values:
860 982
@@ -863,64 +985,102 @@ echo LC_ALL=$LC_ALL LC_COLLATE=$LC_COLLATE LC_CTYPE=$LC_CTYPE \
863 LC_MESSAGES=$LC_MESSAGES LC_TIME=$LC_TIME LANG=$LANG 985 LC_MESSAGES=$LC_MESSAGES LC_TIME=$LC_TIME LANG=$LANG
864@end smallexample 986@end smallexample
865 987
866Alternatively, use the @command{locale} command, if your system has it, 988You can also use the @command{locale} command, if your system has it,
867to display your locale settings. 989to display your locale settings.
990@end itemize
868 991
869You can use the @kbd{M-!} command to execute these commands from 992Here are some things that are not necessary in a bug report:
870Emacs, and then copy the output from the @file{*Messages*} buffer into
871the bug report. Alternatively, @kbd{M-x getenv @key{RET} LC_ALL
872@key{RET}} will display the value of @code{LC_ALL} in the echo area, and
873you can copy its output from the @file{*Messages*} buffer.
874 993
994@itemize @bullet
875@item 995@item
876A description of what behavior you observe that you believe is 996A description of the envelope of the bug---this is not necessary for a
877incorrect. For example, ``The Emacs process gets a fatal signal'', or, 997reproducible bug.
878``The resulting text is as follows, which I think is wrong.''
879 998
880Of course, if the bug is that Emacs gets a fatal signal, then one can't 999Often people who encounter a bug spend a lot of time investigating
881miss it. But if the bug is incorrect text, the maintainer might fail to 1000which changes to the input file will make the bug go away and which
882notice what is wrong. Why leave it to chance? 1001changes will not affect it.
883 1002
884Even if the problem you experience is a fatal signal, you should still 1003This is often time-consuming and not very useful, because the way we
885say so explicitly. Suppose something strange is going on, such as, your 1004will find the bug is by running a single example under the debugger
886copy of the source is out of sync, or you have encountered a bug in the 1005with breakpoints, not by pure deduction from a series of examples.
887C library on your system. (This has happened!) Your copy might crash 1006You might as well save time by not searching for additional examples.
888and the copy here might not. If you @emph{said} to expect a crash, then 1007It is better to send the bug report right away, go back to editing,
889when Emacs here fails to crash, we would know that the bug was not 1008and find another bug to report.
890happening. If you don't say to expect a crash, then we would not know 1009
891whether the bug was happening---we would not be able to draw any 1010Of course, if you can find a simpler example to report @emph{instead} of
892conclusion from our observations. 1011the original one, that is a convenience. Errors in the output will be
1012easier to spot, running under the debugger will take less time, etc.
1013
1014However, simplification is not vital; if you can't do this or don't have
1015time to try, please report the bug with your original test case.
893 1016
894@item 1017@item
895If the bug is that the Emacs Manual or the Emacs Lisp Reference Manual 1018A core dump file.
896fails to describe the actual behavior of Emacs, or that the text is 1019
897confusing, copy in the text from the manual which you think is 1020Debugging the core dump might be useful, but it can only be done on
898at fault. If the section is small, just the section name is enough. 1021your machine, with your Emacs executable. Therefore, sending the core
1022dump file to the Emacs maintainers won't be useful. Above all, don't
1023include the core file in an email bug report! Such a large message
1024can be extremely inconvenient.
899 1025
900@item 1026@item
901If the manifestation of the bug is an Emacs error message, it is 1027A system-call trace of Emacs execution.
902important to report the precise text of the error message, and a
903backtrace showing how the Lisp program in Emacs arrived at the error.
904 1028
905To get the error message text accurately, copy it from the 1029System-call traces are very useful for certain special kinds of
906@file{*Messages*} buffer into the bug report. Copy all of it, not just 1030debugging, but in most cases they give little useful information. It is
907part. 1031therefore strange that many people seem to think that @emph{the} way to
1032report information about a crash is to send a system-call trace. Perhaps
1033this is a habit formed from experience debugging programs that don't
1034have source code or debugging symbols.
1035
1036In most programs, a backtrace is normally far, far more informative than
1037a system-call trace. Even in Emacs, a simple backtrace is generally
1038more informative, though to give full information you should supplement
1039the backtrace by displaying variable values and printing them as Lisp
1040objects with @code{pr} (see above).
1041
1042@item
1043A patch for the bug.
1044
1045A patch for the bug is useful if it is a good one. But don't omit the
1046other information that a bug report needs, such as the test case, on
1047the assumption that a patch is sufficient. We might see problems with
1048your patch and decide to fix the problem another way, or we might not
1049understand it at all. And if we can't understand what bug you are
1050trying to fix, or why your patch should be an improvement, we mustn't
1051install it. @xref{Sending Patches}, for guidelines on how to make it
1052easy for us to understand and install your patches.
1053
1054@item
1055A guess about what the bug is or what it depends on.
1056
1057Such guesses are usually wrong. Even experts can't guess right about
1058such things without first using the debugger to find the facts.
1059@end itemize
1060
1061If you are willing to debug Emacs and provide additional information
1062about the bug, here is some useful advice:
908 1063
909@findex toggle-debug-on-error 1064@findex toggle-debug-on-error
910@pindex Edebug 1065@pindex Edebug
911To make a backtrace for the error, use @kbd{M-x toggle-debug-on-error} 1066@itemize
912before the error happens (that is to say, you must give that command 1067@item
913and then make the bug happen). This causes the error to start the Lisp 1068If the bug manifests itself as an error message, try providing a Lisp
914debugger, which shows you a backtrace. Copy the text of the 1069backtrace for the error. To make a backtrace for the error, use
915debugger's backtrace into the bug report. @xref{Edebug,, Edebug, 1070@kbd{M-x toggle-debug-on-error} before the error happens (that is to
916elisp, the Emacs Lisp Reference Manual}, for information on debugging 1071say, you must give that command and then make the bug happen). This
917Emacs Lisp programs with the Edebug package. 1072causes the error to start the Lisp debugger, which shows you a
1073backtrace. Copy the text of the debugger's backtrace into the bug
1074report. @xref{Edebug,, Edebug, elisp, the Emacs Lisp Reference
1075Manual}, for information on debugging Emacs Lisp programs with the
1076Edebug package.
918 1077
919This use of the debugger is possible only if you know how to make the 1078This use of the debugger is possible only if you know how to make the
920bug happen again. If you can't make it happen again, at least copy 1079bug happen again. If you can't make it happen again, at least copy
921the whole error message. 1080the whole error message.
922 1081
923@vindex debug-on-quit 1082@vindex debug-on-quit
1083@item
924If Emacs appears to be stuck in an infinite loop or in a very long 1084If Emacs appears to be stuck in an infinite loop or in a very long
925operation, typing @kbd{C-g} with the variable @code{debug-on-quit} 1085operation, typing @kbd{C-g} with the variable @code{debug-on-quit}
926non-@code{nil} will start the Lisp debugger and show a backtrace. 1086non-@code{nil} will start the Lisp debugger and show a backtrace.
@@ -934,32 +1094,6 @@ specified by @code{debug-on-event} (default SIGUSR2) from outside
934Emacs to cause it to enter the debugger. 1094Emacs to cause it to enter the debugger.
935 1095
936@item 1096@item
937Check whether any programs you have loaded into the Lisp world,
938including your initialization file, set any variables that may affect
939the functioning of Emacs. Also, see whether the problem happens in a
940freshly started Emacs without loading your initialization file (start
941Emacs with the @code{-Q} switch to prevent loading the init files).
942If the problem does @emph{not} occur then, you must report the precise
943contents of any programs that you must load into the Lisp world in
944order to cause the problem to occur.
945
946@item
947If the problem does depend on an init file or other Lisp programs that
948are not part of the standard Emacs system, then you should make sure it
949is not a bug in those programs by complaining to their maintainers
950first. After they verify that they are using Emacs in a way that is
951supposed to work, they should report the bug.
952
953@item
954If you wish to mention something in the GNU Emacs source, show the line
955of code with a few lines of context. Don't just give a line number.
956
957The line numbers in the development sources don't match those in your
958sources. It would take extra work for the maintainers to determine what
959code is in your version at a given line number, and we could not be
960certain.
961
962@item
963Additional information from a C debugger such as GDB might enable 1097Additional information from a C debugger such as GDB might enable
964someone to find a problem on a machine which he does not have available. 1098someone to find a problem on a machine which he does not have available.
965If you don't know how to use GDB, please read the GDB manual---it is not 1099If you don't know how to use GDB, please read the GDB manual---it is not
@@ -967,9 +1101,10 @@ very long, and using GDB is easy. You can find the GDB distribution,
967including the GDB manual in online form, in most of the same places you 1101including the GDB manual in online form, in most of the same places you
968can find the Emacs distribution. To run Emacs under GDB, you should 1102can find the Emacs distribution. To run Emacs under GDB, you should
969switch to the @file{src} subdirectory in which Emacs was compiled, then 1103switch to the @file{src} subdirectory in which Emacs was compiled, then
970do @samp{gdb emacs}. It is important for the directory @file{src} to be 1104type @kbd{gdb ./emacs}. It is important for the directory @file{src} to be
971current so that GDB will read the @file{.gdbinit} file in this 1105current so that GDB will read the @file{.gdbinit} file in this
972directory. 1106directory. (You can also tell GDB to read that file from inside GDB,
1107by typing @kbd{source ./.gdbinit}.)
973 1108
974However, you need to think when you collect the additional information 1109However, you need to think when you collect the additional information
975if you want it to show what causes the bug. 1110if you want it to show what causes the bug.
@@ -1000,8 +1135,8 @@ are debugging a running process (not with a core dump).
1000To make Lisp errors stop Emacs and return to GDB, put a breakpoint at 1135To make Lisp errors stop Emacs and return to GDB, put a breakpoint at
1001@code{Fsignal}. 1136@code{Fsignal}.
1002 1137
1003For a short listing of Lisp functions running, type the GDB 1138For a backtrace of Lisp functions running, type the GDB command
1004command @code{xbacktrace}. 1139@code{xbacktrace}.
1005 1140
1006The file @file{.gdbinit} defines several other commands that are useful 1141The file @file{.gdbinit} defines several other commands that are useful
1007for examining the data types and contents of Lisp objects. Their names 1142for examining the data types and contents of Lisp objects. Their names
@@ -1021,79 +1156,6 @@ To find the file @file{etc/DEBUG} in your Emacs installation, use the
1021directory name stored in the variable @code{data-directory}. 1156directory name stored in the variable @code{data-directory}.
1022@end itemize 1157@end itemize
1023 1158
1024Here are some things that are not necessary in a bug report:
1025
1026@itemize @bullet
1027@item
1028A description of the envelope of the bug---this is not necessary for a
1029reproducible bug.
1030
1031Often people who encounter a bug spend a lot of time investigating
1032which changes to the input file will make the bug go away and which
1033changes will not affect it.
1034
1035This is often time-consuming and not very useful, because the way we
1036will find the bug is by running a single example under the debugger
1037with breakpoints, not by pure deduction from a series of examples.
1038You might as well save time by not searching for additional examples.
1039It is better to send the bug report right away, go back to editing,
1040and find another bug to report.
1041
1042Of course, if you can find a simpler example to report @emph{instead} of
1043the original one, that is a convenience. Errors in the output will be
1044easier to spot, running under the debugger will take less time, etc.
1045
1046However, simplification is not vital; if you can't do this or don't have
1047time to try, please report the bug with your original test case.
1048
1049@item
1050A core dump file.
1051
1052Debugging the core dump might be useful, but it can only be done on
1053your machine, with your Emacs executable. Therefore, sending the core
1054dump file to the Emacs maintainers won't be useful. Above all, don't
1055include the core file in an email bug report! Such a large message
1056can be extremely inconvenient.
1057
1058@item
1059A system-call trace of Emacs execution.
1060
1061System-call traces are very useful for certain special kinds of
1062debugging, but in most cases they give little useful information. It is
1063therefore strange that many people seem to think that @emph{the} way to
1064report information about a crash is to send a system-call trace. Perhaps
1065this is a habit formed from experience debugging programs that don't
1066have source code or debugging symbols.
1067
1068In most programs, a backtrace is normally far, far more informative than
1069a system-call trace. Even in Emacs, a simple backtrace is generally
1070more informative, though to give full information you should supplement
1071the backtrace by displaying variable values and printing them as Lisp
1072objects with @code{pr} (see above).
1073
1074@item
1075A patch for the bug.
1076
1077A patch for the bug is useful if it is a good one. But don't omit the
1078other information that a bug report needs, such as the test case, on the
1079assumption that a patch is sufficient. We might see problems with your
1080patch and decide to fix the problem another way, or we might not
1081understand it at all. And if we can't understand what bug you are
1082trying to fix, or why your patch should be an improvement, we mustn't
1083install it.
1084
1085@ifnottex
1086@xref{Sending Patches}, for guidelines on how to make it easy for us to
1087understand and install your patches.
1088@end ifnottex
1089
1090@item
1091A guess about what the bug is or what it depends on.
1092
1093Such guesses are usually wrong. Even experts can't guess right about
1094such things without first using the debugger to find the facts.
1095@end itemize
1096
1097@node Sending Patches 1159@node Sending Patches
1098@subsection Sending Patches for GNU Emacs 1160@subsection Sending Patches for GNU Emacs
1099 1161
@@ -1108,26 +1170,29 @@ work in the best of circumstances, and we can't keep up unless you do
1108your best to help. 1170your best to help.
1109 1171
1110Every patch must have several pieces of information before we 1172Every patch must have several pieces of information before we
1111can properly evaluate it. 1173can properly evaluate it. They are described below.
1112 1174
1113When you have all these pieces, bundle them up in a mail message and 1175When you have all these pieces, use the @kbd{M-x submit-emacs-patch}
1114send it to the developers. Sending it to 1176command to send the patch. The command will prompt you for the
1115@email{bug-gnu-emacs@@gnu.org} (which is the bug/feature list) is 1177Subject of the patch and a patch file. It will then create and
1116recommended, because that list is coupled to a tracking system that 1178display a Message mode buffer with the patch file as an attachment,
1117makes it easier to locate patches. If your patch is not complete and 1179display the buffer, and let you explain more about the patch and add
1118you think it needs more discussion, you might want to send it to 1180any other information as requested below. When you are done, type
1119@email{emacs-devel@@gnu.org} instead. If you revise your patch, 1181@kbd{C-c C-c} to send the patch via email to the developers. It will
1120send it as a followup to the initial topic. 1182be sent to the GNU Bug Tracker at @url{https://debbugs.gnu.org}. The
1121 1183tracker will assign a number to your submission, just like it does
1122We prefer to get the patches as plain text, either inline (be careful 1184with bug reports. The developers will usually respond, perhaps asking
1123your mail client does not change line breaks) or as MIME attachments. 1185you for more details or any additional information, so be sure to
1186include a valid reply email address.
1187
1188Here's what we ask you to provide as part of your patch submissions:
1124 1189
1125@itemize @bullet 1190@itemize @bullet
1126@item 1191@item
1127Include an explanation with your changes of what problem they fix or what 1192An explanation of what problem you are fixing or what improvement will
1128improvement they bring about. 1193the patches bring about:
1129 1194
1130@itemize 1195@itemize @minus
1131@item 1196@item
1132For a fix for an existing bug, it is 1197For a fix for an existing bug, it is
1133best to reply to the relevant discussion on the @samp{bug-gnu-emacs} 1198best to reply to the relevant discussion on the @samp{bug-gnu-emacs}
@@ -1140,26 +1205,28 @@ implementation.
1140 1205
1141@item 1206@item
1142For a new bug, include a proper bug report for the problem you think 1207For a new bug, include a proper bug report for the problem you think
1143you have fixed. We need to convince ourselves that the change is 1208you have fixed; @pxref{Checklist, Checklist for Bug Reports}. We need
1144right before installing it. Even if it is correct, we might have 1209to convince ourselves that the change is right before installing it.
1145trouble understanding it if we don't have a way to reproduce the 1210Even if it is correct, we might have trouble understanding it if we
1146problem. 1211don't have a way to reproduce the problem it tries to fix.
1147@end itemize 1212@end itemize
1148 1213
1149@item 1214@item
1150Include all the comments that are appropriate to help people reading the 1215Include in your code changes all the comments that are appropriate to
1151source in the future understand why this change was needed. 1216help people reading the source in the future understand why this
1217change was needed.
1152 1218
1153@item 1219@item
1154Don't mix together changes made for different reasons. 1220Don't mix together changes made for different reasons.
1155Send them @emph{individually}. 1221Send them @emph{individually}.
1156 1222
1157If you make two changes for separate reasons, then we might not want to 1223If you make two changes for separate reasons, then we might not want
1158install them both. We might want to install just one. If you send them 1224to install them both. We might want to install just one, or install
1159all jumbled together in a single set of diffs, we have to do extra work 1225each one in a different versions of Emacs. If you send them all
1160to disentangle them---to figure out which parts of the change serve 1226jumbled together in a single set of diffs, we have to do extra work to
1161which purpose. If we don't have time for this, we might have to ignore 1227disentangle them---to figure out which parts of the change serve which
1162your changes entirely. 1228purpose. If we don't have time for this, we might have to postpone
1229inclusion of your patches for a long time.
1163 1230
1164If you send each change as soon as you have written it, with its own 1231If you send each change as soon as you have written it, with its own
1165explanation, then two changes never get tangled up, and we can consider 1232explanation, then two changes never get tangled up, and we can consider
@@ -1176,52 +1243,46 @@ right away. That gives us the option of installing it immediately if it
1176is important. 1243is important.
1177 1244
1178@item 1245@item
1179The patch itself. 1246The patch itself. This can be produced in one of the following ways:
1180
1181Use @samp{diff -u} to make your diffs. Diffs without context are hard
1182to install reliably. More than that, they are hard to study; we must
1183always study a patch to decide whether we want to install it. Context
1184format is better than contextless diffs, but we prefer the unified
1185format.
1186
1187If you have GNU diff, use @samp{diff -u -F'^[_a-zA-Z0-9$]\+ *('} when
1188making diffs of C code. This shows the name of the function that each
1189change occurs in.
1190 1247
1248@itemize @minus
1249@item
1191If you are using the Emacs repository, make sure your copy is 1250If you are using the Emacs repository, make sure your copy is
1192up-to-date (e.g., with @code{git pull}). You can commit your changes 1251up-to-date (e.g., with @code{git pull}). You can commit your changes
1193to a private branch and generate a patch from the master version by 1252to a private branch and generate a patch from the master version by
1194using @code{git format-patch master}. Or you can leave your changes 1253using @code{git format-patch master}. (This is the preferred method,
1195uncommitted and use @code{git diff}. 1254as it makes our job of applying the patch easier.) Or you can leave
1255your changes uncommitted and use @code{git diff}, as described below.
1196 1256
1197@item 1257@item
1198Avoid any ambiguity as to which is the old version and which is the new. 1258Use @kbd{diff -u} to make your diffs. If you have GNU diff, use
1199Please make the old version the first argument to diff, and the new 1259@w{@kbd{diff -u -F'^[_a-zA-Z0-9$]\+ *('}} when making diffs of C code.
1200version the second argument. And please give one version or the other a 1260This shows the name of the function that each change occurs in.
1201name that indicates whether it is the old version or your new changed 1261
1202one. 1262When producing the diffs, avoid any ambiguity as to which is the old
1263version and which is the new. Please make the old version the first
1264argument to diff, and the new version the second argument. And please
1265give one version or the other a name that indicates whether it is the
1266old version or your new changed one.
1267@end itemize
1203 1268
1204@item 1269@item
1205Write the commit log entries for your changes. This is both to save us 1270Write the commit log entries for your changes. This is both to save us
1206the extra work of writing them, and to help explain your changes so we 1271the extra work of writing them, and to help explain your changes so we
1207can understand them. 1272can understand them.
1208 1273
1209The purpose of the commit log is to show people where to find what was 1274The purpose of the commit log is to explain the rationale of the
1210changed. So you need to be specific about what functions you changed; 1275changes, the way the modified code solves whatever problems your patch
1211in large functions, it's often helpful to indicate where within the 1276is trying to fix, and also show people where to find what was changed.
1212function the change was. 1277So you need to be specific about what functions you changed and why.
1213 1278For the details about our style and requirements for good commit log
1214On the other hand, once you have shown people where to find the change, 1279messages, please see the ``Commit messages'' section of the file
1215you need not explain its purpose in the change log. Thus, if you add a 1280@file{CONTRIBUTE} in the Emacs source tree.
1216new function, all you need to say about it is that it is new. If you 1281
1217feel that the purpose needs explaining, it probably does---but put the 1282Please also look at the commit log entries of recent commits to see
1218explanation in comments in the code. It will be more useful there. 1283what sorts of information to put in, and to learn the style that we
1219 1284use. Note that, unlike some other projects, we do require commit logs
1220Please look at the commit log entries of recent commits to see what 1285for documentation, i.e., Texinfo files. @xref{Change Log},
1221sorts of information to put in, and to learn the style that we use.
1222Note that, unlike some other projects, we do require commit logs for
1223documentation, i.e., Texinfo files.
1224@xref{Change Log},
1225@ifset WWW_GNU_ORG 1286@ifset WWW_GNU_ORG
1226see 1287see
1227@url{https://www.gnu.org/prep/standards/html_node/Change-Log-Concepts.html}, 1288@url{https://www.gnu.org/prep/standards/html_node/Change-Log-Concepts.html},
@@ -1232,7 +1293,7 @@ Change Log Concepts, standards, GNU Coding Standards}.
1232@item 1293@item
1233When you write the fix, keep in mind that we can't install a change that 1294When you write the fix, keep in mind that we can't install a change that
1234would break other systems. Please think about what effect your change 1295would break other systems. Please think about what effect your change
1235will have if compiled on another type of system. 1296will have if compiled and/or used on another type of system.
1236 1297
1237Sometimes people send fixes that @emph{might} be an improvement in 1298Sometimes people send fixes that @emph{might} be an improvement in
1238general---but it is hard to be sure of this. It's hard to install 1299general---but it is hard to be sure of this. It's hard to install
@@ -1240,9 +1301,10 @@ such changes because we have to study them very carefully. Of course,
1240a good explanation of the reasoning by which you concluded the change 1301a good explanation of the reasoning by which you concluded the change
1241was correct can help convince us. 1302was correct can help convince us.
1242 1303
1243The safest changes are changes to the configuration files for a 1304The safest changes are changes to the files or portions of files that
1244particular machine. These are safe because they can't create new bugs 1305are only used for a particular machine or a particular system. These
1245on other machines. 1306are safe because they can't create new bugs on other machines or
1307systems.
1246 1308
1247Please help us keep up with the workload by designing the patch in a 1309Please help us keep up with the workload by designing the patch in a
1248form that is clearly safe to install. 1310form that is clearly safe to install.
@@ -1259,7 +1321,7 @@ There are many ways to contribute to Emacs:
1259 1321
1260@itemize 1322@itemize
1261@item 1323@item
1262find and report bugs; @xref{Bugs}. 1324find and report bugs; @pxref{Bugs}.
1263 1325
1264@item 1326@item
1265answer questions on the Emacs user mailing list 1327answer questions on the Emacs user mailing list
@@ -1326,15 +1388,15 @@ before you start; it might be possible to suggest ways to make your
1326extension fit in better with the rest of Emacs. 1388extension fit in better with the rest of Emacs.
1327 1389
1328When implementing a feature, please follow the Emacs coding standards; 1390When implementing a feature, please follow the Emacs coding standards;
1329@xref{Coding Standards}. In addition, non-trivial contributions 1391@pxref{Coding Standards}. In addition, substantial contributions
1330require a copyright assignment to the FSF; @xref{Copyright Assignment}. 1392require a copyright assignment to the FSF; @pxref{Copyright Assignment}.
1331 1393
1332The development version of Emacs can be downloaded from the 1394The development version of Emacs can be downloaded from the
1333repository where it is actively maintained by a group of developers. 1395repository where it is actively maintained by a group of developers.
1334See the Emacs project page 1396See the Emacs project page
1335@url{https://savannah.gnu.org/projects/emacs/} for access details. 1397@url{https://savannah.gnu.org/projects/emacs/} for access details.
1336 1398
1337It is important to write your patch based on the current working 1399It is important to write your patches based on the current working
1338version. If you start from an older version, your patch may be 1400version. If you start from an older version, your patch may be
1339outdated (so that maintainers will have a hard time applying it), or 1401outdated (so that maintainers will have a hard time applying it), or
1340changes in Emacs may have made your patch unnecessary. After you have 1402changes in Emacs may have made your patch unnecessary. After you have
@@ -1397,7 +1459,7 @@ the Emacs Lisp Reference Manual
1397 1459
1398@node Coding Standards 1460@node Coding Standards
1399@subsection Coding Standards 1461@subsection Coding Standards
1400@cindex coding standards 1462@cindex coding standards for Emacs submissions
1401 1463
1402Contributed code should follow the GNU Coding Standards 1464Contributed code should follow the GNU Coding Standards
1403@url{https://www.gnu.org/prep/standards/}. This may also be available 1465@url{https://www.gnu.org/prep/standards/}. This may also be available
@@ -1433,10 +1495,6 @@ to be included in Emacs.
1433Remove all trailing whitespace in all source and text files. 1495Remove all trailing whitespace in all source and text files.
1434 1496
1435@item 1497@item
1436Emacs has no convention on whether to use tabs in source code; please
1437don't change whitespace in the files you edit.
1438
1439@item
1440Use @code{?\s} instead of @code{? } in Lisp code for a space character. 1498Use @code{?\s} instead of @code{? } in Lisp code for a space character.
1441 1499
1442@end itemize 1500@end itemize
@@ -1455,7 +1513,7 @@ packages stored in GNU ELPA, we require that the copyright be assigned
1455to the FSF@. For the reasons behind this, see 1513to the FSF@. For the reasons behind this, see
1456@url{https://www.gnu.org/licenses/why-assign.html}. 1514@url{https://www.gnu.org/licenses/why-assign.html}.
1457 1515
1458Copyright assignment is a simple process. Residents of some countries 1516Copyright assignment is a simple process. Residents of many countries
1459can do it entirely electronically. We can help you get started, 1517can do it entirely electronically. We can help you get started,
1460including sending you the forms you should fill, and answer any 1518including sending you the forms you should fill, and answer any
1461questions you may have (or point you to the people with the answers), 1519questions you may have (or point you to the people with the answers),
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 18d5da5c7d1..fd497d14f63 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -1775,6 +1775,8 @@ it's used to say which major modes this minor mode is useful in.
1775 1775
1776Any other keyword arguments are passed directly to the 1776Any other keyword arguments are passed directly to the
1777@code{defcustom} generated for the variable @var{mode}. 1777@code{defcustom} generated for the variable @var{mode}.
1778@xref{Variable Definitions}, for the description of those keywords and
1779their values.
1778 1780
1779The command named @var{mode} first performs the standard actions such as 1781The command named @var{mode} first performs the standard actions such as
1780setting the variable named @var{mode} and then executes the @var{body} 1782setting the variable named @var{mode} and then executes the @var{body}
@@ -1860,9 +1862,10 @@ by visiting files, and buffers that use a major mode other than
1860Fundamental mode; but it does not detect the creation of a new buffer 1862Fundamental mode; but it does not detect the creation of a new buffer
1861in Fundamental mode. 1863in Fundamental mode.
1862 1864
1863This defines the customization option @var{global-mode} (@pxref{Customization}), 1865This macro defines the customization option @var{global-mode}
1864which can be toggled in the Customize interface to turn the minor mode on 1866(@pxref{Customization}), which can be toggled via the Customize
1865and off. As with @code{define-minor-mode}, you should ensure that the 1867interface to turn the minor mode on and off. As with
1868@code{define-minor-mode}, you should ensure that the
1866@code{define-globalized-minor-mode} form is evaluated each time Emacs 1869@code{define-globalized-minor-mode} form is evaluated each time Emacs
1867starts, for example by providing a @code{:require} keyword. 1870starts, for example by providing a @code{:require} keyword.
1868 1871
@@ -1875,24 +1878,27 @@ Use @code{:variable @var{variable}} if that's not the case--some minor
1875modes use a different variable to store this state information. 1878modes use a different variable to store this state information.
1876 1879
1877Generally speaking, when you define a globalized minor mode, you should 1880Generally speaking, when you define a globalized minor mode, you should
1878also define a non-globalized version, so that people can use (or 1881also define a non-globalized version, so that people could use it (or
1879disable) it in individual buffers. This also allows them to disable a 1882disable it) in individual buffers. This also allows them to disable a
1880globally enabled minor mode in a specific major mode, by using that 1883globally enabled minor mode in a specific major mode, by using that
1881mode's hook. 1884mode's hook.
1882 1885
1883If given a @code{:predicate} keyword, a user option called the same as 1886If the macro is given a @code{:predicate} keyword, it will create a
1884the global mode variable, but with @code{-modes} instead of 1887user option called the same as the global mode variable, but with
1885@code{-mode} at the end will be created. The variable is used as a 1888@code{-modes} instead of @code{-mode} at the end, i.e.@:
1886predicate that specifies which major modes the minor mode should be 1889@code{@var{global-mode}s}. This variable will be used in a predicate
1887activated in. Valid values include @code{t} (use in all major modes, 1890function that determines whether the minor mode should be activated in
1888@code{nil} (use in no major modes), or a list of mode names (or 1891a particular major mode. Valid values of @code{:predicate} include
1889@code{(not mode-name ...)}) elements (as well as @code{t} and 1892@code{t} (use in all major modes), @code{nil} (don't use in any major
1890@code{nil}). 1893modes), or a list of mode names, optionally preceded with @code{not}
1894(as in @w{@code{(not @var{mode-name} @dots{})}}). These elements can
1895be mixed, as shown in the following examples.
1891 1896
1892@example 1897@example
1893(c-mode (not mail-mode message-mode) text-mode) 1898(c-mode (not mail-mode message-mode) text-mode)
1894@end example 1899@end example
1895 1900
1901@noindent
1896This means ``use in modes derived from @code{c-mode}, and not in 1902This means ``use in modes derived from @code{c-mode}, and not in
1897modes derived from @code{message-mode} or @code{mail-mode}, but do use 1903modes derived from @code{message-mode} or @code{mail-mode}, but do use
1898in modes derived from @code{text-mode}, and otherwise no other 1904in modes derived from @code{text-mode}, and otherwise no other
@@ -1902,13 +1908,15 @@ modes''.
1902((not c-mode) t) 1908((not c-mode) t)
1903@end example 1909@end example
1904 1910
1905This means ``don't use modes derived from @code{c-mode}, but use 1911@noindent
1912This means ``don't use in modes derived from @code{c-mode}, but do use
1906everywhere else''. 1913everywhere else''.
1907 1914
1908@example 1915@example
1909(text-mode) 1916(text-mode)
1910@end example 1917@end example
1911 1918
1919@noindent
1912This means ``use in modes derived from @code{text-mode}, but nowhere 1920This means ``use in modes derived from @code{text-mode}, but nowhere
1913else''. (There's an implicit @code{nil} element at the end.) 1921else''. (There's an implicit @code{nil} element at the end.)
1914@end defmac 1922@end defmac
diff --git a/doc/misc/eglot.texi b/doc/misc/eglot.texi
index defdf59e865..fc5449b0e8d 100644
--- a/doc/misc/eglot.texi
+++ b/doc/misc/eglot.texi
@@ -1298,9 +1298,9 @@ user.
1298 1298
1299To report an Eglot bug, send e-mail to @email{bug-gnu-emacs@@gnu.org}. 1299To report an Eglot bug, send e-mail to @email{bug-gnu-emacs@@gnu.org}.
1300 1300
1301Get acquainted with Emacs's bug reporting guidelines (@pxref{Bugs,,, 1301To understand how to write this email, get acquainted with Emacs's bug
1302emacs, GNU Emacs Manual}). Then, follow this checklist specific to 1302reporting guidelines (@pxref{Bugs,,, emacs, GNU Emacs Manual}). Then,
1303Eglot bug rerpots. 1303follow this Eglot-specific checklist:
1304 1304
1305@enumerate 1305@enumerate
1306@item 1306@item
@@ -1341,18 +1341,18 @@ since they are usually implicitly loaded when visiting a file in that
1341language. 1341language.
1342 1342
1343ELPA packages usually live in @code{~/.emacs.d/elpa} (or what is in 1343ELPA packages usually live in @code{~/.emacs.d/elpa} (or what is in
1344@code{package-user-dir}). Please show the listing of files in that 1344@code{package-user-dir}). Including a listing of files in that
1345directory as well. 1345directory is a way to tell the maintainers about ELPA package
1346versions.
1346 1347
1347@item 1348@item
1348Include a recipe to replicate the problem with @emph{a clean Emacs 1349Include a recipe to replicate the problem with @emph{a clean Emacs
1349run}. This means @kbd{emacs -Q -f package-initialize} invocation 1350run}. The invocation @code{emacs -Q -f package-initialize} starts
1350which starts Emacs with no configuration and initializes the ELPA 1351Emacs with no configuration and initializes the ELPA packages. A very
1351packages. A very minimal (no more that 10 lines) @file{.emacs} 1352minimal @file{.emacs} initialization file (10 lines or less) is also
1352initialization file is also acceptable and good means to describe 1353acceptable and good means to describe changes to variables.
1353changes to variables.
1354 1354
1355There is usually no need to include @kbd{require} statements in the 1355There is usually no need to include @code{require} statements in the
1356recipe, as Eglot's functionality uses autoloads. 1356recipe, as Eglot's functionality uses autoloads.
1357 1357
1358Likewise, there is rarely the need to use things like 1358Likewise, there is rarely the need to use things like
@@ -1364,9 +1364,9 @@ adding to hooks with @code{add-hook}. Prefer starting Eglot with
1364@item 1364@item
1365Make sure to double check all the above elements and re-run the recipe 1365Make sure to double check all the above elements and re-run the recipe
1366to see that the problem is reproducible. Following the recipe should 1366to see that the problem is reproducible. Following the recipe should
1367produce event transcript and error backtraces that are exactly the 1367produce event transcript and error backtraces that are very similar to
1368same or very similar to the ones you included. If the problem only 1368the ones you included. If the problem only happens sometimes, mention
1369happens sometimes, include this information in your bug report. 1369this in your report.
1370@end enumerate 1370@end enumerate
1371 1371
1372Please keep in mind that some problems reported against Eglot may 1372Please keep in mind that some problems reported against Eglot may
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 5d6def75f2f..46ef5146136 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -1504,8 +1504,10 @@ access and it has the most reasonable security protocols, use
1504@end example 1504@end example
1505 1505
1506If @option{ssh} is unavailable for whatever reason, look for other 1506If @option{ssh} is unavailable for whatever reason, look for other
1507obvious options. For MS Windows, try the @option{plink} method. For 1507obvious options. For MS Windows, try the @option{plink}
1508Kerberos, try @option{krlogin}. 1508method@footnote{This shouldn't be needed with recent @code{OpenSSH}
1509versions for MS Windows. Use method @option{sshx}.}. For Kerberos,
1510try @option{krlogin}.
1509 1511
1510For editing local files as @option{su} or @option{sudo} methods, try 1512For editing local files as @option{su} or @option{sudo} methods, try
1511the shortened syntax of @samp{root}: 1513the shortened syntax of @samp{root}:
@@ -2866,11 +2868,19 @@ When @value{tramp} uses direct remote copying, password caches are not
2866consulted. 2868consulted.
2867 2869
2868 2870
2869@subsection Issues with Cygwin ssh 2871@subsection Issues with Cygwin and MS Windows ssh
2870@cindex cygwin, issues 2872@cindex cygwin, issues
2873@cindex ms Windows, issues
2871 2874
2872This section is incomplete. Please share your solutions. 2875This section is incomplete. Please share your solutions.
2873 2876
2877@cindex ms windows and @command{ssh}
2878@cindex ms windows and @command{ssh-agent}
2879
2880MS Windows' @command{ssh} does not open a remote TTY@. Use the method
2881@option{sshx} or @option{scpx} instead. Furthermore, it cannot read a
2882passphrase for ssh private keys. Use the MS @code{ssh-agent}.
2883
2874@cindex method @option{sshx} with cygwin 2884@cindex method @option{sshx} with cygwin
2875@cindex @option{sshx} method with cygwin 2885@cindex @option{sshx} method with cygwin
2876 2886
@@ -2910,13 +2920,15 @@ Windows file names to Cygwin file names.
2910@cindex @env{SSH_AUTH_SOCK} and emacs on ms windows 2920@cindex @env{SSH_AUTH_SOCK} and emacs on ms windows
2911@vindex SSH_AUTH_SOCK@r{, environment variable} 2921@vindex SSH_AUTH_SOCK@r{, environment variable}
2912 2922
2913When using the @command{ssh-agent} on MS Windows for password-less 2923When using the cygwin @command{ssh-agent} on MS Windows for
2914interaction, @option{ssh} methods depend on the environment variable 2924password-less interaction, @option{ssh} methods depend on the
2915@env{SSH_AUTH_SOCK}. But this variable is not set when Emacs is 2925environment variable @env{SSH_AUTH_SOCK}. But this variable is not
2916started from a Desktop shortcut and authentication fails. 2926set when Emacs is started from a Desktop shortcut and authentication
2927fails.
2917 2928
2918One workaround is to use an MS Windows based SSH Agent, such as 2929One workaround is to use an MS Windows based SSH Agent, such as the
2919@command{Pageant}. It is part of the PuTTY Suite of tools. 2930native MS @command{ssh-agent} or @command{Pageant}. The latter is
2931part of the PuTTY Suite of tools.
2920 2932
2921The fallback is to start Emacs from a shell. 2933The fallback is to start Emacs from a shell.
2922 2934
diff --git a/doc/misc/transient.texi b/doc/misc/transient.texi
index 850930a290f..33d689cc01b 100644
--- a/doc/misc/transient.texi
+++ b/doc/misc/transient.texi
@@ -2566,6 +2566,20 @@ currently exist.
2566 2566
2567Yes, see @code{transient-display-buffer-action} in @ref{Configuration}. 2567Yes, see @code{transient-display-buffer-action} in @ref{Configuration}.
2568 2568
2569@anchor{How can I copy text from the popup buffer?}
2570@appendixsec How can I copy text from the popup buffer?
2571
2572To be able to mark text in any transient popup buffer using the mouse,
2573you have to add the following binding. Note that the region won't be
2574visualized, while doing so. After you have quit the transient popup,
2575you will be able to yank it another buffer.
2576
2577@lisp
2578(keymap-set transient-predicate-map
2579 "<mouse-set-region>"
2580 #'transient--do-stay)
2581@end lisp
2582
2569@anchor{Why did some of the key bindings change?} 2583@anchor{Why did some of the key bindings change?}
2570@appendixsec Why did some of the key bindings change? 2584@appendixsec Why did some of the key bindings change?
2571 2585
diff --git a/etc/NEWS.29 b/etc/NEWS.29
index 0b651f7a519..d7a6cf7986d 100644
--- a/etc/NEWS.29
+++ b/etc/NEWS.29
@@ -3565,11 +3565,13 @@ font spec. In these cases, replacing ":weight 'normal" with ":weight
3565'medium" should fix the issue. 3565'medium" should fix the issue.
3566 3566
3567--- 3567---
3568** Keymap descriptions have changed. 3568** Keymap descriptions by Help commands have changed.
3569'help--describe-command', 'C-h b' and associated functions that output 3569'help--describe-command', 'C-h b' and associated functions that output
3570keymap descriptions have changed. In particular, prefix commands are 3570keymap descriptions have changed. In particular, prefix commands are
3571not output at all, and instead of "??" for closures/functions, 3571not output at all, and instead of "??" for closures/functions, these
3572"[closure]"/"[lambda]" is output. 3572functions output "[closure]"/"[lambda]". You can get back the old
3573behavior of including prefix commands by customizing the new option
3574'describe-bindings-show-prefix-commands' to a non-nil value.
3573 3575
3574--- 3576---
3575** 'downcase' details have changed slightly. 3577** 'downcase' details have changed slightly.
diff --git a/etc/PROBLEMS b/etc/PROBLEMS
index cff96ff2863..67ff2c1115e 100644
--- a/etc/PROBLEMS
+++ b/etc/PROBLEMS
@@ -2313,6 +2313,33 @@ recommended way of turning on Font-lock is by typing "M-x
2313global-font-lock-mode RET" or by customizing the variable 2313global-font-lock-mode RET" or by customizing the variable
2314'global-font-lock-mode'. 2314'global-font-lock-mode'.
2315 2315
2316** Colors are not available or messed up on TTY frames inside 'screen'.
2317
2318This can happen if you have COLORTERM=truecolor defined in the
2319environment when Emacs starts, but your version of 'screen' doesn't
2320actually support 24-bit true colors.
2321
2322The COLORTERM environment variable is supposed to be set to the value
2323"truecolor" only if the terminal used by Emacs actually supports true
2324color. Emacs does not have any means of verifying that this support
2325is available, it takes the fact that the variable is defined to this
2326value as an indication that true color support is, in fact, available,
2327and uses color setting commands that COLORTERM=truecolor presumes,
2328bypassing the usual Terminfo capabilities related to colors.
2329
2330Some text-mode terminals, such as GNOME Terminal, are known to set
2331this environment variable, supposedly to announce their own support
2332for true color; however the setting is then inherited by any other
2333terminal emulators started from such a terminal, even though those
2334other terminal emulators might not themselves support true color using
2335the same commands as Emacs uses when it sees COLORTERM=truecolor.
2336
2337The solution is to either upgrade to a newer version of 'screen'
2338(version 5.x or later reportedly supports true color), or to unset the
2339COLORTERM variable before starting 'screen', and let Emacs use the
2340color support provided by the terminal emulator as defined in the
2341Terminfo database.
2342
2316** Unexpected characters inserted into the buffer when you start Emacs. 2343** Unexpected characters inserted into the buffer when you start Emacs.
2317See e.g. <URL:https://debbugs.gnu.org/11129> 2344See e.g. <URL:https://debbugs.gnu.org/11129>
2318 2345
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex
index dc222719b7e..0ef05353341 100644
--- a/etc/refcards/orgcard.tex
+++ b/etc/refcards/orgcard.tex
@@ -1,5 +1,5 @@
1% Reference Card for Org Mode 1% Reference Card for Org Mode
2\def\orgversionnumber{9.6.1} 2\def\orgversionnumber{9.6.2}
3\def\versionyear{2023} % latest update 3\def\versionyear{2023} % latest update
4\input emacsver.tex 4\input emacsver.tex
5 5
diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el
index 7d9832f588f..3c57ca79b12 100644
--- a/lisp/emacs-lisp/comp.el
+++ b/lisp/emacs-lisp/comp.el
@@ -186,8 +186,9 @@ and above."
186 :type '(repeat string) 186 :type '(repeat string)
187 :version "28.1") 187 :version "28.1")
188 188
189(defcustom native-comp-driver-options (when (eq system-type 'darwin) 189(defcustom native-comp-driver-options
190 '("-Wl,-w")) 190 (cond ((eq system-type 'darwin) '("-Wl,-w"))
191 ((eq system-type 'cygwin) '("-Wl,-dynamicbase")))
191 "Options passed verbatim to the native compiler's back-end driver. 192 "Options passed verbatim to the native compiler's back-end driver.
192Note that not all options are meaningful; typically only the options 193Note that not all options are meaningful; typically only the options
193affecting the assembler and linker are likely to be useful. 194affecting the assembler and linker are likely to be useful.
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el
index 77f4b26d9bb..84e131147cd 100644
--- a/lisp/emacs-lisp/easy-mmode.el
+++ b/lisp/emacs-lisp/easy-mmode.el
@@ -452,15 +452,23 @@ No problems result if this variable is not bound.
452TURN-ON is a function that will be called with no args in every buffer 452TURN-ON is a function that will be called with no args in every buffer
453and that should try to turn MODE on if applicable for that buffer. 453and that should try to turn MODE on if applicable for that buffer.
454 454
455Each of KEY VALUE is a pair of CL-style keyword arguments. :predicate 455Each of KEY VALUE is a pair of CL-style keyword arguments.
456specifies which major modes the globalized minor mode should be switched on 456The :predicate argument specifies in which major modes should the
457in. As the minor mode defined by this function is always global, any 457globalized minor mode be switched on. The value should be t (meaning
458:global keyword is ignored. Other keywords have the same meaning as in 458switch on the minor mode in all major modes), nil (meaning don't
459`define-minor-mode', which see. In particular, :group specifies the custom 459switch on in any major mode), a list of modes (meaning switch on only
460group. The most useful keywords are those that are passed on to the 460in those modes and their descendants), or a list (not MODES...),
461`defcustom'. It normally makes no sense to pass the :lighter or :keymap 461meaning switch on in any major mode except MODES. The value can also
462keywords to `define-globalized-minor-mode', since these are usually passed 462mix all of these forms, see the info node `Defining Minor Modes' for
463to the buffer-local version of the minor mode. 463details.
464As the minor mode defined by this function is always global, any
465:global keyword is ignored.
466Other keywords have the same meaning as in `define-minor-mode',
467which see. In particular, :group specifies the custom group.
468The most useful keywords are those that are passed on to the `defcustom'.
469It normally makes no sense to pass the :lighter or :keymap keywords
470to `define-globalized-minor-mode', since these are usually passed to
471the buffer-local version of the minor mode.
464 472
465BODY contains code to execute each time the mode is enabled or disabled. 473BODY contains code to execute each time the mode is enabled or disabled.
466It is executed after toggling the mode, and before running 474It is executed after toggling the mode, and before running
@@ -512,7 +520,7 @@ on if the hook has explicitly disabled it.
512 (setq turn-on-function 520 (setq turn-on-function
513 `(lambda () 521 `(lambda ()
514 (require 'easy-mmode) 522 (require 'easy-mmode)
515 (when (easy-mmode--globalized-predicate-p ,(car predicate)) 523 (when (easy-mmode--globalized-predicate-p ,MODE-predicate)
516 (funcall ,turn-on-function))))) 524 (funcall ,turn-on-function)))))
517 (_ (push keyw extra-keywords) (push (pop body) extra-keywords)))) 525 (_ (push keyw extra-keywords) (push (pop body) extra-keywords))))
518 526
diff --git a/lisp/emacs-lisp/gv.el b/lisp/emacs-lisp/gv.el
index dad91e92a45..ac001af06bd 100644
--- a/lisp/emacs-lisp/gv.el
+++ b/lisp/emacs-lisp/gv.el
@@ -271,7 +271,7 @@ instead the assignment is turned into something equivalent to
271 (SETTER ARGS... temp) 271 (SETTER ARGS... temp)
272 temp) 272 temp)
273so as to preserve the semantics of `setf'." 273so as to preserve the semantics of `setf'."
274 (declare (debug (sexp (&or symbolp lambda-expr) &optional sexp))) 274 (declare (debug (sexp [&or symbolp lambda-expr] &optional sexp)))
275 (when (eq 'lambda (car-safe setter)) 275 (when (eq 'lambda (car-safe setter))
276 (message "Use `gv-define-setter' or name %s's setter function" name)) 276 (message "Use `gv-define-setter' or name %s's setter function" name))
277 `(gv-define-setter ,name (val &rest args) 277 `(gv-define-setter ,name (val &rest args)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 6dbdb565b1b..a939cc0b509 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -437,7 +437,7 @@ the C sources, too."
437 (setq file-name 437 (setq file-name
438 (locate-file file-name load-path '(".el" ".elc") 'readable))) 438 (locate-file file-name load-path '(".el" ".elc") 'readable)))
439 ((and (stringp file-name) 439 ((and (stringp file-name)
440 (string-match "[.]*loaddefs.el\\'" file-name)) 440 (string-match "[.]*loaddefs.elc?\\'" file-name))
441 ;; An autoloaded variable or face. Visit loaddefs.el in a buffer 441 ;; An autoloaded variable or face. Visit loaddefs.el in a buffer
442 ;; and try to extract the defining file. The following form is 442 ;; and try to extract the defining file. The following form is
443 ;; from `describe-function-1' and `describe-variable'. 443 ;; from `describe-function-1' and `describe-variable'.
diff --git a/lisp/help.el b/lisp/help.el
index 83be85b1ee4..3e94b5046e5 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -717,6 +717,12 @@ Return nil if KEYS is nil."
717 :group 'help 717 :group 'help
718 :version "29.1") 718 :version "29.1")
719 719
720(defcustom describe-bindings-show-prefix-commands nil
721 "Non-nil means show prefix commands in the output of `describe-bindings'."
722 :type 'boolean
723 :group 'help
724 :version "29.1")
725
720(declare-function outline-hide-subtree "outline") 726(declare-function outline-hide-subtree "outline")
721 727
722(defun describe-bindings (&optional prefix buffer) 728(defun describe-bindings (&optional prefix buffer)
@@ -1699,6 +1705,7 @@ in `describe-map-tree'."
1699 (setq vect (cdr vect)) 1705 (setq vect (cdr vect))
1700 (setq end (caar vect)))) 1706 (setq end (caar vect))))
1701 (when (or (not (eq start end)) 1707 (when (or (not (eq start end))
1708 describe-bindings-show-prefix-commands
1702 ;; Don't output keymap prefixes. 1709 ;; Don't output keymap prefixes.
1703 (not (keymapp definition))) 1710 (not (keymapp definition)))
1704 (when first 1711 (when first
diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 02f331697c6..3c7140ef5cc 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -64,16 +64,22 @@ The action to be taken can be further customized via
64 :version "28.1" 64 :version "28.1"
65 :type 'regexp) 65 :type 'regexp)
66 66
67(defcustom eww-download-directory "~/Downloads/"
68 "Default directory where `eww' saves downloaded files."
69 :version "29.1"
70 :group 'eww
71 :type 'directory)
72
67(defun eww--download-directory () 73(defun eww--download-directory ()
68 "Return the name of the download directory. 74 "Return the name of the EWW download directory.
69If ~/Downloads/ exists, that will be used, and if not, the 75The default is specified by `eww-download-directory'; however,
70DOWNLOAD XDG user directory will be returned. If that's 76if that directory doesn't exist and the DOWNLOAD XDG user directory
71undefined, ~/Downloads/ is returned anyway." 77is defined, use the latter instead."
72 (or (and (file-exists-p "~/Downloads/") 78 (or (and (file-exists-p eww-download-directory)
73 "~/Downloads/") 79 eww-download-directory)
74 (when-let ((dir (xdg-user-dir "DOWNLOAD"))) 80 (when-let ((dir (xdg-user-dir "DOWNLOAD")))
75 (file-name-as-directory dir)) 81 (file-name-as-directory dir))
76 "~/Downloads/")) 82 eww-download-directory))
77 83
78(defcustom eww-download-directory 'eww--download-directory 84(defcustom eww-download-directory 'eww--download-directory
79 "Directory where files will downloaded. 85 "Directory where files will downloaded.
diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el
index b0cfdb1ebba..1a9d8003530 100644
--- a/lisp/net/tramp-cmds.el
+++ b/lisp/net/tramp-cmds.el
@@ -319,7 +319,7 @@ The remote connection identified by SOURCE is flushed by
319 (read-file-name-function #'read-file-name-default) 319 (read-file-name-function #'read-file-name-default)
320 source target) 320 source target)
321 (if (null connections) 321 (if (null connections)
322 (tramp-user-error nil "There are no remote connections.") 322 (tramp-user-error nil "There are no remote connections")
323 (setq source 323 (setq source
324 ;; Likely, the source remote connection is broken. So we 324 ;; Likely, the source remote connection is broken. So we
325 ;; shall avoid any action on it. 325 ;; shall avoid any action on it.
@@ -367,15 +367,15 @@ The remote connection identified by SOURCE is flushed by
367 (list source target))) 367 (list source target)))
368 368
369 (unless (tramp-tramp-file-p source) 369 (unless (tramp-tramp-file-p source)
370 (tramp-user-error nil "Source %s must be remote." source)) 370 (tramp-user-error nil "Source %s must be remote" source))
371 (when (null target) 371 (when (null target)
372 (or (setq target (tramp-default-rename-file source)) 372 (or (setq target (tramp-default-rename-file source))
373 (tramp-user-error 373 (tramp-user-error
374 nil 374 nil
375 (concat "There is no target specified. " 375 (concat "There is no target specified. "
376 "Check `tramp-default-rename-alist' for a proper entry.")))) 376 "Check `tramp-default-rename-alist' for a proper entry"))))
377 (when (tramp-equal-remote source target) 377 (when (tramp-equal-remote source target)
378 (tramp-user-error nil "Source and target must have different remote.")) 378 (tramp-user-error nil "Source and target must have different remote"))
379 379
380 ;; Append local file name if none is specified. 380 ;; Append local file name if none is specified.
381 (when (string-equal (file-remote-p target) target) 381 (when (string-equal (file-remote-p target) target)
@@ -461,7 +461,7 @@ For details, see `tramp-rename-files'."
461 nil 461 nil
462 (substitute-command-keys 462 (substitute-command-keys
463 (concat "Current buffer is not remote. " 463 (concat "Current buffer is not remote. "
464 "Consider `\\[tramp-rename-files]' instead."))) 464 "Consider `\\[tramp-rename-files]' instead")))
465 (setq target 465 (setq target
466 (when (null current-prefix-arg) 466 (when (null current-prefix-arg)
467 ;; The source remote connection shall not trigger any action. 467 ;; The source remote connection shall not trigger any action.
diff --git a/lisp/net/tramp-crypt.el b/lisp/net/tramp-crypt.el
index 116c2b143e9..4d15695ccbf 100644
--- a/lisp/net/tramp-crypt.el
+++ b/lisp/net/tramp-crypt.el
@@ -436,7 +436,7 @@ Otherwise, return NAME."
436 crypt-vec (if (eq op 'encrypt) "encode" "decode") 436 crypt-vec (if (eq op 'encrypt) "encode" "decode")
437 tramp-compat-temporary-file-directory localname) 437 tramp-compat-temporary-file-directory localname)
438 (tramp-error 438 (tramp-error
439 crypt-vec 'file-error "%s of file name %s failed." 439 crypt-vec 'file-error "%s of file name %s failed"
440 (if (eq op 'encrypt) "Encoding" "Decoding") name)) 440 (if (eq op 'encrypt) "Encoding" "Decoding") name))
441 (with-current-buffer (tramp-get-connection-buffer crypt-vec) 441 (with-current-buffer (tramp-get-connection-buffer crypt-vec)
442 (goto-char (point-min)) 442 (goto-char (point-min))
@@ -471,7 +471,7 @@ Raise an error if this fails."
471 (file-name-directory infile) 471 (file-name-directory infile)
472 (concat "/" (file-name-nondirectory infile))) 472 (concat "/" (file-name-nondirectory infile)))
473 (tramp-error 473 (tramp-error
474 crypt-vec 'file-error "%s of file %s failed." 474 crypt-vec 'file-error "%s of file %s failed"
475 (if (eq op 'encrypt) "Encrypting" "Decrypting") infile)) 475 (if (eq op 'encrypt) "Encrypting" "Decrypting") infile))
476 (with-current-buffer (tramp-get-connection-buffer crypt-vec) 476 (with-current-buffer (tramp-get-connection-buffer crypt-vec)
477 (write-region nil nil outfile))))) 477 (write-region nil nil outfile)))))
@@ -495,11 +495,11 @@ directory. File names will be also encrypted."
495 ;; (declare (completion tramp-crypt-command-completion-p)) 495 ;; (declare (completion tramp-crypt-command-completion-p))
496 (interactive "DRemote directory name: ") 496 (interactive "DRemote directory name: ")
497 (unless tramp-crypt-enabled 497 (unless tramp-crypt-enabled
498 (tramp-user-error nil "Feature is not enabled.")) 498 (tramp-user-error nil "Feature is not enabled"))
499 (unless (and (tramp-tramp-file-p name) (file-directory-p name)) 499 (unless (and (tramp-tramp-file-p name) (file-directory-p name))
500 (tramp-user-error nil "%s must be an existing remote directory." name)) 500 (tramp-user-error nil "%s must be an existing remote directory" name))
501 (when (file-name-quoted-p name) 501 (when (file-name-quoted-p name)
502 (tramp-user-error nil "%s must not be quoted." name)) 502 (tramp-user-error nil "%s must not be quoted" name))
503 (setq name (file-name-as-directory (expand-file-name name))) 503 (setq name (file-name-as-directory (expand-file-name name)))
504 (unless (member name tramp-crypt-directories) 504 (unless (member name tramp-crypt-directories)
505 (setq tramp-crypt-directories (cons name tramp-crypt-directories))) 505 (setq tramp-crypt-directories (cons name tramp-crypt-directories)))
@@ -518,7 +518,7 @@ kept in their encrypted form."
518 ;; (declare (completion tramp-crypt-command-completion-p)) 518 ;; (declare (completion tramp-crypt-command-completion-p))
519 (interactive "DRemote directory name: ") 519 (interactive "DRemote directory name: ")
520 (unless tramp-crypt-enabled 520 (unless tramp-crypt-enabled
521 (tramp-user-error nil "Feature is not enabled.")) 521 (tramp-user-error nil "Feature is not enabled"))
522 (setq name (file-name-as-directory (expand-file-name name))) 522 (setq name (file-name-as-directory (expand-file-name name)))
523 (when (and (member name tramp-crypt-directories) 523 (when (and (member name tramp-crypt-directories)
524 (delete 524 (delete
diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el
index c84f96d3c61..f925d2f3da5 100644
--- a/lisp/net/tramp-gvfs.el
+++ b/lisp/net/tramp-gvfs.el
@@ -1115,7 +1115,7 @@ file names."
1115 (goto-char (point-min)) 1115 (goto-char (point-min))
1116 (tramp-error-with-buffer 1116 (tramp-error-with-buffer
1117 nil v 'file-error 1117 nil v 'file-error
1118 "%s failed, see buffer `%s' for details." 1118 "%s failed, see buffer `%s' for details"
1119 msg-operation (buffer-name))) 1119 msg-operation (buffer-name)))
1120 1120
1121 ;; Some WebDAV server, like the one from QNAP, do 1121 ;; Some WebDAV server, like the one from QNAP, do
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 401cec0e28d..2ef97d540a0 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -1147,8 +1147,8 @@ Operations not mentioned here will be handled by the normal Emacs functions.")
1147 (unless (tramp-get-remote-ln v) 1147 (unless (tramp-get-remote-ln v)
1148 (tramp-error 1148 (tramp-error
1149 v 'file-error 1149 v 'file-error
1150 (concat "Making a symbolic link. " 1150 (concat "Making a symbolic link: "
1151 "ln(1) does not exist on the remote host.")))) 1151 "ln(1) does not exist on the remote host"))))
1152 1152
1153 (tramp-skeleton-handle-make-symbolic-link target linkname ok-if-already-exists 1153 (tramp-skeleton-handle-make-symbolic-link target linkname ok-if-already-exists
1154 (and (tramp-send-command-and-check 1154 (and (tramp-send-command-and-check
@@ -2150,7 +2150,7 @@ the uid and gid from FILENAME."
2150 cmd-result) 2150 cmd-result)
2151 (tramp-error-with-buffer 2151 (tramp-error-with-buffer
2152 nil v 'file-error 2152 nil v 'file-error
2153 "Copying directly failed, see buffer `%s' for details." 2153 "Copying directly failed, see buffer `%s' for details"
2154 (buffer-name))))) 2154 (buffer-name)))))
2155 2155
2156 ;; We are on the local host. 2156 ;; We are on the local host.
@@ -2205,7 +2205,7 @@ the uid and gid from FILENAME."
2205 "%s %s %s" cmd 2205 "%s %s %s" cmd
2206 (tramp-shell-quote-argument localname1) 2206 (tramp-shell-quote-argument localname1)
2207 (tramp-shell-quote-argument tmpfile)) 2207 (tramp-shell-quote-argument tmpfile))
2208 "Copying directly failed, see buffer `%s' for details." 2208 "Copying directly failed, see buffer `%s' for details"
2209 (tramp-get-buffer v)) 2209 (tramp-get-buffer v))
2210 ;; We must change the ownership as remote user. 2210 ;; We must change the ownership as remote user.
2211 ;; Since this does not work reliable, we also 2211 ;; Since this does not work reliable, we also
@@ -2238,7 +2238,7 @@ the uid and gid from FILENAME."
2238 "cp -f -p %s %s" 2238 "cp -f -p %s %s"
2239 (tramp-shell-quote-argument tmpfile) 2239 (tramp-shell-quote-argument tmpfile)
2240 (tramp-shell-quote-argument localname2)) 2240 (tramp-shell-quote-argument localname2))
2241 "Copying directly failed, see buffer `%s' for details." 2241 "Copying directly failed, see buffer `%s' for details"
2242 (tramp-get-buffer v))) 2242 (tramp-get-buffer v)))
2243 (t1 2243 (t1
2244 (tramp-run-real-handler 2244 (tramp-run-real-handler
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el
index 740841c24db..add230e2720 100644
--- a/lisp/net/tramp-smb.el
+++ b/lisp/net/tramp-smb.el
@@ -692,7 +692,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored."
692 692
693 ;; "rmdir" does not report an error. So we check ourselves. 693 ;; "rmdir" does not report an error. So we check ourselves.
694 (when (file-exists-p directory) 694 (when (file-exists-p directory)
695 (tramp-error v 'file-error "`%s' not removed." directory))))) 695 (tramp-error v 'file-error "`%s' not removed" directory)))))
696 696
697(defun tramp-smb-handle-delete-file (filename &optional trash) 697(defun tramp-smb-handle-delete-file (filename &optional trash)
698 "Like `delete-file' for Tramp files." 698 "Like `delete-file' for Tramp files."
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 6eff5b2ca60..defdb2bd546 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1722,11 +1722,11 @@ default values are used."
1722 (unless (or nodefault non-essential 1722 (unless (or nodefault non-essential
1723 (assoc method tramp-methods)) 1723 (assoc method tramp-methods))
1724 (tramp-user-error 1724 (tramp-user-error
1725 v "Method `%s' is not known." method)) 1725 v "Method `%s' is not known" method))
1726 ;; Only some methods from tramp-sh.el do support multi-hops. 1726 ;; Only some methods from tramp-sh.el do support multi-hops.
1727 (unless (or (null hop) nodefault non-essential (tramp-multi-hop-p v)) 1727 (unless (or (null hop) nodefault non-essential (tramp-multi-hop-p v))
1728 (tramp-user-error 1728 (tramp-user-error
1729 v "Method `%s' is not supported for multi-hops." method))))))) 1729 v "Method `%s' is not supported for multi-hops" method)))))))
1730 1730
1731(put #'tramp-dissect-file-name 'tramp-suppress-trace t) 1731(put #'tramp-dissect-file-name 'tramp-suppress-trace t)
1732 1732
@@ -1755,7 +1755,7 @@ See `tramp-dissect-file-name' for details."
1755 ;; Only some methods from tramp-sh.el do support multi-hops. 1755 ;; Only some methods from tramp-sh.el do support multi-hops.
1756 (unless (or nodefault non-essential (tramp-multi-hop-p v)) 1756 (unless (or nodefault non-essential (tramp-multi-hop-p v))
1757 (tramp-user-error 1757 (tramp-user-error
1758 v "Method `%s' is not supported for multi-hops." 1758 v "Method `%s' is not supported for multi-hops"
1759 (tramp-file-name-method v))) 1759 (tramp-file-name-method v)))
1760 ;; Return result. 1760 ;; Return result.
1761 v)) 1761 v))
@@ -3936,7 +3936,7 @@ Let-bind it when necessary.")
3936 ;; Some handlers for `tramp-get-remote-uid' return nil if they 3936 ;; Some handlers for `tramp-get-remote-uid' return nil if they
3937 ;; can't get the UID; always return -1 in this case for 3937 ;; can't get the UID; always return -1 in this case for
3938 ;; consistency. 3938 ;; consistency.
3939 -1))) 3939 tramp-unknown-id-integer)))
3940 3940
3941(defun tramp-handle-access-file (filename string) 3941(defun tramp-handle-access-file (filename string)
3942 "Like `access-file' for Tramp files." 3942 "Like `access-file' for Tramp files."
@@ -4896,7 +4896,7 @@ Do not set it manually, it is used buffer-local in `tramp-get-lock-pid'.")
4896 (unless (tramp-multi-hop-p item) 4896 (unless (tramp-multi-hop-p item)
4897 (setq tramp-default-proxies-alist saved-tdpa) 4897 (setq tramp-default-proxies-alist saved-tdpa)
4898 (tramp-user-error 4898 (tramp-user-error
4899 vec "Method `%s' is not supported for multi-hops." 4899 vec "Method `%s' is not supported for multi-hops"
4900 (tramp-file-name-method item))))) 4900 (tramp-file-name-method item)))))
4901 4901
4902 ;; Some methods ("su", "sg", "sudo", "doas", "ksu") do not use the 4902 ;; Some methods ("su", "sg", "sudo", "doas", "ksu") do not use the
diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el
index 20636a3dd04..fd75f4785d6 100644
--- a/lisp/org/org-version.el
+++ b/lisp/org/org-version.el
@@ -5,13 +5,13 @@
5(defun org-release () 5(defun org-release ()
6 "The release version of Org. 6 "The release version of Org.
7Inserted by installing Org mode or when a release is made." 7Inserted by installing Org mode or when a release is made."
8 (let ((org-release "9.6.1")) 8 (let ((org-release "9.6.2"))
9 org-release)) 9 org-release))
10;;;###autoload 10;;;###autoload
11(defun org-git-version () 11(defun org-git-version ()
12 "The Git version of Org mode. 12 "The Git version of Org mode.
13Inserted by installing Org or when a release is made." 13Inserted by installing Org or when a release is made."
14 (let ((org-git-version "release_9.6.1-48-g92471e")) 14 (let ((org-git-version "release_9.6.2"))
15 org-git-version)) 15 org-git-version))
16 16
17(provide 'org-version) 17(provide 'org-version)
diff --git a/lisp/org/org.el b/lisp/org/org.el
index 2fbb825015f..1649722ab0c 100644
--- a/lisp/org/org.el
+++ b/lisp/org/org.el
@@ -9,7 +9,7 @@
9;; URL: https://orgmode.org 9;; URL: https://orgmode.org
10;; Package-Requires: ((emacs "26.1")) 10;; Package-Requires: ((emacs "26.1"))
11 11
12;; Version: 9.6.1 12;; Version: 9.6.2
13 13
14;; This file is part of GNU Emacs. 14;; This file is part of GNU Emacs.
15;; 15;;
diff --git a/lisp/org/ox-texinfo.el b/lisp/org/ox-texinfo.el
index 4ff482cc3f5..f822f3d110c 100644
--- a/lisp/org/ox-texinfo.el
+++ b/lisp/org/ox-texinfo.el
@@ -2037,10 +2037,13 @@ Once computed, the results remain cached."
2037 "\n"))) 2037 "\n")))
2038 (with-temp-file input-file 2038 (with-temp-file input-file
2039 (insert input-content)) 2039 (insert input-content))
2040 (let* ((output-file (org-texinfo-compile input-file)) 2040 (when-let* ((output-file
2041 (output-content (with-temp-buffer 2041 ;; If compilation fails, consider math to
2042 (insert-file-contents output-file) 2042 ;; be not supported.
2043 (buffer-string)))) 2043 (ignore-errors (org-texinfo-compile input-file)))
2044 (output-content (with-temp-buffer
2045 (insert-file-contents output-file)
2046 (buffer-string))))
2044 (let ((result (string-match-p (regexp-quote math-example) 2047 (let ((result (string-match-p (regexp-quote math-example)
2045 output-content))) 2048 output-content)))
2046 (delete-file input-file) 2049 (delete-file input-file)
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 2fe88323c35..bbabce80b4d 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -5854,7 +5854,14 @@ statement."
5854 (save-excursion 5854 (save-excursion
5855 (python-nav-beginning-of-statement) 5855 (python-nav-beginning-of-statement)
5856 (when (and (not (python-syntax-context-type)) 5856 (when (and (not (python-syntax-context-type))
5857 (looking-at (python-rx dedenter))) 5857 (looking-at (python-rx dedenter))
5858 ;; Exclude the first "case" in the block.
5859 (not (and (string= (match-string-no-properties 0)
5860 "case")
5861 (save-excursion
5862 (back-to-indentation)
5863 (python-util-forward-comment -1)
5864 (equal (char-before) ?:)))))
5858 (point)))) 5865 (point))))
5859 5866
5860(defun python-info-line-ends-backslash-p (&optional line-number) 5867(defun python-info-line-ends-backslash-p (&optional line-number)
diff --git a/lisp/progmodes/ruby-ts-mode.el b/lisp/progmodes/ruby-ts-mode.el
index d1034d467ab..97c7cf6480c 100644
--- a/lisp/progmodes/ruby-ts-mode.el
+++ b/lisp/progmodes/ruby-ts-mode.el
@@ -469,7 +469,7 @@ non-nil."
469 (let* (first-call ) 469 (let* (first-call )
470 (while (and parent 470 (while (and parent
471 (setq first-call (treesit-node-parent parent)) 471 (setq first-call (treesit-node-parent parent))
472 (string-search "call" (treesit-node-type first-call))) 472 (equal "call" (treesit-node-type first-call)))
473 (setq parent first-call)) 473 (setq parent first-call))
474 (treesit-node-start (treesit-search-subtree parent "\\." nil t)))) 474 (treesit-node-start (treesit-search-subtree parent "\\." nil t))))
475 475
@@ -883,32 +883,24 @@ a statement container is a node that matches
883 "Return the fully qualified name of NODE." 883 "Return the fully qualified name of NODE."
884 (let* ((name (ruby-ts--get-name node)) 884 (let* ((name (ruby-ts--get-name node))
885 (delimiter "#")) 885 (delimiter "#"))
886 (when (equal (treesit-node-type node) "singleton_method")
887 (setq delimiter "."
888 name (treesit-node-text (treesit-node-child-by-field-name node "name"))))
886 (while (setq node (treesit-parent-until node #'ruby-ts--class-or-module-p)) 889 (while (setq node (treesit-parent-until node #'ruby-ts--class-or-module-p))
887 (setq name (concat (ruby-ts--get-name node) delimiter name)) 890 (if name
891 (setq name (concat (ruby-ts--get-name node) delimiter name))
892 (setq name (ruby-ts--get-name node)))
888 (setq delimiter "::")) 893 (setq delimiter "::"))
889 name)) 894 name))
890 895
891(defun ruby-ts--imenu-helper (node) 896(defun ruby-ts--imenu-helper (tree)
892 "Convert a treesit sparse tree NODE in an imenu list. 897 "Convert a treesit sparse tree NODE in a flat imenu list."
893Helper for `ruby-ts--imenu' which converts a treesit sparse 898 (if (cdr tree)
894NODE into a list of imenu ( name . pos ) nodes" 899 ;; We only use the "leaf" values in the tree. It does include a
895 (let* ((ts-node (car node)) 900 ;; leaf node for every class or module body.
896 (subtrees (mapcan #'ruby-ts--imenu-helper (cdr node))) 901 (cl-mapcan #'ruby-ts--imenu-helper (cdr tree))
897 (name (when ts-node 902 (list (cons (ruby-ts--full-name (car tree))
898 (ruby-ts--full-name ts-node))) 903 (treesit-node-start (car tree))))))
899 (marker (when ts-node
900 (set-marker (make-marker)
901 (treesit-node-start ts-node)))))
902 (cond
903 ((or (null ts-node) (null name)) subtrees)
904 ;; Don't include the anonymous "class" and "module" nodes
905 ((string-match-p "(\"\\(class\\|module\\)\")"
906 (treesit-node-string ts-node))
907 nil)
908 (subtrees
909 `((,name ,(cons name marker) ,@subtrees)))
910 (t
911 `((,name . ,marker))))))
912 904
913;; For now, this is going to work like ruby-mode and return a list of 905;; For now, this is going to work like ruby-mode and return a list of
914;; class, modules, def (methods), and alias. It is likely that this 906;; class, modules, def (methods), and alias. It is likely that this
@@ -916,8 +908,14 @@ NODE into a list of imenu ( name . pos ) nodes"
916(defun ruby-ts--imenu () 908(defun ruby-ts--imenu ()
917 "Return Imenu alist for the current buffer." 909 "Return Imenu alist for the current buffer."
918 (let* ((root (treesit-buffer-root-node)) 910 (let* ((root (treesit-buffer-root-node))
919 (nodes (treesit-induce-sparse-tree root "^\\(method\\|alias\\|class\\|module\\)$"))) 911 (tree (treesit-induce-sparse-tree root
920 (ruby-ts--imenu-helper nodes))) 912 (rx bol (or "singleton_method"
913 "method"
914 "alias"
915 "class"
916 "module")
917 eol))))
918 (ruby-ts--imenu-helper tree)))
921 919
922(defun ruby-ts--arrow-up-start (arg) 920(defun ruby-ts--arrow-up-start (arg)
923 "Move to the start ARG levels up or out." 921 "Move to the start ARG levels up or out."
diff --git a/lisp/savehist.el b/lisp/savehist.el
index b532668f8a4..ea8968c771b 100644
--- a/lisp/savehist.el
+++ b/lisp/savehist.el
@@ -232,8 +232,9 @@ If AUTO-SAVE is non-nil, compare the saved contents to the one last saved,
232 savehist-coding-system)) 232 savehist-coding-system))
233 (run-hooks 'savehist-save-hook) 233 (run-hooks 'savehist-save-hook)
234 (let ((print-length nil) 234 (let ((print-length nil)
235 (print-level nil) 235 (print-level nil)
236 (print-quoted t)) 236 (print-quoted t)
237 (print-circle t))
237 ;; Save the minibuffer histories, along with the value of 238 ;; Save the minibuffer histories, along with the value of
238 ;; savehist-minibuffer-history-variables itself. 239 ;; savehist-minibuffer-history-variables itself.
239 (when savehist-save-minibuffer-history 240 (when savehist-save-minibuffer-history
diff --git a/lisp/subr.el b/lisp/subr.el
index c67c7158b76..05c022847d3 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -7151,7 +7151,7 @@ CONDITION is either:
7151- the symbol t, to always match, 7151- the symbol t, to always match,
7152- the symbol nil, which never matches, 7152- the symbol nil, which never matches,
7153- a regular expression, to match a buffer name, 7153- a regular expression, to match a buffer name,
7154- a predicate function that takes a buffer object and ARG as 7154- a predicate function that takes BUFFER-OR-NAME and ARG as
7155 arguments, and returns non-nil if the buffer matches, 7155 arguments, and returns non-nil if the buffer matches,
7156- a cons-cell, where the car describes how to interpret the cdr. 7156- a cons-cell, where the car describes how to interpret the cdr.
7157 The car can be one of the following: 7157 The car can be one of the following:
@@ -7177,8 +7177,8 @@ CONDITION is either:
7177 (string-match-p condition (buffer-name buffer))) 7177 (string-match-p condition (buffer-name buffer)))
7178 ((pred functionp) 7178 ((pred functionp)
7179 (if (eq 1 (cdr (func-arity condition))) 7179 (if (eq 1 (cdr (func-arity condition)))
7180 (funcall condition buffer) 7180 (funcall condition buffer-or-name)
7181 (funcall condition buffer arg))) 7181 (funcall condition buffer-or-name arg)))
7182 (`(major-mode . ,mode) 7182 (`(major-mode . ,mode)
7183 (eq 7183 (eq
7184 (buffer-local-value 'major-mode buffer) 7184 (buffer-local-value 'major-mode buffer)
diff --git a/lisp/transient.el b/lisp/transient.el
index 96e711e950c..4affc414fa6 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -2516,17 +2516,22 @@ prefix argument and pivot to `transient-update'."
2516 2516
2517(defun transient--invalid (msg) 2517(defun transient--invalid (msg)
2518 (ding) 2518 (ding)
2519 (message "%s: `%s' (Use `%s' to abort, `%s' for help) [%s]" 2519 (message "%s: `%s' (Use `%s' to abort, `%s' for help)%s"
2520 msg 2520 msg
2521 (propertize (key-description (this-single-command-keys)) 2521 (propertize (key-description (this-single-command-keys))
2522 'face 'font-lock-warning-face) 2522 'face 'font-lock-warning-face)
2523 (propertize "C-g" 'face 'transient-key) 2523 (propertize "C-g" 'face 'transient-key)
2524 (propertize "?" 'face 'transient-key) 2524 (propertize "?" 'face 'transient-key)
2525 ;; `this-command' is `transient--undefined' or similar at this 2525 ;; `this-command' is `transient-undefined' or `transient-inapt'.
2526 ;; point. Show the command the user actually tried to invoke. 2526 ;; Show the command (`this-original-command') the user actually
2527 (propertize (symbol-name (transient--suffix-symbol 2527 ;; tried to invoke. For an anonymous inapt command that is a
2528 this-original-command)) 2528 ;; lambda expression, which cannot be mapped to a symbol, so
2529 'face 'font-lock-warning-face)) 2529 ;; forgo displaying the command.
2530 (if-let ((cmd (ignore-errors
2531 (symbol-name (transient--suffix-symbol
2532 this-original-command)))))
2533 (format " [%s]" (propertize cmd 'face 'font-lock-warning-face))
2534 ""))
2530 (unless (and transient--transient-map 2535 (unless (and transient--transient-map
2531 (memq transient--transient-map overriding-terminal-local-map)) 2536 (memq transient--transient-map overriding-terminal-local-map))
2532 (let ((transient--prefix (or transient--prefix 'sic))) 2537 (let ((transient--prefix (or transient--prefix 'sic)))
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 2b0eca7f5c2..e3c7d569ea6 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -3056,11 +3056,17 @@ function signals an error."
3056 (apply #'treesit--call-process-signal 3056 (apply #'treesit--call-process-signal
3057 (if (file-exists-p "scanner.cc") c++ cc) 3057 (if (file-exists-p "scanner.cc") c++ cc)
3058 nil t nil 3058 nil t nil
3059 `("-fPIC" "-shared" 3059 (if (eq system-type 'cygwin)
3060 ,@(directory-files 3060 `("-shared" "-Wl,-dynamicbase"
3061 default-directory nil 3061 ,@(directory-files
3062 (rx bos (+ anychar) ".o" eos)) 3062 default-directory nil
3063 "-o" ,lib-name)) 3063 (rx bos (+ anychar) ".o" eos))
3064 "-o" ,lib-name)
3065 `("-fPIC" "-shared"
3066 ,@(directory-files
3067 default-directory nil
3068 (rx bos (+ anychar) ".o" eos))
3069 "-o" ,lib-name)))
3064 ;; Copy out. 3070 ;; Copy out.
3065 (unless (file-exists-p out-dir) 3071 (unless (file-exists-p out-dir)
3066 (make-directory out-dir t)) 3072 (make-directory out-dir t))
diff --git a/lisp/window.el b/lisp/window.el
index 08ce8498655..d53136d406b 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -7510,8 +7510,8 @@ Its value takes effect before processing the ACTION argument of
7510If non-nil, this is an alist of elements (CONDITION . ACTION), 7510If non-nil, this is an alist of elements (CONDITION . ACTION),
7511where: 7511where:
7512 7512
7513 CONDITION is passed to `buffer-match-p', along with the buffer 7513 CONDITION is passed to `buffer-match-p', along with the name of
7514 that is to be displayed and the ACTION argument of 7514 the buffer that is to be displayed and the ACTION argument of
7515 `display-buffer', to check if ACTION should be used. 7515 `display-buffer', to check if ACTION should be used.
7516 7516
7517 ACTION is a cons cell (FUNCTIONS . ALIST), where FUNCTIONS is an 7517 ACTION is a cons cell (FUNCTIONS . ALIST), where FUNCTIONS is an
@@ -7568,12 +7568,16 @@ all fail. It should never be set by programs or users. See
7568(defun display-buffer-assq-regexp (buffer-or-name alist action) 7568(defun display-buffer-assq-regexp (buffer-or-name alist action)
7569 "Retrieve ALIST entry corresponding to buffer specified by BUFFER-OR-NAME. 7569 "Retrieve ALIST entry corresponding to buffer specified by BUFFER-OR-NAME.
7570This returns the cdr of the alist entry ALIST if the entry's 7570This returns the cdr of the alist entry ALIST if the entry's
7571key (its car) and BUFFER-OR-NAME satisfy `buffer-match-p', using 7571key (its car) and the name of the buffer designated by
7572the key as CONDITION argument of `buffer-match-p'. ACTION should 7572BUFFER-OR-NAME satisfy `buffer-match-p', using the key as
7573have the form of the action argument passed to `display-buffer'." 7573CONDITION argument of `buffer-match-p'. ACTION should have the
7574form of the action argument passed to `display-buffer'."
7574 (catch 'match 7575 (catch 'match
7575 (dolist (entry alist) 7576 (dolist (entry alist)
7576 (when (buffer-match-p (car entry) buffer-or-name action) 7577 (when (buffer-match-p (car entry) (if (stringp buffer-or-name)
7578 buffer-or-name
7579 (buffer-name buffer-or-name))
7580 action)
7577 (throw 'match (cdr entry)))))) 7581 (throw 'match (cdr entry))))))
7578 7582
7579(defvar display-buffer--same-window-action 7583(defvar display-buffer--same-window-action
diff --git a/src/nsterm.m b/src/nsterm.m
index 0e75cbf3f0f..46007ec4fcb 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -8573,6 +8573,10 @@ ns_in_echo_area (void)
8573 return self; 8573 return self;
8574} 8574}
8575 8575
8576- (BOOL) validateToolbarItem: (NSToolbarItem *) toolbarItem
8577{
8578 return [toolbarItem isEnabled];
8579}
8576 8580
8577- (instancetype)toggleToolbar: (id)sender 8581- (instancetype)toggleToolbar: (id)sender
8578{ 8582{
diff --git a/src/timefns.c b/src/timefns.c
index b3132e7bc34..87971cf4563 100644
--- a/src/timefns.c
+++ b/src/timefns.c
@@ -180,6 +180,15 @@ static timezone_t const utc_tz = 0;
180static struct tm * 180static struct tm *
181emacs_localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) 181emacs_localtime_rz (timezone_t tz, time_t const *t, struct tm *tm)
182{ 182{
183#ifdef WINDOWSNT
184 /* The Windows CRT functions are "optimized for speed", so they don't
185 check for timezone and DST changes if they were last called less
186 than 1 minute ago (see http://support.microsoft.com/kb/821231).
187 So all Emacs features that repeatedly call time functions (e.g.,
188 display-time) are in real danger of missing timezone and DST
189 changes. Calling tzset before each localtime call fixes that. */
190 tzset ();
191#endif
183 tm = localtime_rz (tz, t, tm); 192 tm = localtime_rz (tz, t, tm);
184 if (!tm && errno == ENOMEM) 193 if (!tm && errno == ENOMEM)
185 memory_full (SIZE_MAX); 194 memory_full (SIZE_MAX);
diff --git a/src/treesit.c b/src/treesit.c
index 36a297ec7da..fd5fda78133 100644
--- a/src/treesit.c
+++ b/src/treesit.c
@@ -1016,11 +1016,6 @@ treesit_call_after_change_functions (TSTree *old_tree, TSTree *new_tree,
1016static void 1016static void
1017treesit_ensure_parsed (Lisp_Object parser) 1017treesit_ensure_parsed (Lisp_Object parser)
1018{ 1018{
1019 /* Make sure this comes before everything else, see comment
1020 (ref:notifier-inside-ensure-parsed) for more detail. */
1021 if (!XTS_PARSER (parser)->need_reparse)
1022 return;
1023
1024 struct buffer *buffer = XBUFFER (XTS_PARSER (parser)->buffer); 1019 struct buffer *buffer = XBUFFER (XTS_PARSER (parser)->buffer);
1025 1020
1026 /* Before we parse, catch up with the narrowing situation. */ 1021 /* Before we parse, catch up with the narrowing situation. */
@@ -1029,6 +1024,11 @@ treesit_ensure_parsed (Lisp_Object parser)
1029 because it might set the flag to true. */ 1024 because it might set the flag to true. */
1030 treesit_sync_visible_region (parser); 1025 treesit_sync_visible_region (parser);
1031 1026
1027 /* Make sure this comes before everything else, see comment
1028 (ref:notifier-inside-ensure-parsed) for more detail. */
1029 if (!XTS_PARSER (parser)->need_reparse)
1030 return;
1031
1032 TSParser *treesit_parser = XTS_PARSER (parser)->parser; 1032 TSParser *treesit_parser = XTS_PARSER (parser)->parser;
1033 TSTree *tree = XTS_PARSER (parser)->tree; 1033 TSTree *tree = XTS_PARSER (parser)->tree;
1034 TSInput input = XTS_PARSER (parser)->input; 1034 TSInput input = XTS_PARSER (parser)->input;
diff --git a/test/Makefile.in b/test/Makefile.in
index f4b85e7dfe5..e2a14c4dd92 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -124,7 +124,14 @@ test_module_dir := src/emacs-module-resources
124 124
125all: check 125all: check
126 126
127ifeq ($(HAVE_NATIVE_COMP),yes) 127SYSTEM_TYPE = @SYSTEM_TYPE@
128TEST_NATIVE_COMP = $(HAVE_NATIVE_COMP)
129# Avoid fork failures on Cygwin. See bug#62450 and etc/PROBLEMS
130# ("Fork failures in a build with native compilation").
131ifeq ($(SYSTEM_TYPE),cygwin)
132TEST_NATIVE_COMP = no
133endif
134ifeq ($(TEST_NATIVE_COMP),yes)
128SELECTOR_DEFAULT = (not (or (tag :expensive-test) (tag :unstable))) 135SELECTOR_DEFAULT = (not (or (tag :expensive-test) (tag :unstable)))
129SELECTOR_EXPENSIVE = (not (tag :unstable)) 136SELECTOR_EXPENSIVE = (not (tag :unstable))
130SELECTOR_ALL = t 137SELECTOR_ALL = t
diff --git a/test/infra/Dockerfile.emba b/test/infra/Dockerfile.emba
index 163fc582e6f..9377a3b5f87 100644
--- a/test/infra/Dockerfile.emba
+++ b/test/infra/Dockerfile.emba
@@ -64,7 +64,7 @@ FROM emacs-base as emacs-eglot
64 64
65RUN apt-get update && \ 65RUN apt-get update && \
66 apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \ 66 apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \
67 snapd wget lsb_release add-apt-repository gpg \ 67 snapd wget lsb-release software-properties-common gpg \
68 && rm -rf /var/lib/apt/lists/* 68 && rm -rf /var/lib/apt/lists/*
69 69
70# A recent clangd. It must be at least clangd 14, which is in Debian 70# A recent clangd. It must be at least clangd 14, which is in Debian
@@ -73,8 +73,8 @@ RUN bash -c "$(wget --no-check-certificate -O - https://apt.llvm.org/llvm.sh)"
73 73
74# A recent pylsp. Since Debian bookworm there is the package 74# A recent pylsp. Since Debian bookworm there is the package
75# python3-pylsp. 75# python3-pylsp.
76RUN snap install core 76# RUN snap install core
77RUN snap install pylsp 77# RUN snap install pylsp
78 78
79COPY . /checkout 79COPY . /checkout
80WORKDIR /checkout 80WORKDIR /checkout
@@ -100,7 +100,7 @@ FROM emacs-base as emacs-native-comp
100# The libgccjit version must correspond to the gcc version. 100# The libgccjit version must correspond to the gcc version.
101RUN apt-get update && \ 101RUN apt-get update && \
102 apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \ 102 apt-get install -y --no-install-recommends -o=Dpkg::Use-Pty=0 \
103 libgccjit-10-dev \ 103 libgccjit-10-dev zlib1g-dev \
104 && rm -rf /var/lib/apt/lists/* 104 && rm -rf /var/lib/apt/lists/*
105 105
106FROM emacs-native-comp as emacs-native-comp-speed0 106FROM emacs-native-comp as emacs-native-comp-speed0
diff --git a/test/infra/gitlab-ci.yml b/test/infra/gitlab-ci.yml
index b000f128278..d1fef0187d4 100644
--- a/test/infra/gitlab-ci.yml
+++ b/test/infra/gitlab-ci.yml
@@ -256,24 +256,22 @@ test-eglot:
256 # This is needed in order to get a JUnit test report. 256 # This is needed in order to get a JUnit test report.
257 make_params: '-k -C test check-expensive LOGFILES="lisp/progmodes/eglot-tests.log"' 257 make_params: '-k -C test check-expensive LOGFILES="lisp/progmodes/eglot-tests.log"'
258 258
259# The next two jobs are commented out due to bug#62210. 259build-image-gnustep:
260 260 stage: platform-images
261# build-image-gnustep: 261 extends: [.job-template, .build-template, .gnustep-template]
262# stage: platform-images 262 variables:
263# extends: [.job-template, .build-template, .gnustep-template] 263 target: emacs-gnustep
264# variables:
265# target: emacs-gnustep
266 264
267# test-gnustep: 265test-gnustep:
268# # This tests the GNUstep build process. 266 # This tests the GNUstep build process.
269# stage: platforms 267 stage: platforms
270# extends: [.job-template, .gnustep-template] 268 extends: [.job-template, .gnustep-template]
271# needs: 269 needs:
272# - job: build-image-gnustep 270 - job: build-image-gnustep
273# optional: true 271 optional: true
274# variables: 272 variables:
275# target: emacs-gnustep 273 target: emacs-gnustep
276# make_params: install 274 make_params: install
277 275
278# The next two jobs are commented out due to high workload on 276# The next two jobs are commented out due to high workload on
279# emba.gnu.org. 277# emba.gnu.org.
diff --git a/test/lisp/emacs-lisp/benchmark-tests.el b/test/lisp/emacs-lisp/benchmark-tests.el
index 31357f24a0d..99b5b142c37 100644
--- a/test/lisp/emacs-lisp/benchmark-tests.el
+++ b/test/lisp/emacs-lisp/benchmark-tests.el
@@ -23,6 +23,10 @@
23(require 'ert) 23(require 'ert)
24 24
25(ert-deftest benchmark-tests () 25(ert-deftest benchmark-tests ()
26 ;; Avoid fork failures on Cygwin. See bug#62450 and etc/PROBLEMS
27 ;; ("Fork failures in a build with native compilation").
28 (skip-unless (not (and (eq system-type 'cygwin)
29 (featurep 'native-compile))))
26 (let (str t-long t-short m) 30 (let (str t-long t-short m)
27 (should (consp (benchmark-run nil (setq m (1+ 0))))) 31 (should (consp (benchmark-run nil (setq m (1+ 0)))))
28 (should (consp (benchmark-run 1 (setq m (1+ 0))))) 32 (should (consp (benchmark-run 1 (setq m (1+ 0)))))
diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
index ed4a08da6ab..50153e66da5 100644
--- a/test/lisp/progmodes/python-tests.el
+++ b/test/lisp/progmodes/python-tests.el
@@ -5940,6 +5940,26 @@ def func():
5940 (equal (list (python-tests-look-at "if (" -1 t)) 5940 (equal (list (python-tests-look-at "if (" -1 t))
5941 (python-info-dedenter-opening-block-positions))))) 5941 (python-info-dedenter-opening-block-positions)))))
5942 5942
5943(ert-deftest python-info-dedenter-opening-block-positions-7 ()
5944 "Test case blocks."
5945 (python-tests-with-temp-buffer
5946 "
5947match a:
5948 case 1:
5949 match b:
5950 case 2:
5951 something()
5952 case 3:
5953"
5954 (python-tests-look-at "case 1:")
5955 (should-not (python-info-dedenter-opening-block-positions))
5956 (python-tests-look-at "case 2:")
5957 (should-not (python-info-dedenter-opening-block-positions))
5958 (python-tests-look-at "case 3:")
5959 (equal (list (python-tests-look-at "case 2:" -1)
5960 (python-tests-look-at "case 1:" -1 t))
5961 (python-info-dedenter-opening-block-positions))))
5962
5943(ert-deftest python-info-dedenter-opening-block-message-1 () 5963(ert-deftest python-info-dedenter-opening-block-message-1 ()
5944 "Test dedenters inside strings are ignored." 5964 "Test dedenters inside strings are ignored."
5945 (python-tests-with-temp-buffer 5965 (python-tests-with-temp-buffer
@@ -6125,6 +6145,24 @@ elif b:
6125 (point)) 6145 (point))
6126 (python-info-dedenter-statement-p))))) 6146 (python-info-dedenter-statement-p)))))
6127 6147
6148(ert-deftest python-info-dedenter-statement-p-6 ()
6149 "Test case keyword."
6150 (python-tests-with-temp-buffer
6151 "
6152match a: # Comment
6153 case 1:
6154 match b:
6155 case 2:
6156 something()
6157 case 3:
6158"
6159 (python-tests-look-at "case 1:")
6160 (should-not (python-info-dedenter-statement-p))
6161 (python-tests-look-at "case 2:")
6162 (should-not (python-info-dedenter-statement-p))
6163 (python-tests-look-at "case 3:")
6164 (should (= (point) (python-info-dedenter-statement-p)))))
6165
6128(ert-deftest python-info-line-ends-backslash-p-1 () 6166(ert-deftest python-info-line-ends-backslash-p-1 ()
6129 (python-tests-with-temp-buffer 6167 (python-tests-with-temp-buffer
6130 " 6168 "
diff --git a/test/lisp/progmodes/ruby-ts-mode-tests.el b/test/lisp/progmodes/ruby-ts-mode-tests.el
index e0d9f1b5c50..11125dc5cd3 100644
--- a/test/lisp/progmodes/ruby-ts-mode-tests.el
+++ b/test/lisp/progmodes/ruby-ts-mode-tests.el
@@ -281,6 +281,31 @@ The whitespace before and including \"|\" on each line is removed."
281 (file-truename 281 (file-truename
282 (expand-file-name (format "ruby-mode-resources/%s" ,file)))))) 282 (expand-file-name (format "ruby-mode-resources/%s" ,file))))))
283 283
284(ert-deftest ruby-ts-imenu-index ()
285 (ruby-ts-with-temp-buffer
286 (ruby-ts-test-string
287 "module Foo
288 | class Blub
289 | def hi
290 | 'Hi!'
291 | end
292 |
293 | def bye
294 | 'Bye!'
295 | end
296 |
297 | private def self.hiding
298 | 'You can't see me'
299 | end
300 | end
301 |end")
302 (should (equal (mapcar #'car (ruby-ts--imenu))
303 '("Foo"
304 "Foo::Blub"
305 "Foo::Blub#hi"
306 "Foo::Blub#bye"
307 "Foo::Blub.hiding")))))
308
284(defmacro ruby-ts-deftest-indent (file) 309(defmacro ruby-ts-deftest-indent (file)
285 `(ert-deftest ,(intern (format "ruby-ts-indent-test/%s" file)) () 310 `(ert-deftest ,(intern (format "ruby-ts-indent-test/%s" file)) ()
286 ;; :tags '(:expensive-test) 311 ;; :tags '(:expensive-test)
diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el
index 0321b92d0bc..6f79d3277a8 100644
--- a/test/src/fns-tests.el
+++ b/test/src/fns-tests.el
@@ -254,7 +254,7 @@
254 (should (string-collate-equalp "xyzzy" "XYZZY" nil t)) 254 (should (string-collate-equalp "xyzzy" "XYZZY" nil t))
255 255
256 ;; Locale must be valid. 256 ;; Locale must be valid.
257 (should-error (string-collate-equalp "xyzzy" "xyzzy" "en_DE.UTF-8"))) 257 (should-error (string-collate-equalp "xyzzy" "xyzzy" "en_XY.UTF-8")))
258 258
259;; There must be a check for valid codepoints. (Check not implemented yet) 259;; There must be a check for valid codepoints. (Check not implemented yet)
260; (should-error 260; (should-error