diff options
| author | Po Lu | 2023-03-28 09:41:22 +0800 |
|---|---|---|
| committer | Po Lu | 2023-03-28 09:41:22 +0800 |
| commit | 64206ee3af9b59da9591aae400439bdea2cda09f (patch) | |
| tree | 88c333f058f0afac551daca0d8cf2f2e9d8012ea | |
| parent | 05f3f9c1c09c3e7a4d9c1d9ac16a34742a4124c1 (diff) | |
| parent | 66b4394461589d0db8690b7971000f687bd3ad57 (diff) | |
| download | emacs-64206ee3af9b59da9591aae400439bdea2cda09f.tar.gz emacs-64206ee3af9b59da9591aae400439bdea2cda09f.zip | |
Merge remote-tracking branch 'origin/master' into feature/android
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 |
| 497 | cannot promise to fix it, or always to agree that it is a bug, but we | 497 | cannot promise to fix it, or always to agree that it is a bug, but we |
| 498 | certainly want to hear about it. The same applies for new features | 498 | certainly want to hear about it. The same applies for new features |
| 499 | you would like to see added. The following sections will help you to | 499 | you would like to see added. This section will help you to determine |
| 500 | construct an effective bug report. | 500 | whether you found a bug, and if so, construct an effective bug report. |
| 501 | |||
| 502 | The general procedure when you find something that could be a bug is | ||
| 503 | as follows: | ||
| 504 | |||
| 505 | @itemize @bullet | ||
| 506 | @item | ||
| 507 | See if what you found is a known problem or a bug that was already | ||
| 508 | reported and/or fixed. @xref{Known Problems}, where you will find how | ||
| 509 | to look for known problems and bugs. | ||
| 510 | |||
| 511 | @item | ||
| 512 | If you are unsure whether the behavior you see is a bug, see @ref{Bug | ||
| 513 | Criteria}, which tells what we consider as clear bugs in Emacs. | ||
| 514 | |||
| 515 | @item | ||
| 516 | Once you decide you found a bug, see @ref{Understanding Bug | ||
| 517 | Reporting}, which helps you in describing what you see in the most | ||
| 518 | efficient manner, making our job of reproducing the issue and | ||
| 519 | investigating it easier. | ||
| 520 | |||
| 521 | @item | ||
| 522 | Next, see @ref{Checklist, Checklist for Bug Reports}, where we | ||
| 523 | describe in detail how to submit a bug report and what information to | ||
| 524 | include in it. In a nutshell, you submit a bug report via electronic | ||
| 525 | mail using the Emacs command @code{report-emacs-bug}, which assists | ||
| 526 | you in doing so. Submitting a bug report starts the process of | ||
| 527 | investigating and fixing the bug, where you will receive copies of | ||
| 528 | email messages discussing the bug, in which we might ask you to | ||
| 529 | provide more information, test possible fixes, etc. | ||
| 530 | |||
| 531 | @item | ||
| 532 | Finally, if you want to propose specific changes to Emacs, whether to | ||
| 533 | fix 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 |
| 514 | is already known about. Indeed, it may already have been fixed in a | 550 | we already know about it. Indeed, it may already have been fixed in a |
| 515 | later release of Emacs, or in the development version. Here is a list | 551 | later release of Emacs, or in the development version. Here is a list |
| 516 | of the main places you can read about known issues: | 552 | of 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 |
| 520 | The @file{etc/PROBLEMS} file; type @kbd{C-h C-p} to read it. This | 556 | The @file{etc/PROBLEMS} file; type @kbd{C-h C-p} to read it. This |
| 521 | file contains a list of particularly well-known issues that have been | 557 | file contains a list of particularly well-known issues that have been |
| 522 | encountered in compiling, installing and running Emacs. Often, there | 558 | encountered in compiling, installing and running Emacs, with special |
| 523 | are suggestions for workarounds and solutions. | 559 | emphasis on issues caused by other software that cannot be easily |
| 560 | solved in Emacs. Often, you will find there suggestions for | ||
| 561 | workarounds 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 |
| 527 | The GNU Bug Tracker at @url{https://debbugs.gnu.org}. Emacs bugs are | 567 | The GNU Bug Tracker at @url{https://debbugs.gnu.org}. Emacs bugs and |
| 528 | filed in the tracker under the @samp{emacs} package. The tracker | 568 | issues are filed in the tracker under the @samp{emacs} package. The |
| 529 | records information about the status of each bug, the initial bug | 569 | tracker records information about the status of each bug, the initial |
| 530 | report, and the follow-up messages by the bug reporter and Emacs | 570 | bug report, and the follow-up messages by the bug reporter and Emacs |
| 531 | developers. You can search for bugs by subject, severity, and other | 571 | developers who participate in discussing and fixing the bug. You can |
| 532 | criteria. | 572 | search for bugs by subject, severity, and other criteria. For more |
| 573 | complex search criteria, use | ||
| 574 | @url{https://debbugs.gnu.org/cgi/search.cgi}. | ||
| 533 | 575 | ||
| 534 | @cindex debbugs package | 576 | @cindex debbugs package |
| 535 | Instead of browsing the bug tracker as a webpage, you can browse it | 577 | Instead of browsing the bug tracker as a web page, you can browse it |
| 536 | from Emacs using the @code{debbugs} package, which can be downloaded | 578 | from Emacs using the @code{debbugs} package, which can be downloaded |
| 537 | via the Package Menu (@pxref{Packages}). This package provides the | 579 | via the Package Menu (@pxref{Packages}). This package provides the |
| 538 | command @kbd{M-x debbugs-gnu} to list bugs, and @kbd{M-x | 580 | command @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 | |||
| 558 | for bug reports in development (i.e., not yet released) versions of | 600 | for bug reports in development (i.e., not yet released) versions of |
| 559 | Emacs. You can read the archives for 2003 to mid 2007 at | 601 | Emacs. 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, |
| 561 | it is an alias for @samp{bug-gnu-emacs}. | 603 | email messages sent to this list are redirected to |
| 604 | @samp{bug-gnu-emacs}. | ||
| 562 | 605 | ||
| 563 | @item | 606 | @item |
| 564 | The @samp{emacs-devel} mailing list. Sometimes people report bugs to | 607 | The @samp{emacs-devel} mailing list. Sometimes people report bugs to |
| 565 | this mailing list. This is not the main purpose of the list, however, | 608 | this mailing list. This is not the main purpose of the list, however, |
| 566 | and it is much better to send bug reports to the bug list. You should | 609 | and it is much better to send bug reports to the bug list. You should |
| 567 | not feel obliged to read this list before reporting a bug. | 610 | not 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, |
| 635 | and to report it in a way which is useful. What is most useful is an | 677 | and to report it in a way which is useful. What is most useful is an |
| 636 | exact description of what commands you type, starting with the shell | 678 | exact description of what commands you type, starting with the shell |
| 637 | command to run Emacs, until the problem happens. | 679 | command to run Emacs, until the problem happens, and the effects |
| 680 | produced 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 |
| 641 | for the detailed raw data. Reporting the facts is straightforward, | 684 | for the detailed raw data. Reporting the facts is straightforward, |
| 642 | but many people strain to posit explanations and report them instead | 685 | but many people strain to posit explanations and report them instead |
| 643 | of the facts. If the explanations are based on guesses about how | 686 | of the facts. If the explanations are based on guesses about how |
| 644 | Emacs is implemented, they will be useless; meanwhile, lacking the | 687 | Emacs is implemented, they night not be useful; meanwhile, lacking the |
| 645 | facts, we will have no real information about the bug. If you want to | 688 | facts, we will have no real information about the bug. If you want to |
| 646 | actually @emph{debug} the problem, and report explanations that are | 689 | actually @emph{debug} the problem, and report explanations that are |
| 647 | more than guesses, that is useful---but please include the raw facts | 690 | more 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 | |||
| 661 | file with a @samp{z} in its name. | 704 | file 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}. |
| 664 | Similarly, rather than saying ``if I have three characters on the | 707 | That's because a file can be visited in more than one way, and there's |
| 665 | line'', say ``after I type @kbd{@key{RET} A B C @key{RET} C-p}'', if | 708 | no certainty that all of them reproduce the problem. Similarly, |
| 666 | that is the way you entered the text. | 709 | rather 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 | ||
| 711 | way you entered the text---that is, tell us about the text which in | ||
| 712 | your 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 |
| 670 | customizations; @pxref{Initial Options}), and repeating the steps that | 716 | customizations; @pxref{Initial Options}), and repeating the steps that |
| 671 | you took to trigger the bug. If you can reproduce the bug this way, | 717 | you took to trigger the bug. If you can reproduce the bug this way, |
| 672 | that rules out bugs in your personal customizations. Then your bug | 718 | that rules out bugs in your personal customizations and makes the bug |
| 673 | report should begin by stating that you started Emacs with | 719 | much easier to reproduce. Then your bug report should begin by |
| 674 | @command{emacs -Q}, followed by the exact sequence of steps for | 720 | stating that you started Emacs with @command{emacs -Q}, followed by |
| 675 | reproducing the bug. If possible, inform us of the exact contents of | 721 | the exact sequence of steps for reproducing the bug. If possible, |
| 676 | any file that is needed to reproduce the bug. | 722 | inform us of the exact contents of any file that is needed to |
| 723 | reproduce 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 |
| 679 | easily reproducible at all. In that case, you should report what you | 726 | easily 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 |
| 692 | been reported (@pxref{Known Problems}). | 740 | been reported (@pxref{Known Problems}). |
| @@ -706,7 +754,7 @@ information; you should still read and follow the guidelines below, so | |||
| 706 | you can enter the other crucial information by hand before you send | 754 | you can enter the other crucial information by hand before you send |
| 707 | the message. You may feel that some of the information inserted by | 755 | the 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 |
| 709 | absolutely sure it is best to leave it, so that the developers can | 757 | absolutely sure, it is best to leave it, so that the developers can |
| 710 | decide for themselves. | 758 | decide for themselves. |
| 711 | 759 | ||
| 712 | When you have finished writing your report, type @kbd{C-c C-c} and it | 760 | When 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 | |||
| 721 | text of your report to your normal mail client (if your system | 769 | text of your report to your normal mail client (if your system |
| 722 | supports it, you can type @kbd{C-c M-i} to have Emacs do this for you) | 770 | supports it, you can type @kbd{C-c M-i} to have Emacs do this for you) |
| 723 | and send it to that address. Or you can simply send an email to that | 771 | and send it to that address. Or you can simply send an email to that |
| 724 | address describing the problem. | 772 | address describing the problem, including the necessary information |
| 773 | mentioned below. | ||
| 725 | 774 | ||
| 726 | If you want to submit code to Emacs (to fix a problem or implement a | 775 | If you want to submit code to Emacs (to fix a problem or implement a |
| 727 | new feature), the easiest way to do this is to send a patch to the | 776 | new feature), the easiest way to do this is to send a patch to the |
| 728 | Emacs issue tracker. This is done with the @kbd{M-x | 777 | Emacs issue tracker. Use the @kbd{M-x submit-emacs-patch} command for |
| 729 | submit-emacs-patch} command, and works much the same as when reporting | 778 | that, which works much the same as when reporting bugs; @pxref{Sending |
| 730 | bugs. | 779 | Patches}. |
| 731 | 780 | ||
| 732 | In any case, your report will be sent to the @samp{bug-gnu-emacs} | 781 | In any case, your report will be sent to the @samp{bug-gnu-emacs} |
| 733 | mailing list, and stored in the GNU Bug Tracker at | 782 | mailing 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 |
| 735 | address, in case we need to ask you for more information about your | 784 | address, in case we need to ask you for more information about your |
| 736 | report. Submissions are moderated, so there may be a delay before | 785 | report. Submissions are moderated, so there may be a delay before |
| 737 | your report appears. | 786 | your report actually appears on the tracker. |
| 738 | 787 | ||
| 739 | You do not need to know how the GNU Bug Tracker works in order to | 788 | You do not need to know how the GNU Bug Tracker works in order to |
| 740 | report a bug, but if you want to, you can read the tracker's online | 789 | report a bug, but if you want to, you can read the tracker's |
| 741 | documentation to see the various features you can use. | 790 | @uref{https://debbugs.gnu.org/Advanced.html, online documentation} to |
| 791 | see the various features you can use. | ||
| 742 | 792 | ||
| 743 | All mail sent to the @samp{bug-gnu-emacs} mailing list is also | 793 | All mail sent to the @samp{bug-gnu-emacs} mailing list is also |
| 744 | gatewayed to the @samp{gnu.emacs.bug} newsgroup. The reverse is also | 794 | gatewayed to the @samp{gnu.emacs.bug} newsgroup. The reverse is also |
| @@ -749,55 +799,43 @@ tracker. | |||
| 749 | 799 | ||
| 750 | If your data is more than 500,000 bytes, please don't include it | 800 | If your data is more than 500,000 bytes, please don't include it |
| 751 | directly in the bug report; instead, offer to send it on request, or | 801 | directly in the bug report; instead, offer to send it on request, or |
| 752 | make it available online and say where. | 802 | make it available online and say where. Large attachments are best |
| 803 | sent compressed. | ||
| 753 | 804 | ||
| 754 | The GNU Bug Tracker will assign a bug number to your report; please | 805 | The GNU Bug Tracker will assign a bug number to your report; please |
| 755 | use it in the following discussions. | 806 | use it in the following discussions, keeping the bug address in the |
| 807 | list of recipients, so that the bug discussion is recorded by the | ||
| 808 | tracker. The bug address will look like | ||
| 809 | @samp{@var{nnnnn}@@debbugs.gnu.org}, where @var{nnnnn} is the bug | ||
| 810 | number. | ||
| 756 | 811 | ||
| 757 | To enable maintainers to investigate a bug, your report | 812 | To enable maintainers to investigate a bug, your report |
| 758 | should include all these things: | 813 | should include all these things: |
| 759 | 814 | ||
| 760 | @itemize @bullet | 815 | @itemize @bullet |
| 761 | @item | 816 | @item |
| 762 | The version number of Emacs. Without this, we won't know whether there is any | 817 | A description of what behavior you observe that you believe is |
| 763 | point in looking for the bug in the current version of GNU Emacs. | 818 | incorrect. 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, | ||
| 767 | but if you are not using that command for your report you can get the | ||
| 768 | version number by typing @kbd{M-x emacs-version @key{RET}}. If that | ||
| 769 | command does not work, you probably have something other than GNU | ||
| 770 | Emacs, so you will have to report the bug somewhere else. | ||
| 771 | |||
| 772 | @item | ||
| 773 | The type of machine you are using, and the operating system name and | ||
| 774 | version number (again, automatically included by @w{@kbd{M-x | ||
| 775 | report-emacs-bug}}). @w{@kbd{M-x emacs-version @key{RET}}} provides | ||
| 776 | this information too. Copy its output from the @file{*Messages*} | ||
| 777 | buffer, 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 | ||
| 779 | information into the current buffer. | ||
| 780 | |||
| 781 | @item | ||
| 782 | The operands given to the @code{configure} command when Emacs was | ||
| 783 | installed (automatically included by @kbd{M-x report-emacs-bug}). | ||
| 784 | |||
| 785 | @item | ||
| 786 | A 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 | ||
| 788 | unmodified Emacs. But if you've made modifications and you don't tell | ||
| 789 | us, you are sending us on a wild goose chase.) | ||
| 790 | 820 | ||
| 791 | Be precise about these changes. A description in English is not | 821 | Of course, if the bug is that Emacs gets a fatal signal, then one can't |
| 792 | enough---send a unified context diff for them. | 822 | miss it. But if the bug is incorrect text, the maintainer might fail to |
| 823 | notice what is wrong. Why leave it to chance? | ||
| 793 | 824 | ||
| 794 | Adding files of your own, or porting to another machine, is a | 825 | Even if the problem you experience is a fatal signal, you should still |
| 795 | modification of the source. | 826 | say so explicitly. Suppose something strange is going on, such as, your |
| 827 | copy of the source is out of sync, or you have encountered a bug in the | ||
| 828 | C library on your system. (This has happened!) Your copy might crash | ||
| 829 | and the copy here might not. If you @emph{said} to expect a crash, then | ||
| 830 | when Emacs here fails to crash, we would know that the bug was not | ||
| 831 | happening. If you don't say to expect a crash, then we would not know | ||
| 832 | whether the bug was happening---we would not be able to draw any | ||
| 833 | conclusion from our observations. | ||
| 796 | 834 | ||
| 797 | @item | 835 | Usually, description of the behavior and of the way to reproduce the |
| 798 | Details of any other deviations from the standard procedure for installing | 836 | problem needs to specify one or more of the following aspects: |
| 799 | GNU Emacs. | ||
| 800 | 837 | ||
| 838 | @itemize @minus | ||
| 801 | @item | 839 | @item |
| 802 | The complete text of any files needed to reproduce the bug. | 840 | The 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 | |||
| 825 | file. | 863 | file. |
| 826 | 864 | ||
| 827 | @item | 865 | @item |
| 866 | If the bug is that the Emacs Manual or the Emacs Lisp Reference Manual | ||
| 867 | fails to describe the actual behavior of Emacs, or that the text is | ||
| 868 | confusing, copy in the text from the manual which you think is | ||
| 869 | at fault. If the section is small, just the section name is enough. | ||
| 870 | |||
| 871 | @item | ||
| 872 | If the manifestation of the bug is an Emacs error message, it is | ||
| 873 | important to report the precise text of the error message, and a | ||
| 874 | backtrace showing how the Lisp program in Emacs arrived at the error. | ||
| 875 | |||
| 876 | To get the error message text accurately, copy it from the | ||
| 877 | @file{*Messages*} buffer into the bug report. Copy all of it, not just | ||
| 878 | part. | ||
| 879 | |||
| 880 | @item | ||
| 881 | Check whether any programs you have loaded into the Lisp world, | ||
| 882 | including your initialization file, set any variables that may affect | ||
| 883 | the functioning of Emacs. Also, see whether the problem happens in a | ||
| 884 | freshly started Emacs without loading your initialization file (start | ||
| 885 | Emacs with the @code{-Q} switch to prevent loading the init files). | ||
| 886 | If the problem does @emph{not} occur then, you must report the precise | ||
| 887 | contents of any programs that you must load into the Lisp world in | ||
| 888 | order to cause the problem to occur. | ||
| 889 | |||
| 890 | @item | ||
| 891 | If the problem does depend on an init file or other Lisp programs that | ||
| 892 | are not part of the standard Emacs system, then you should make sure it | ||
| 893 | is not a bug in those programs by complaining to their maintainers | ||
| 894 | first. After they verify that they are using Emacs in a way that is | ||
| 895 | supposed to work, they should report the bug. | ||
| 896 | |||
| 897 | @item | ||
| 898 | If you wish to mention something in the GNU Emacs source, show the line | ||
| 899 | of code with a few lines of context. Don't just give a line number. | ||
| 900 | |||
| 901 | The line numbers in the development sources don't match those in your | ||
| 902 | sources. It would take extra work for the maintainers to determine what | ||
| 903 | code is in your version at a given line number, and we could not be | ||
| 904 | certain. | ||
| 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 | |||
| 834 | not identical on all machines), and the output that Emacs actually | 913 | not identical on all machines), and the output that Emacs actually |
| 835 | sent to the terminal. | 914 | sent to the terminal. |
| 836 | 915 | ||
| 837 | The way to collect the terminal output is to execute the Lisp expression | 916 | The way to collect the terminal output is to invoke the command |
| 917 | @kbd{M-x open-termscript} just after starting Emacs; it will prompt | ||
| 918 | you for the name of the file where to record all terminal output until | ||
| 919 | the Emacs process is killed. If the problem happens when Emacs starts | ||
| 920 | up, 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 |
| 844 | using @kbd{M-:} or from the @file{*scratch*} buffer just after | 927 | into your Emacs initialization file so that the termscript file will |
| 845 | starting Emacs. From then on, Emacs copies all terminal output to the | 928 | be open when Emacs displays the screen for the first time. |
| 846 | specified termscript file as well, until the Emacs process is killed. | ||
| 847 | If the problem happens when Emacs starts up, put this expression into | ||
| 848 | your Emacs initialization file so that the termscript file will be | ||
| 849 | open when Emacs displays the screen for the first time. | ||
| 850 | 929 | ||
| 851 | Be warned: it is often difficult, and sometimes impossible, to fix a | 930 | Be warned: it is often difficult, and sometimes impossible, to fix a |
| 852 | terminal-dependent bug without access to a terminal of the type that | 931 | terminal-dependent bug without access to a terminal of the type that |
| 853 | stimulates the bug. | 932 | stimulates the bug. |
| 933 | @end itemize | ||
| 934 | |||
| 935 | @item | ||
| 936 | The version number of Emacs. Without this, we won't know whether there is any | ||
| 937 | point 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, | ||
| 941 | but if you are not using that command for your report you can get the | ||
| 942 | version number by typing @kbd{M-x emacs-version @key{RET}}. If that | ||
| 943 | command does not work, you probably have something other than GNU | ||
| 944 | Emacs, so you will have to report the bug somewhere else. | ||
| 945 | |||
| 946 | @item | ||
| 947 | The type of machine you are using, and the operating system name and | ||
| 948 | version number (again, automatically included by @w{@kbd{M-x | ||
| 949 | report-emacs-bug}}). @w{@kbd{M-x emacs-version @key{RET}}} provides | ||
| 950 | this information too. Copy its output from the @file{*Messages*} | ||
| 951 | buffer, 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 | ||
| 953 | information into the current buffer. | ||
| 954 | |||
| 955 | @item | ||
| 956 | The command-line arguments given to the @code{configure} command when | ||
| 957 | Emacs was built (automatically included by @kbd{M-x | ||
| 958 | report-emacs-bug}). | ||
| 959 | |||
| 960 | @item | ||
| 961 | A 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 | ||
| 963 | unmodified Emacs. But if you've made modifications and you don't tell | ||
| 964 | us, you are sending us on a wild goose chase.) | ||
| 965 | |||
| 966 | Be precise about these changes. A description in English is not | ||
| 967 | enough---send a unified context diff for them. | ||
| 968 | |||
| 969 | Adding files of your own, or porting to another machine, is a | ||
| 970 | modification of the source. | ||
| 971 | |||
| 972 | @item | ||
| 973 | Details of any other deviations from the standard procedure for installing | ||
| 974 | GNU Emacs. | ||
| 854 | 975 | ||
| 855 | @item | 976 | @item |
| 856 | If non-@acronym{ASCII} text or internationalization is relevant, the locale that | 977 | If non-@acronym{ASCII} text or internationalization is relevant, the locale that |
| 857 | was current when you started Emacs. On GNU/Linux and Unix systems, or | 978 | was current when you started Emacs. This is automatically included by @kbd{M-x |
| 979 | report-emacs-bug}; alternatively, on GNU/Linux and Unix systems, or | ||
| 858 | if you use a POSIX-style shell such as Bash, you can use this shell | 980 | if you use a POSIX-style shell such as Bash, you can use this shell |
| 859 | command to view the relevant values: | 981 | command 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 | ||
| 866 | Alternatively, use the @command{locale} command, if your system has it, | 988 | You can also use the @command{locale} command, if your system has it, |
| 867 | to display your locale settings. | 989 | to display your locale settings. |
| 990 | @end itemize | ||
| 868 | 991 | ||
| 869 | You can use the @kbd{M-!} command to execute these commands from | 992 | Here are some things that are not necessary in a bug report: |
| 870 | Emacs, and then copy the output from the @file{*Messages*} buffer into | ||
| 871 | the 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 | ||
| 873 | you can copy its output from the @file{*Messages*} buffer. | ||
| 874 | 993 | ||
| 994 | @itemize @bullet | ||
| 875 | @item | 995 | @item |
| 876 | A description of what behavior you observe that you believe is | 996 | A description of the envelope of the bug---this is not necessary for a |
| 877 | incorrect. For example, ``The Emacs process gets a fatal signal'', or, | 997 | reproducible bug. |
| 878 | ``The resulting text is as follows, which I think is wrong.'' | ||
| 879 | 998 | ||
| 880 | Of course, if the bug is that Emacs gets a fatal signal, then one can't | 999 | Often people who encounter a bug spend a lot of time investigating |
| 881 | miss it. But if the bug is incorrect text, the maintainer might fail to | 1000 | which changes to the input file will make the bug go away and which |
| 882 | notice what is wrong. Why leave it to chance? | 1001 | changes will not affect it. |
| 883 | 1002 | ||
| 884 | Even if the problem you experience is a fatal signal, you should still | 1003 | This is often time-consuming and not very useful, because the way we |
| 885 | say so explicitly. Suppose something strange is going on, such as, your | 1004 | will find the bug is by running a single example under the debugger |
| 886 | copy of the source is out of sync, or you have encountered a bug in the | 1005 | with breakpoints, not by pure deduction from a series of examples. |
| 887 | C library on your system. (This has happened!) Your copy might crash | 1006 | You might as well save time by not searching for additional examples. |
| 888 | and the copy here might not. If you @emph{said} to expect a crash, then | 1007 | It is better to send the bug report right away, go back to editing, |
| 889 | when Emacs here fails to crash, we would know that the bug was not | 1008 | and find another bug to report. |
| 890 | happening. If you don't say to expect a crash, then we would not know | 1009 | |
| 891 | whether the bug was happening---we would not be able to draw any | 1010 | Of course, if you can find a simpler example to report @emph{instead} of |
| 892 | conclusion from our observations. | 1011 | the original one, that is a convenience. Errors in the output will be |
| 1012 | easier to spot, running under the debugger will take less time, etc. | ||
| 1013 | |||
| 1014 | However, simplification is not vital; if you can't do this or don't have | ||
| 1015 | time to try, please report the bug with your original test case. | ||
| 893 | 1016 | ||
| 894 | @item | 1017 | @item |
| 895 | If the bug is that the Emacs Manual or the Emacs Lisp Reference Manual | 1018 | A core dump file. |
| 896 | fails to describe the actual behavior of Emacs, or that the text is | 1019 | |
| 897 | confusing, copy in the text from the manual which you think is | 1020 | Debugging the core dump might be useful, but it can only be done on |
| 898 | at fault. If the section is small, just the section name is enough. | 1021 | your machine, with your Emacs executable. Therefore, sending the core |
| 1022 | dump file to the Emacs maintainers won't be useful. Above all, don't | ||
| 1023 | include the core file in an email bug report! Such a large message | ||
| 1024 | can be extremely inconvenient. | ||
| 899 | 1025 | ||
| 900 | @item | 1026 | @item |
| 901 | If the manifestation of the bug is an Emacs error message, it is | 1027 | A system-call trace of Emacs execution. |
| 902 | important to report the precise text of the error message, and a | ||
| 903 | backtrace showing how the Lisp program in Emacs arrived at the error. | ||
| 904 | 1028 | ||
| 905 | To get the error message text accurately, copy it from the | 1029 | System-call traces are very useful for certain special kinds of |
| 906 | @file{*Messages*} buffer into the bug report. Copy all of it, not just | 1030 | debugging, but in most cases they give little useful information. It is |
| 907 | part. | 1031 | therefore strange that many people seem to think that @emph{the} way to |
| 1032 | report information about a crash is to send a system-call trace. Perhaps | ||
| 1033 | this is a habit formed from experience debugging programs that don't | ||
| 1034 | have source code or debugging symbols. | ||
| 1035 | |||
| 1036 | In most programs, a backtrace is normally far, far more informative than | ||
| 1037 | a system-call trace. Even in Emacs, a simple backtrace is generally | ||
| 1038 | more informative, though to give full information you should supplement | ||
| 1039 | the backtrace by displaying variable values and printing them as Lisp | ||
| 1040 | objects with @code{pr} (see above). | ||
| 1041 | |||
| 1042 | @item | ||
| 1043 | A patch for the bug. | ||
| 1044 | |||
| 1045 | A patch for the bug is useful if it is a good one. But don't omit the | ||
| 1046 | other information that a bug report needs, such as the test case, on | ||
| 1047 | the assumption that a patch is sufficient. We might see problems with | ||
| 1048 | your patch and decide to fix the problem another way, or we might not | ||
| 1049 | understand it at all. And if we can't understand what bug you are | ||
| 1050 | trying to fix, or why your patch should be an improvement, we mustn't | ||
| 1051 | install it. @xref{Sending Patches}, for guidelines on how to make it | ||
| 1052 | easy for us to understand and install your patches. | ||
| 1053 | |||
| 1054 | @item | ||
| 1055 | A guess about what the bug is or what it depends on. | ||
| 1056 | |||
| 1057 | Such guesses are usually wrong. Even experts can't guess right about | ||
| 1058 | such things without first using the debugger to find the facts. | ||
| 1059 | @end itemize | ||
| 1060 | |||
| 1061 | If you are willing to debug Emacs and provide additional information | ||
| 1062 | about 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 |
| 911 | To make a backtrace for the error, use @kbd{M-x toggle-debug-on-error} | 1066 | @itemize |
| 912 | before the error happens (that is to say, you must give that command | 1067 | @item |
| 913 | and then make the bug happen). This causes the error to start the Lisp | 1068 | If the bug manifests itself as an error message, try providing a Lisp |
| 914 | debugger, which shows you a backtrace. Copy the text of the | 1069 | backtrace for the error. To make a backtrace for the error, use |
| 915 | debugger's backtrace into the bug report. @xref{Edebug,, Edebug, | 1070 | @kbd{M-x toggle-debug-on-error} before the error happens (that is to |
| 916 | elisp, the Emacs Lisp Reference Manual}, for information on debugging | 1071 | say, you must give that command and then make the bug happen). This |
| 917 | Emacs Lisp programs with the Edebug package. | 1072 | causes the error to start the Lisp debugger, which shows you a |
| 1073 | backtrace. Copy the text of the debugger's backtrace into the bug | ||
| 1074 | report. @xref{Edebug,, Edebug, elisp, the Emacs Lisp Reference | ||
| 1075 | Manual}, for information on debugging Emacs Lisp programs with the | ||
| 1076 | Edebug package. | ||
| 918 | 1077 | ||
| 919 | This use of the debugger is possible only if you know how to make the | 1078 | This use of the debugger is possible only if you know how to make the |
| 920 | bug happen again. If you can't make it happen again, at least copy | 1079 | bug happen again. If you can't make it happen again, at least copy |
| 921 | the whole error message. | 1080 | the whole error message. |
| 922 | 1081 | ||
| 923 | @vindex debug-on-quit | 1082 | @vindex debug-on-quit |
| 1083 | @item | ||
| 924 | If Emacs appears to be stuck in an infinite loop or in a very long | 1084 | If Emacs appears to be stuck in an infinite loop or in a very long |
| 925 | operation, typing @kbd{C-g} with the variable @code{debug-on-quit} | 1085 | operation, typing @kbd{C-g} with the variable @code{debug-on-quit} |
| 926 | non-@code{nil} will start the Lisp debugger and show a backtrace. | 1086 | non-@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 | |||
| 934 | Emacs to cause it to enter the debugger. | 1094 | Emacs to cause it to enter the debugger. |
| 935 | 1095 | ||
| 936 | @item | 1096 | @item |
| 937 | Check whether any programs you have loaded into the Lisp world, | ||
| 938 | including your initialization file, set any variables that may affect | ||
| 939 | the functioning of Emacs. Also, see whether the problem happens in a | ||
| 940 | freshly started Emacs without loading your initialization file (start | ||
| 941 | Emacs with the @code{-Q} switch to prevent loading the init files). | ||
| 942 | If the problem does @emph{not} occur then, you must report the precise | ||
| 943 | contents of any programs that you must load into the Lisp world in | ||
| 944 | order to cause the problem to occur. | ||
| 945 | |||
| 946 | @item | ||
| 947 | If the problem does depend on an init file or other Lisp programs that | ||
| 948 | are not part of the standard Emacs system, then you should make sure it | ||
| 949 | is not a bug in those programs by complaining to their maintainers | ||
| 950 | first. After they verify that they are using Emacs in a way that is | ||
| 951 | supposed to work, they should report the bug. | ||
| 952 | |||
| 953 | @item | ||
| 954 | If you wish to mention something in the GNU Emacs source, show the line | ||
| 955 | of code with a few lines of context. Don't just give a line number. | ||
| 956 | |||
| 957 | The line numbers in the development sources don't match those in your | ||
| 958 | sources. It would take extra work for the maintainers to determine what | ||
| 959 | code is in your version at a given line number, and we could not be | ||
| 960 | certain. | ||
| 961 | |||
| 962 | @item | ||
| 963 | Additional information from a C debugger such as GDB might enable | 1097 | Additional information from a C debugger such as GDB might enable |
| 964 | someone to find a problem on a machine which he does not have available. | 1098 | someone to find a problem on a machine which he does not have available. |
| 965 | If you don't know how to use GDB, please read the GDB manual---it is not | 1099 | If 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, | |||
| 967 | including the GDB manual in online form, in most of the same places you | 1101 | including the GDB manual in online form, in most of the same places you |
| 968 | can find the Emacs distribution. To run Emacs under GDB, you should | 1102 | can find the Emacs distribution. To run Emacs under GDB, you should |
| 969 | switch to the @file{src} subdirectory in which Emacs was compiled, then | 1103 | switch to the @file{src} subdirectory in which Emacs was compiled, then |
| 970 | do @samp{gdb emacs}. It is important for the directory @file{src} to be | 1104 | type @kbd{gdb ./emacs}. It is important for the directory @file{src} to be |
| 971 | current so that GDB will read the @file{.gdbinit} file in this | 1105 | current so that GDB will read the @file{.gdbinit} file in this |
| 972 | directory. | 1106 | directory. (You can also tell GDB to read that file from inside GDB, |
| 1107 | by typing @kbd{source ./.gdbinit}.) | ||
| 973 | 1108 | ||
| 974 | However, you need to think when you collect the additional information | 1109 | However, you need to think when you collect the additional information |
| 975 | if you want it to show what causes the bug. | 1110 | if you want it to show what causes the bug. |
| @@ -1000,8 +1135,8 @@ are debugging a running process (not with a core dump). | |||
| 1000 | To make Lisp errors stop Emacs and return to GDB, put a breakpoint at | 1135 | To make Lisp errors stop Emacs and return to GDB, put a breakpoint at |
| 1001 | @code{Fsignal}. | 1136 | @code{Fsignal}. |
| 1002 | 1137 | ||
| 1003 | For a short listing of Lisp functions running, type the GDB | 1138 | For a backtrace of Lisp functions running, type the GDB command |
| 1004 | command @code{xbacktrace}. | 1139 | @code{xbacktrace}. |
| 1005 | 1140 | ||
| 1006 | The file @file{.gdbinit} defines several other commands that are useful | 1141 | The file @file{.gdbinit} defines several other commands that are useful |
| 1007 | for examining the data types and contents of Lisp objects. Their names | 1142 | for 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 | |||
| 1021 | directory name stored in the variable @code{data-directory}. | 1156 | directory name stored in the variable @code{data-directory}. |
| 1022 | @end itemize | 1157 | @end itemize |
| 1023 | 1158 | ||
| 1024 | Here are some things that are not necessary in a bug report: | ||
| 1025 | |||
| 1026 | @itemize @bullet | ||
| 1027 | @item | ||
| 1028 | A description of the envelope of the bug---this is not necessary for a | ||
| 1029 | reproducible bug. | ||
| 1030 | |||
| 1031 | Often people who encounter a bug spend a lot of time investigating | ||
| 1032 | which changes to the input file will make the bug go away and which | ||
| 1033 | changes will not affect it. | ||
| 1034 | |||
| 1035 | This is often time-consuming and not very useful, because the way we | ||
| 1036 | will find the bug is by running a single example under the debugger | ||
| 1037 | with breakpoints, not by pure deduction from a series of examples. | ||
| 1038 | You might as well save time by not searching for additional examples. | ||
| 1039 | It is better to send the bug report right away, go back to editing, | ||
| 1040 | and find another bug to report. | ||
| 1041 | |||
| 1042 | Of course, if you can find a simpler example to report @emph{instead} of | ||
| 1043 | the original one, that is a convenience. Errors in the output will be | ||
| 1044 | easier to spot, running under the debugger will take less time, etc. | ||
| 1045 | |||
| 1046 | However, simplification is not vital; if you can't do this or don't have | ||
| 1047 | time to try, please report the bug with your original test case. | ||
| 1048 | |||
| 1049 | @item | ||
| 1050 | A core dump file. | ||
| 1051 | |||
| 1052 | Debugging the core dump might be useful, but it can only be done on | ||
| 1053 | your machine, with your Emacs executable. Therefore, sending the core | ||
| 1054 | dump file to the Emacs maintainers won't be useful. Above all, don't | ||
| 1055 | include the core file in an email bug report! Such a large message | ||
| 1056 | can be extremely inconvenient. | ||
| 1057 | |||
| 1058 | @item | ||
| 1059 | A system-call trace of Emacs execution. | ||
| 1060 | |||
| 1061 | System-call traces are very useful for certain special kinds of | ||
| 1062 | debugging, but in most cases they give little useful information. It is | ||
| 1063 | therefore strange that many people seem to think that @emph{the} way to | ||
| 1064 | report information about a crash is to send a system-call trace. Perhaps | ||
| 1065 | this is a habit formed from experience debugging programs that don't | ||
| 1066 | have source code or debugging symbols. | ||
| 1067 | |||
| 1068 | In most programs, a backtrace is normally far, far more informative than | ||
| 1069 | a system-call trace. Even in Emacs, a simple backtrace is generally | ||
| 1070 | more informative, though to give full information you should supplement | ||
| 1071 | the backtrace by displaying variable values and printing them as Lisp | ||
| 1072 | objects with @code{pr} (see above). | ||
| 1073 | |||
| 1074 | @item | ||
| 1075 | A patch for the bug. | ||
| 1076 | |||
| 1077 | A patch for the bug is useful if it is a good one. But don't omit the | ||
| 1078 | other information that a bug report needs, such as the test case, on the | ||
| 1079 | assumption that a patch is sufficient. We might see problems with your | ||
| 1080 | patch and decide to fix the problem another way, or we might not | ||
| 1081 | understand it at all. And if we can't understand what bug you are | ||
| 1082 | trying to fix, or why your patch should be an improvement, we mustn't | ||
| 1083 | install it. | ||
| 1084 | |||
| 1085 | @ifnottex | ||
| 1086 | @xref{Sending Patches}, for guidelines on how to make it easy for us to | ||
| 1087 | understand and install your patches. | ||
| 1088 | @end ifnottex | ||
| 1089 | |||
| 1090 | @item | ||
| 1091 | A guess about what the bug is or what it depends on. | ||
| 1092 | |||
| 1093 | Such guesses are usually wrong. Even experts can't guess right about | ||
| 1094 | such 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 | |||
| 1108 | your best to help. | 1170 | your best to help. |
| 1109 | 1171 | ||
| 1110 | Every patch must have several pieces of information before we | 1172 | Every patch must have several pieces of information before we |
| 1111 | can properly evaluate it. | 1173 | can properly evaluate it. They are described below. |
| 1112 | 1174 | ||
| 1113 | When you have all these pieces, bundle them up in a mail message and | 1175 | When you have all these pieces, use the @kbd{M-x submit-emacs-patch} |
| 1114 | send it to the developers. Sending it to | 1176 | command 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 | 1177 | Subject of the patch and a patch file. It will then create and |
| 1116 | recommended, because that list is coupled to a tracking system that | 1178 | display a Message mode buffer with the patch file as an attachment, |
| 1117 | makes it easier to locate patches. If your patch is not complete and | 1179 | display the buffer, and let you explain more about the patch and add |
| 1118 | you think it needs more discussion, you might want to send it to | 1180 | any 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 |
| 1120 | send it as a followup to the initial topic. | 1182 | be sent to the GNU Bug Tracker at @url{https://debbugs.gnu.org}. The |
| 1121 | 1183 | tracker will assign a number to your submission, just like it does | |
| 1122 | We prefer to get the patches as plain text, either inline (be careful | 1184 | with bug reports. The developers will usually respond, perhaps asking |
| 1123 | your mail client does not change line breaks) or as MIME attachments. | 1185 | you for more details or any additional information, so be sure to |
| 1186 | include a valid reply email address. | ||
| 1187 | |||
| 1188 | Here'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 |
| 1127 | Include an explanation with your changes of what problem they fix or what | 1192 | An explanation of what problem you are fixing or what improvement will |
| 1128 | improvement they bring about. | 1193 | the patches bring about: |
| 1129 | 1194 | ||
| 1130 | @itemize | 1195 | @itemize @minus |
| 1131 | @item | 1196 | @item |
| 1132 | For a fix for an existing bug, it is | 1197 | For a fix for an existing bug, it is |
| 1133 | best to reply to the relevant discussion on the @samp{bug-gnu-emacs} | 1198 | best to reply to the relevant discussion on the @samp{bug-gnu-emacs} |
| @@ -1140,26 +1205,28 @@ implementation. | |||
| 1140 | 1205 | ||
| 1141 | @item | 1206 | @item |
| 1142 | For a new bug, include a proper bug report for the problem you think | 1207 | For a new bug, include a proper bug report for the problem you think |
| 1143 | you have fixed. We need to convince ourselves that the change is | 1208 | you have fixed; @pxref{Checklist, Checklist for Bug Reports}. We need |
| 1144 | right before installing it. Even if it is correct, we might have | 1209 | to convince ourselves that the change is right before installing it. |
| 1145 | trouble understanding it if we don't have a way to reproduce the | 1210 | Even if it is correct, we might have trouble understanding it if we |
| 1146 | problem. | 1211 | don't have a way to reproduce the problem it tries to fix. |
| 1147 | @end itemize | 1212 | @end itemize |
| 1148 | 1213 | ||
| 1149 | @item | 1214 | @item |
| 1150 | Include all the comments that are appropriate to help people reading the | 1215 | Include in your code changes all the comments that are appropriate to |
| 1151 | source in the future understand why this change was needed. | 1216 | help people reading the source in the future understand why this |
| 1217 | change was needed. | ||
| 1152 | 1218 | ||
| 1153 | @item | 1219 | @item |
| 1154 | Don't mix together changes made for different reasons. | 1220 | Don't mix together changes made for different reasons. |
| 1155 | Send them @emph{individually}. | 1221 | Send them @emph{individually}. |
| 1156 | 1222 | ||
| 1157 | If you make two changes for separate reasons, then we might not want to | 1223 | If you make two changes for separate reasons, then we might not want |
| 1158 | install them both. We might want to install just one. If you send them | 1224 | to install them both. We might want to install just one, or install |
| 1159 | all jumbled together in a single set of diffs, we have to do extra work | 1225 | each one in a different versions of Emacs. If you send them all |
| 1160 | to disentangle them---to figure out which parts of the change serve | 1226 | jumbled together in a single set of diffs, we have to do extra work to |
| 1161 | which purpose. If we don't have time for this, we might have to ignore | 1227 | disentangle them---to figure out which parts of the change serve which |
| 1162 | your changes entirely. | 1228 | purpose. If we don't have time for this, we might have to postpone |
| 1229 | inclusion of your patches for a long time. | ||
| 1163 | 1230 | ||
| 1164 | If you send each change as soon as you have written it, with its own | 1231 | If you send each change as soon as you have written it, with its own |
| 1165 | explanation, then two changes never get tangled up, and we can consider | 1232 | explanation, 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 | |||
| 1176 | is important. | 1243 | is important. |
| 1177 | 1244 | ||
| 1178 | @item | 1245 | @item |
| 1179 | The patch itself. | 1246 | The patch itself. This can be produced in one of the following ways: |
| 1180 | |||
| 1181 | Use @samp{diff -u} to make your diffs. Diffs without context are hard | ||
| 1182 | to install reliably. More than that, they are hard to study; we must | ||
| 1183 | always study a patch to decide whether we want to install it. Context | ||
| 1184 | format is better than contextless diffs, but we prefer the unified | ||
| 1185 | format. | ||
| 1186 | |||
| 1187 | If you have GNU diff, use @samp{diff -u -F'^[_a-zA-Z0-9$]\+ *('} when | ||
| 1188 | making diffs of C code. This shows the name of the function that each | ||
| 1189 | change occurs in. | ||
| 1190 | 1247 | ||
| 1248 | @itemize @minus | ||
| 1249 | @item | ||
| 1191 | If you are using the Emacs repository, make sure your copy is | 1250 | If you are using the Emacs repository, make sure your copy is |
| 1192 | up-to-date (e.g., with @code{git pull}). You can commit your changes | 1251 | up-to-date (e.g., with @code{git pull}). You can commit your changes |
| 1193 | to a private branch and generate a patch from the master version by | 1252 | to a private branch and generate a patch from the master version by |
| 1194 | using @code{git format-patch master}. Or you can leave your changes | 1253 | using @code{git format-patch master}. (This is the preferred method, |
| 1195 | uncommitted and use @code{git diff}. | 1254 | as it makes our job of applying the patch easier.) Or you can leave |
| 1255 | your changes uncommitted and use @code{git diff}, as described below. | ||
| 1196 | 1256 | ||
| 1197 | @item | 1257 | @item |
| 1198 | Avoid any ambiguity as to which is the old version and which is the new. | 1258 | Use @kbd{diff -u} to make your diffs. If you have GNU diff, use |
| 1199 | Please 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. |
| 1200 | version the second argument. And please give one version or the other a | 1260 | This shows the name of the function that each change occurs in. |
| 1201 | name that indicates whether it is the old version or your new changed | 1261 | |
| 1202 | one. | 1262 | When producing the diffs, avoid any ambiguity as to which is the old |
| 1263 | version and which is the new. Please make the old version the first | ||
| 1264 | argument to diff, and the new version the second argument. And please | ||
| 1265 | give one version or the other a name that indicates whether it is the | ||
| 1266 | old version or your new changed one. | ||
| 1267 | @end itemize | ||
| 1203 | 1268 | ||
| 1204 | @item | 1269 | @item |
| 1205 | Write the commit log entries for your changes. This is both to save us | 1270 | Write the commit log entries for your changes. This is both to save us |
| 1206 | the extra work of writing them, and to help explain your changes so we | 1271 | the extra work of writing them, and to help explain your changes so we |
| 1207 | can understand them. | 1272 | can understand them. |
| 1208 | 1273 | ||
| 1209 | The purpose of the commit log is to show people where to find what was | 1274 | The purpose of the commit log is to explain the rationale of the |
| 1210 | changed. So you need to be specific about what functions you changed; | 1275 | changes, the way the modified code solves whatever problems your patch |
| 1211 | in large functions, it's often helpful to indicate where within the | 1276 | is trying to fix, and also show people where to find what was changed. |
| 1212 | function the change was. | 1277 | So you need to be specific about what functions you changed and why. |
| 1213 | 1278 | For the details about our style and requirements for good commit log | |
| 1214 | On the other hand, once you have shown people where to find the change, | 1279 | messages, please see the ``Commit messages'' section of the file |
| 1215 | you need not explain its purpose in the change log. Thus, if you add a | 1280 | @file{CONTRIBUTE} in the Emacs source tree. |
| 1216 | new function, all you need to say about it is that it is new. If you | 1281 | |
| 1217 | feel that the purpose needs explaining, it probably does---but put the | 1282 | Please also look at the commit log entries of recent commits to see |
| 1218 | explanation in comments in the code. It will be more useful there. | 1283 | what sorts of information to put in, and to learn the style that we |
| 1219 | 1284 | use. Note that, unlike some other projects, we do require commit logs | |
| 1220 | Please look at the commit log entries of recent commits to see what | 1285 | for documentation, i.e., Texinfo files. @xref{Change Log}, |
| 1221 | sorts of information to put in, and to learn the style that we use. | ||
| 1222 | Note that, unlike some other projects, we do require commit logs for | ||
| 1223 | documentation, i.e., Texinfo files. | ||
| 1224 | @xref{Change Log}, | ||
| 1225 | @ifset WWW_GNU_ORG | 1286 | @ifset WWW_GNU_ORG |
| 1226 | see | 1287 | see |
| 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 |
| 1233 | When you write the fix, keep in mind that we can't install a change that | 1294 | When you write the fix, keep in mind that we can't install a change that |
| 1234 | would break other systems. Please think about what effect your change | 1295 | would break other systems. Please think about what effect your change |
| 1235 | will have if compiled on another type of system. | 1296 | will have if compiled and/or used on another type of system. |
| 1236 | 1297 | ||
| 1237 | Sometimes people send fixes that @emph{might} be an improvement in | 1298 | Sometimes people send fixes that @emph{might} be an improvement in |
| 1238 | general---but it is hard to be sure of this. It's hard to install | 1299 | general---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, | |||
| 1240 | a good explanation of the reasoning by which you concluded the change | 1301 | a good explanation of the reasoning by which you concluded the change |
| 1241 | was correct can help convince us. | 1302 | was correct can help convince us. |
| 1242 | 1303 | ||
| 1243 | The safest changes are changes to the configuration files for a | 1304 | The safest changes are changes to the files or portions of files that |
| 1244 | particular machine. These are safe because they can't create new bugs | 1305 | are only used for a particular machine or a particular system. These |
| 1245 | on other machines. | 1306 | are safe because they can't create new bugs on other machines or |
| 1307 | systems. | ||
| 1246 | 1308 | ||
| 1247 | Please help us keep up with the workload by designing the patch in a | 1309 | Please help us keep up with the workload by designing the patch in a |
| 1248 | form that is clearly safe to install. | 1310 | form 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 |
| 1262 | find and report bugs; @xref{Bugs}. | 1324 | find and report bugs; @pxref{Bugs}. |
| 1263 | 1325 | ||
| 1264 | @item | 1326 | @item |
| 1265 | answer questions on the Emacs user mailing list | 1327 | answer questions on the Emacs user mailing list |
| @@ -1326,15 +1388,15 @@ before you start; it might be possible to suggest ways to make your | |||
| 1326 | extension fit in better with the rest of Emacs. | 1388 | extension fit in better with the rest of Emacs. |
| 1327 | 1389 | ||
| 1328 | When implementing a feature, please follow the Emacs coding standards; | 1390 | When 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 |
| 1330 | require a copyright assignment to the FSF; @xref{Copyright Assignment}. | 1392 | require a copyright assignment to the FSF; @pxref{Copyright Assignment}. |
| 1331 | 1393 | ||
| 1332 | The development version of Emacs can be downloaded from the | 1394 | The development version of Emacs can be downloaded from the |
| 1333 | repository where it is actively maintained by a group of developers. | 1395 | repository where it is actively maintained by a group of developers. |
| 1334 | See the Emacs project page | 1396 | See 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 | ||
| 1337 | It is important to write your patch based on the current working | 1399 | It is important to write your patches based on the current working |
| 1338 | version. If you start from an older version, your patch may be | 1400 | version. If you start from an older version, your patch may be |
| 1339 | outdated (so that maintainers will have a hard time applying it), or | 1401 | outdated (so that maintainers will have a hard time applying it), or |
| 1340 | changes in Emacs may have made your patch unnecessary. After you have | 1402 | changes 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 | ||
| 1402 | Contributed code should follow the GNU Coding Standards | 1464 | Contributed 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. | |||
| 1433 | Remove all trailing whitespace in all source and text files. | 1495 | Remove all trailing whitespace in all source and text files. |
| 1434 | 1496 | ||
| 1435 | @item | 1497 | @item |
| 1436 | Emacs has no convention on whether to use tabs in source code; please | ||
| 1437 | don't change whitespace in the files you edit. | ||
| 1438 | |||
| 1439 | @item | ||
| 1440 | Use @code{?\s} instead of @code{? } in Lisp code for a space character. | 1498 | Use @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 | |||
| 1455 | to the FSF@. For the reasons behind this, see | 1513 | to 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 | ||
| 1458 | Copyright assignment is a simple process. Residents of some countries | 1516 | Copyright assignment is a simple process. Residents of many countries |
| 1459 | can do it entirely electronically. We can help you get started, | 1517 | can do it entirely electronically. We can help you get started, |
| 1460 | including sending you the forms you should fill, and answer any | 1518 | including sending you the forms you should fill, and answer any |
| 1461 | questions you may have (or point you to the people with the answers), | 1519 | questions 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 | ||
| 1776 | Any other keyword arguments are passed directly to the | 1776 | Any 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 | ||
| 1779 | their values. | ||
| 1778 | 1780 | ||
| 1779 | The command named @var{mode} first performs the standard actions such as | 1781 | The command named @var{mode} first performs the standard actions such as |
| 1780 | setting the variable named @var{mode} and then executes the @var{body} | 1782 | setting 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 | |||
| 1860 | Fundamental mode; but it does not detect the creation of a new buffer | 1862 | Fundamental mode; but it does not detect the creation of a new buffer |
| 1861 | in Fundamental mode. | 1863 | in Fundamental mode. |
| 1862 | 1864 | ||
| 1863 | This defines the customization option @var{global-mode} (@pxref{Customization}), | 1865 | This macro defines the customization option @var{global-mode} |
| 1864 | which can be toggled in the Customize interface to turn the minor mode on | 1866 | (@pxref{Customization}), which can be toggled via the Customize |
| 1865 | and off. As with @code{define-minor-mode}, you should ensure that the | 1867 | interface 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 |
| 1867 | starts, for example by providing a @code{:require} keyword. | 1870 | starts, 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 | |||
| 1875 | modes use a different variable to store this state information. | 1878 | modes use a different variable to store this state information. |
| 1876 | 1879 | ||
| 1877 | Generally speaking, when you define a globalized minor mode, you should | 1880 | Generally speaking, when you define a globalized minor mode, you should |
| 1878 | also define a non-globalized version, so that people can use (or | 1881 | also define a non-globalized version, so that people could use it (or |
| 1879 | disable) it in individual buffers. This also allows them to disable a | 1882 | disable it) in individual buffers. This also allows them to disable a |
| 1880 | globally enabled minor mode in a specific major mode, by using that | 1883 | globally enabled minor mode in a specific major mode, by using that |
| 1881 | mode's hook. | 1884 | mode's hook. |
| 1882 | 1885 | ||
| 1883 | If given a @code{:predicate} keyword, a user option called the same as | 1886 | If the macro is given a @code{:predicate} keyword, it will create a |
| 1884 | the global mode variable, but with @code{-modes} instead of | 1887 | user 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.@: |
| 1886 | predicate that specifies which major modes the minor mode should be | 1889 | @code{@var{global-mode}s}. This variable will be used in a predicate |
| 1887 | activated in. Valid values include @code{t} (use in all major modes, | 1890 | function 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 | 1891 | a 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}). | 1893 | modes), or a list of mode names, optionally preceded with @code{not} |
| 1894 | (as in @w{@code{(not @var{mode-name} @dots{})}}). These elements can | ||
| 1895 | be 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 | ||
| 1896 | This means ``use in modes derived from @code{c-mode}, and not in | 1902 | This means ``use in modes derived from @code{c-mode}, and not in |
| 1897 | modes derived from @code{message-mode} or @code{mail-mode}, but do use | 1903 | modes derived from @code{message-mode} or @code{mail-mode}, but do use |
| 1898 | in modes derived from @code{text-mode}, and otherwise no other | 1904 | in 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 | ||
| 1905 | This means ``don't use modes derived from @code{c-mode}, but use | 1911 | @noindent |
| 1912 | This means ``don't use in modes derived from @code{c-mode}, but do use | ||
| 1906 | everywhere else''. | 1913 | everywhere else''. |
| 1907 | 1914 | ||
| 1908 | @example | 1915 | @example |
| 1909 | (text-mode) | 1916 | (text-mode) |
| 1910 | @end example | 1917 | @end example |
| 1911 | 1918 | ||
| 1919 | @noindent | ||
| 1912 | This means ``use in modes derived from @code{text-mode}, but nowhere | 1920 | This means ``use in modes derived from @code{text-mode}, but nowhere |
| 1913 | else''. (There's an implicit @code{nil} element at the end.) | 1921 | else''. (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 | ||
| 1299 | To report an Eglot bug, send e-mail to @email{bug-gnu-emacs@@gnu.org}. | 1299 | To report an Eglot bug, send e-mail to @email{bug-gnu-emacs@@gnu.org}. |
| 1300 | 1300 | ||
| 1301 | Get acquainted with Emacs's bug reporting guidelines (@pxref{Bugs,,, | 1301 | To understand how to write this email, get acquainted with Emacs's bug |
| 1302 | emacs, GNU Emacs Manual}). Then, follow this checklist specific to | 1302 | reporting guidelines (@pxref{Bugs,,, emacs, GNU Emacs Manual}). Then, |
| 1303 | Eglot bug rerpots. | 1303 | follow 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 | |||
| 1341 | language. | 1341 | language. |
| 1342 | 1342 | ||
| 1343 | ELPA packages usually live in @code{~/.emacs.d/elpa} (or what is in | 1343 | ELPA 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 |
| 1345 | directory as well. | 1345 | directory is a way to tell the maintainers about ELPA package |
| 1346 | versions. | ||
| 1346 | 1347 | ||
| 1347 | @item | 1348 | @item |
| 1348 | Include a recipe to replicate the problem with @emph{a clean Emacs | 1349 | Include a recipe to replicate the problem with @emph{a clean Emacs |
| 1349 | run}. This means @kbd{emacs -Q -f package-initialize} invocation | 1350 | run}. The invocation @code{emacs -Q -f package-initialize} starts |
| 1350 | which starts Emacs with no configuration and initializes the ELPA | 1351 | Emacs with no configuration and initializes the ELPA packages. A very |
| 1351 | packages. A very minimal (no more that 10 lines) @file{.emacs} | 1352 | minimal @file{.emacs} initialization file (10 lines or less) is also |
| 1352 | initialization file is also acceptable and good means to describe | 1353 | acceptable and good means to describe changes to variables. |
| 1353 | changes to variables. | ||
| 1354 | 1354 | ||
| 1355 | There is usually no need to include @kbd{require} statements in the | 1355 | There is usually no need to include @code{require} statements in the |
| 1356 | recipe, as Eglot's functionality uses autoloads. | 1356 | recipe, as Eglot's functionality uses autoloads. |
| 1357 | 1357 | ||
| 1358 | Likewise, there is rarely the need to use things like | 1358 | Likewise, 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 |
| 1365 | Make sure to double check all the above elements and re-run the recipe | 1365 | Make sure to double check all the above elements and re-run the recipe |
| 1366 | to see that the problem is reproducible. Following the recipe should | 1366 | to see that the problem is reproducible. Following the recipe should |
| 1367 | produce event transcript and error backtraces that are exactly the | 1367 | produce event transcript and error backtraces that are very similar to |
| 1368 | same or very similar to the ones you included. If the problem only | 1368 | the ones you included. If the problem only happens sometimes, mention |
| 1369 | happens sometimes, include this information in your bug report. | 1369 | this in your report. |
| 1370 | @end enumerate | 1370 | @end enumerate |
| 1371 | 1371 | ||
| 1372 | Please keep in mind that some problems reported against Eglot may | 1372 | Please 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 | ||
| 1506 | If @option{ssh} is unavailable for whatever reason, look for other | 1506 | If @option{ssh} is unavailable for whatever reason, look for other |
| 1507 | obvious options. For MS Windows, try the @option{plink} method. For | 1507 | obvious options. For MS Windows, try the @option{plink} |
| 1508 | Kerberos, try @option{krlogin}. | 1508 | method@footnote{This shouldn't be needed with recent @code{OpenSSH} |
| 1509 | versions for MS Windows. Use method @option{sshx}.}. For Kerberos, | ||
| 1510 | try @option{krlogin}. | ||
| 1509 | 1511 | ||
| 1510 | For editing local files as @option{su} or @option{sudo} methods, try | 1512 | For editing local files as @option{su} or @option{sudo} methods, try |
| 1511 | the shortened syntax of @samp{root}: | 1513 | the shortened syntax of @samp{root}: |
| @@ -2866,11 +2868,19 @@ When @value{tramp} uses direct remote copying, password caches are not | |||
| 2866 | consulted. | 2868 | consulted. |
| 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 | ||
| 2872 | This section is incomplete. Please share your solutions. | 2875 | This 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 | |||
| 2880 | MS Windows' @command{ssh} does not open a remote TTY@. Use the method | ||
| 2881 | @option{sshx} or @option{scpx} instead. Furthermore, it cannot read a | ||
| 2882 | passphrase 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 | ||
| 2913 | When using the @command{ssh-agent} on MS Windows for password-less | 2923 | When using the cygwin @command{ssh-agent} on MS Windows for |
| 2914 | interaction, @option{ssh} methods depend on the environment variable | 2924 | password-less interaction, @option{ssh} methods depend on the |
| 2915 | @env{SSH_AUTH_SOCK}. But this variable is not set when Emacs is | 2925 | environment variable @env{SSH_AUTH_SOCK}. But this variable is not |
| 2916 | started from a Desktop shortcut and authentication fails. | 2926 | set when Emacs is started from a Desktop shortcut and authentication |
| 2927 | fails. | ||
| 2917 | 2928 | ||
| 2918 | One workaround is to use an MS Windows based SSH Agent, such as | 2929 | One 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. | 2930 | native MS @command{ssh-agent} or @command{Pageant}. The latter is |
| 2931 | part of the PuTTY Suite of tools. | ||
| 2920 | 2932 | ||
| 2921 | The fallback is to start Emacs from a shell. | 2933 | The 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 | ||
| 2567 | Yes, see @code{transient-display-buffer-action} in @ref{Configuration}. | 2567 | Yes, 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 | |||
| 2572 | To be able to mark text in any transient popup buffer using the mouse, | ||
| 2573 | you have to add the following binding. Note that the region won't be | ||
| 2574 | visualized, while doing so. After you have quit the transient popup, | ||
| 2575 | you 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 |
| 3570 | keymap descriptions have changed. In particular, prefix commands are | 3570 | keymap descriptions have changed. In particular, prefix commands are |
| 3571 | not output at all, and instead of "??" for closures/functions, | 3571 | not output at all, and instead of "??" for closures/functions, these |
| 3572 | "[closure]"/"[lambda]" is output. | 3572 | functions output "[closure]"/"[lambda]". You can get back the old |
| 3573 | behavior 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 | |||
| 2313 | global-font-lock-mode RET" or by customizing the variable | 2313 | global-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 | |||
| 2318 | This can happen if you have COLORTERM=truecolor defined in the | ||
| 2319 | environment when Emacs starts, but your version of 'screen' doesn't | ||
| 2320 | actually support 24-bit true colors. | ||
| 2321 | |||
| 2322 | The COLORTERM environment variable is supposed to be set to the value | ||
| 2323 | "truecolor" only if the terminal used by Emacs actually supports true | ||
| 2324 | color. Emacs does not have any means of verifying that this support | ||
| 2325 | is available, it takes the fact that the variable is defined to this | ||
| 2326 | value as an indication that true color support is, in fact, available, | ||
| 2327 | and uses color setting commands that COLORTERM=truecolor presumes, | ||
| 2328 | bypassing the usual Terminfo capabilities related to colors. | ||
| 2329 | |||
| 2330 | Some text-mode terminals, such as GNOME Terminal, are known to set | ||
| 2331 | this environment variable, supposedly to announce their own support | ||
| 2332 | for true color; however the setting is then inherited by any other | ||
| 2333 | terminal emulators started from such a terminal, even though those | ||
| 2334 | other terminal emulators might not themselves support true color using | ||
| 2335 | the same commands as Emacs uses when it sees COLORTERM=truecolor. | ||
| 2336 | |||
| 2337 | The 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 | ||
| 2339 | COLORTERM variable before starting 'screen', and let Emacs use the | ||
| 2340 | color support provided by the terminal emulator as defined in the | ||
| 2341 | Terminfo database. | ||
| 2342 | |||
| 2316 | ** Unexpected characters inserted into the buffer when you start Emacs. | 2343 | ** Unexpected characters inserted into the buffer when you start Emacs. |
| 2317 | See e.g. <URL:https://debbugs.gnu.org/11129> | 2344 | See 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. |
| 192 | Note that not all options are meaningful; typically only the options | 193 | Note that not all options are meaningful; typically only the options |
| 193 | affecting the assembler and linker are likely to be useful. | 194 | affecting 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. | |||
| 452 | TURN-ON is a function that will be called with no args in every buffer | 452 | TURN-ON is a function that will be called with no args in every buffer |
| 453 | and that should try to turn MODE on if applicable for that buffer. | 453 | and that should try to turn MODE on if applicable for that buffer. |
| 454 | 454 | ||
| 455 | Each of KEY VALUE is a pair of CL-style keyword arguments. :predicate | 455 | Each of KEY VALUE is a pair of CL-style keyword arguments. |
| 456 | specifies which major modes the globalized minor mode should be switched on | 456 | The :predicate argument specifies in which major modes should the |
| 457 | in. As the minor mode defined by this function is always global, any | 457 | globalized minor mode be switched on. The value should be t (meaning |
| 458 | :global keyword is ignored. Other keywords have the same meaning as in | 458 | switch on the minor mode in all major modes), nil (meaning don't |
| 459 | `define-minor-mode', which see. In particular, :group specifies the custom | 459 | switch on in any major mode), a list of modes (meaning switch on only |
| 460 | group. The most useful keywords are those that are passed on to the | 460 | in those modes and their descendants), or a list (not MODES...), |
| 461 | `defcustom'. It normally makes no sense to pass the :lighter or :keymap | 461 | meaning switch on in any major mode except MODES. The value can also |
| 462 | keywords to `define-globalized-minor-mode', since these are usually passed | 462 | mix all of these forms, see the info node `Defining Minor Modes' for |
| 463 | to the buffer-local version of the minor mode. | 463 | details. |
| 464 | As the minor mode defined by this function is always global, any | ||
| 465 | :global keyword is ignored. | ||
| 466 | Other keywords have the same meaning as in `define-minor-mode', | ||
| 467 | which see. In particular, :group specifies the custom group. | ||
| 468 | The most useful keywords are those that are passed on to the `defcustom'. | ||
| 469 | It normally makes no sense to pass the :lighter or :keymap keywords | ||
| 470 | to `define-globalized-minor-mode', since these are usually passed to | ||
| 471 | the buffer-local version of the minor mode. | ||
| 464 | 472 | ||
| 465 | BODY contains code to execute each time the mode is enabled or disabled. | 473 | BODY contains code to execute each time the mode is enabled or disabled. |
| 466 | It is executed after toggling the mode, and before running | 474 | It 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) |
| 273 | so as to preserve the semantics of `setf'." | 273 | so 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. |
| 69 | If ~/Downloads/ exists, that will be used, and if not, the | 75 | The default is specified by `eww-download-directory'; however, |
| 70 | DOWNLOAD XDG user directory will be returned. If that's | 76 | if that directory doesn't exist and the DOWNLOAD XDG user directory |
| 71 | undefined, ~/Downloads/ is returned anyway." | 77 | is 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. |
| 7 | Inserted by installing Org mode or when a release is made." | 7 | Inserted 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. |
| 13 | Inserted by installing Org or when a release is made." | 13 | Inserted 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." |
| 893 | Helper for `ruby-ts--imenu' which converts a treesit sparse | 898 | (if (cdr tree) |
| 894 | NODE 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 | |||
| 7510 | If non-nil, this is an alist of elements (CONDITION . ACTION), | 7510 | If non-nil, this is an alist of elements (CONDITION . ACTION), |
| 7511 | where: | 7511 | where: |
| 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. |
| 7570 | This returns the cdr of the alist entry ALIST if the entry's | 7570 | This returns the cdr of the alist entry ALIST if the entry's |
| 7571 | key (its car) and BUFFER-OR-NAME satisfy `buffer-match-p', using | 7571 | key (its car) and the name of the buffer designated by |
| 7572 | the key as CONDITION argument of `buffer-match-p'. ACTION should | 7572 | BUFFER-OR-NAME satisfy `buffer-match-p', using the key as |
| 7573 | have the form of the action argument passed to `display-buffer'." | 7573 | CONDITION argument of `buffer-match-p'. ACTION should have the |
| 7574 | form 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; | |||
| 180 | static struct tm * | 180 | static struct tm * |
| 181 | emacs_localtime_rz (timezone_t tz, time_t const *t, struct tm *tm) | 181 | emacs_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, | |||
| 1016 | static void | 1016 | static void |
| 1017 | treesit_ensure_parsed (Lisp_Object parser) | 1017 | treesit_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 | ||
| 125 | all: check | 125 | all: check |
| 126 | 126 | ||
| 127 | ifeq ($(HAVE_NATIVE_COMP),yes) | 127 | SYSTEM_TYPE = @SYSTEM_TYPE@ |
| 128 | TEST_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"). | ||
| 131 | ifeq ($(SYSTEM_TYPE),cygwin) | ||
| 132 | TEST_NATIVE_COMP = no | ||
| 133 | endif | ||
| 134 | ifeq ($(TEST_NATIVE_COMP),yes) | ||
| 128 | SELECTOR_DEFAULT = (not (or (tag :expensive-test) (tag :unstable))) | 135 | SELECTOR_DEFAULT = (not (or (tag :expensive-test) (tag :unstable))) |
| 129 | SELECTOR_EXPENSIVE = (not (tag :unstable)) | 136 | SELECTOR_EXPENSIVE = (not (tag :unstable)) |
| 130 | SELECTOR_ALL = t | 137 | SELECTOR_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 | ||
| 65 | RUN apt-get update && \ | 65 | RUN 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. |
| 76 | RUN snap install core | 76 | # RUN snap install core |
| 77 | RUN snap install pylsp | 77 | # RUN snap install pylsp |
| 78 | 78 | ||
| 79 | COPY . /checkout | 79 | COPY . /checkout |
| 80 | WORKDIR /checkout | 80 | WORKDIR /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. |
| 101 | RUN apt-get update && \ | 101 | RUN 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 | ||
| 106 | FROM emacs-native-comp as emacs-native-comp-speed0 | 106 | FROM 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. | 259 | build-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: | 265 | test-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 | " | ||
| 5947 | match 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 | " | ||
| 6152 | match 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 |