diff options
author | Eli Zaretskii <eliz@gnu.org> | 2024-02-10 05:07:56 -0500 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2024-02-10 05:07:56 -0500 |
commit | 22d500ce21de56d1f17231ce8030dc5de12f021f (patch) | |
tree | 3d300ce9697a0b6fd85880a622ff856eb5aac42f | |
parent | 7f3baf352bad03de50135556a561af0c7fb1bd6a (diff) | |
parent | 7d3a144486461869b943f04a45e84c0c3d926732 (diff) | |
download | emacs-22d500ce21de56d1f17231ce8030dc5de12f021f.tar.gz |
Merge from origin/emacs-29
7d3a1444864 ; Mention defface's and their :version tags in CONTRIBUTE.
09c53b717d4 * admin/notes/kind-communication: New file.
31ca4e5501f ; And another fix of CONTRIBUTE.
d65499e7908 ; Another clarification in CONTRIBUTE.
571ec583d64 ; Clarify "ChangeLog entries" in CONTRIBUTE.
e2682316867 Don't skip links to "." and ".." in Dired when marking files
e25d11314d8 Pass unquoted filename to user-supplied MUSTMATCH predicate
47496993703 * doc/lispref/parsing.texi (Retrieving Nodes): Improve do...
d0673ea0d42 ; * etc/PROBLEMS: Workaround for Windows key "stuck" (bug...
* lisp/emacs-lisp/trace.el:
* java/org/gnu/emacs/EmacsWindow.java (onDragEvent): Remove
training whitespace.
-rw-r--r-- | CONTRIBUTE | 46 | ||||
-rw-r--r-- | admin/notes/kind-communication | 21 | ||||
-rw-r--r-- | doc/lispref/parsing.texi | 34 | ||||
-rw-r--r-- | etc/PROBLEMS | 32 | ||||
-rw-r--r-- | java/org/gnu/emacs/EmacsWindow.java | 2 | ||||
-rw-r--r-- | lisp/dired.el | 5 | ||||
-rw-r--r-- | lisp/emacs-lisp/trace.el | 2 | ||||
-rw-r--r-- | lisp/minibuffer.el | 17 | ||||
-rw-r--r-- | test/src/treesit-tests.el | 2 |
9 files changed, 107 insertions, 54 deletions
diff --git a/CONTRIBUTE b/CONTRIBUTE index 70b9760bb99..bdee16eeab4 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE @@ -115,9 +115,10 @@ mode after hiding the body of each entry. Doc-strings should be updated together with the code. -New defcustom's should always have a ':version' tag stating the first -Emacs version in which they will appear. Likewise with defcustom's -whose value is changed -- update their ':version' tag. +New defcustom's and defface's should always have a ':version' tag +stating the first Emacs version in which they will appear. Likewise +with defcustom's or defface's whose value is changed -- update their +':version' tag. Think about whether your change requires updating the manuals. If you know it does not, mark the NEWS entry with "---" before the entry. If @@ -170,9 +171,9 @@ test 'out-of-tree' builds as well, i.e.: ** Commit messages -Ordinarily, a change you commit should contain a log entry in its -commit message and should not touch the repository's ChangeLog files. -Here is an example commit message (indented): +Ordinarily, a changeset you commit should contain a description of the +changes in its commit message and should not touch the repository's +ChangeLog files. Here is an example commit message (indented): Deactivate shifted region @@ -184,8 +185,9 @@ Here is an example commit message (indented): Deactivate the mark. Occasionally, commit messages are collected and prepended to a -ChangeLog file, where they can be corrected. It saves time to get -them right the first time, so here are guidelines for formatting them: +generated ChangeLog file, where they can be corrected. It saves time +to get them right the first time, so here are guidelines for +formatting them: - Start with a single unindented summary line explaining the change; do not end this line with a period. If possible, try to keep the @@ -194,9 +196,10 @@ them right the first time, so here are guidelines for formatting them: contexts. If the summary line starts with a semicolon and a space "; ", the - commit message will be ignored when generating the ChangeLog file. - Use this for minor commits that do not need separate ChangeLog - entries, such as changes in etc/NEWS. + commit message will be skipped and not added to the generated + ChangeLog file. Use this for minor commits that do not need to be + mentioned in the ChangeLog file, such as changes in etc/NEWS, typo + fixes, etc. - After the summary line, there should be an empty line. @@ -211,8 +214,9 @@ them right the first time, so here are guidelines for formatting them: enforced by a commit hook. - If only a single file is changed, the summary line can be the normal - file first line (starting with the asterisk). Then there is no - individual files section. + first line of a ChangeLog entry (starting with the asterisk). Then + there will be no individual ChangeLog entries beyond the one in the + summary line. - If the commit has more than one author, the commit message should contain separate lines to mention the other authors, like the @@ -243,12 +247,12 @@ them right the first time, so here are guidelines for formatting them: - Explaining the rationale for a design choice is best done in comments in the source code. However, sometimes it is useful to describe just the rationale for a change; that can be done in the commit message - between the summary line and the file entries. + between the summary line and the following ChangeLog entries. -- Emacs generally follows the GNU coding standards for ChangeLogs: see - https://www.gnu.org/prep/standards/html_node/Change-Logs.html - or run 'info "(standards)Change Logs"'. One exception is that - commits still sometimes quote `like-this' (as the standards used to +- Emacs follows the GNU coding standards for ChangeLog entries: see + https://www.gnu.org/prep/standards/html_node/Change-Logs.html or run + 'info "(standards)Change Logs"'. One exception is that commits + still sometimes quote `like-this' (as the standards used to recommend) rather than 'like-this' or ‘like this’ (as they do now), as `...' is so widely used elsewhere in Emacs. @@ -261,9 +265,9 @@ them right the first time, so here are guidelines for formatting them: in Emacs; that includes spelling and leaving 2 blanks between sentences. - They are preserved indefinitely, and have a reasonable chance of - being read in the future, so it's better that they have good - presentation. + The ChangeLog entries are preserved indefinitely, and have a + reasonable chance of being read in the future, so it's better that + they have good presentation. - Use the present tense; describe "what the change does", not "what the change did". diff --git a/admin/notes/kind-communication b/admin/notes/kind-communication new file mode 100644 index 00000000000..80b2afb27b2 --- /dev/null +++ b/admin/notes/kind-communication @@ -0,0 +1,21 @@ +The GNU Project encourages contributions from anyone who wishes to +advance the development of the GNU system, regardless of gender, race, +ethnic group, physical appearance, religion, cultural background, and +any other demographic characteristics, as well as personal political +views. + +People are sometimes discouraged from participating in GNU development +because of certain patterns of communication that strike them as +unfriendly, unwelcoming, rejecting, or harsh. This discouragement +particularly affects members of disprivileged demographics, but it is +not limited to them. Therefore, we ask all contributors to make a +conscious effort, in GNU Project discussions, to communicate in ways +that avoid that outcome — to avoid practices that will predictably and +unnecessarily risk putting some contributors off. + +The GNU Kind Communications Guidelines suggest specific ways to +accomplish that goal. You can find the latest version at +https://www.gnu.org/philosophy/kind-communication.html + +When sending messages to Emacs mailing lists, we ask you to read and +respect these guidelines. diff --git a/doc/lispref/parsing.texi b/doc/lispref/parsing.texi index ac11f88ae4d..d685b7f32dc 100644 --- a/doc/lispref/parsing.texi +++ b/doc/lispref/parsing.texi @@ -794,7 +794,7 @@ that comes after it in the buffer position order, i.e., nodes with start positions greater than the end position of @var{start}. In the tree shown above, @code{treesit-search-subtree} traverses node -@samp{S} (@var{start}) and nodes marked with @code{o}, where this +@samp{S} (@var{start}) and nodes marked with @code{o}, whereas this function traverses the nodes marked with numbers. This function is useful for answering questions like ``what is the first node after @var{start} in the buffer that satisfies some condition?'' @@ -916,35 +916,37 @@ nodes. @defun treesit-parent-until node predicate &optional include-node This function repeatedly finds the parents of @var{node}, and returns -the parent that satisfies @var{pred}. @var{pred} can be either a -function that takes a node as argument and returns @code{t} or -@code{nil}, or a regexp matching node type names, or other valid +the parent that satisfies @var{predicate}. @var{predicate} can be +either a function that takes a node as argument and returns @code{t} +or @code{nil}, or a regexp matching node type names, or other valid predicates described in @var{treesit-thing-settings}. If no parent -satisfies @var{pred}, this function returns @code{nil}. +satisfies @var{predicates}, this function returns @code{nil}. Normally this function only looks at the parents of @var{node} but not @var{node} itself. But if @var{include-node} is non-@code{nil}, this -function returns @var{node} if @var{node} satisfies @var{pred}. +function returns @var{node} if @var{node} satisfies @var{predicate}. @end defun -@defun treesit-parent-while node pred +@defun treesit-parent-while node predicate This function goes up the tree starting from @var{node}, and keeps -doing so as long as the nodes satisfy @var{pred}. That is, this -function returns the highest parent of @var{node} that still satisfies -@var{pred}. Note that if @var{node} satisfies @var{pred} but its -immediate parent doesn't, @var{node} itself is returned. - -@var{pred} is the same as in @code{treesit-parent-until} above. +doing so as long as the nodes satisfy @var{predicate}, a function that +takes a node as argument. That is, this function returns the highest +parent of @var{node} that still satisfies @var{predicate}. Note that if +@var{node} satisfies @var{predicate} but its immediate parent doesn't, +@var{node} itself is returned. @end defun -@defun treesit-node-top-level node &optional type +@defun treesit-node-top-level node &optional predicate include-node This function returns the highest parent of @var{node} that has the same type as @var{node}. If no such parent exists, it returns @code{nil}. Therefore this function is also useful for testing whether @var{node} is top-level. -If @var{type} is non-@code{nil}, this function matches each parent's -type with @var{type} as a regexp, rather than using @var{node}'s type. +If @var{predicate} is @code{nil}, this function uses @var{node}'s type +to find the parent. If @var{predicate} is non-@code{nil}, this +function searches the parent that satisfies @var{predicate}. If +@var{include-node} is non-@code{nil}, this function returns @var{node} +if @var{node} satisfies @var{predicate}. @end defun @node Accessing Node Information diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 048c56baa1a..d3c7e17b2f1 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -476,6 +476,29 @@ You are probably using a shell that doesn't support job control, even though the system itself is capable of it. Either use a different shell, or set the variable 'cannot-suspend' to a non-nil value. +*** Emacs running on WSL receives stray characters as input. + +For example, you could see Emacs inserting 'z' characters even though +nothing is typed on the keyboard, and even if you unplug the keyboard. + +The reason is a bug in the WSL X server's handling of key-press and +key-repeat events. A workaround is to use the Cygwin or native +MS-Windows build of Emacs instead. + +*** On MS-Windows, the Windows key gets "stuck". +When this problem happens, Windows behaves as if the Windows key were +permanently pressed down. This could be a side effect of Emacs on +MS-Windows hooking keyboard input on a low level, in order to support +registering the Windows keys as hot keys. If that hook takes too much +time for some reason, Windows can decide to remove the hook, which +then has this effect. + +This is arguably a bug in Emacs, for which we don't yet have a +solution. To work around, set the 'LowLevelHooksTimeout' value in the +registry key "HKEY_CURRENT_USER\Control Panel\Desktop" to a number +higher than 200 msec; the maximum allowed value is 1000 msec (create +the value if it doesn't exist under that key). + ** Mailers and other helper programs *** movemail compiled with POP support can't connect to the POP server. @@ -545,15 +568,6 @@ As a workaround, input the passphrase with a GUI-capable pinentry program like 'pinentry-gnome' or 'pinentry-qt5'. Alternatively, you can use the 'pinentry' package from Emacs 25. -*** Emacs running on WSL receives stray characters as input. - -For example, you could see Emacs inserting 'z' characters even though -nothing is typed on the keyboard, and even if you unplug the keyboard. - -The reason is a bug in the WSL X server's handling of key-press and -key-repeat events. A workaround is to use the Cygwin or native -MS-Windows build of Emacs instead. - ** Problems with hostname resolution *** Emacs does not know your host's fully-qualified domain name. diff --git a/java/org/gnu/emacs/EmacsWindow.java b/java/org/gnu/emacs/EmacsWindow.java index b75d96b2b5a..978891ba619 100644 --- a/java/org/gnu/emacs/EmacsWindow.java +++ b/java/org/gnu/emacs/EmacsWindow.java @@ -1746,7 +1746,7 @@ public final class EmacsWindow extends EmacsHandleObject /* Attempt to acquire permissions for this URI; failing which, insert it as text instead. */ - + if (uri != null && uri.getScheme () != null && uri.getScheme ().equals ("content") diff --git a/lisp/dired.el b/lisp/dired.el index cef93ab757c..9e3b888df14 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -4321,6 +4321,11 @@ this subdir." (prefix-numeric-value arg) (lambda () (when (or (not (looking-at-p dired-re-dot)) + ;; Don't skip symlinks to ".", "..", etc. + (save-excursion + (re-search-forward + dired-permission-flags-regexp nil t) + (eq (char-after (match-beginning 1)) ?l)) (not (equal dired-marker-char dired-del-marker))) (delete-char 1) (insert dired-marker-char)))))))) diff --git a/lisp/emacs-lisp/trace.el b/lisp/emacs-lisp/trace.el index 29775e77716..1ed1528c6d5 100644 --- a/lisp/emacs-lisp/trace.el +++ b/lisp/emacs-lisp/trace.el @@ -193,7 +193,7 @@ LEVEL is the trace level, VALUE value returned by FUNCTION." ;; Do this so we'll see strings: (cl-prin1-to-string value) ctx))))) - + (defvar trace--timer nil) (defun trace--display-buffer (buf) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 0bfc5c06313..708f3684d11 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -3485,9 +3485,10 @@ Fourth arg MUSTMATCH can take the following values: input, but she needs to confirm her choice if she called `minibuffer-complete' right before `minibuffer-complete-and-exit' and the input is not an existing file. -- a function, which will be called with the input as the - argument. If the function returns a non-nil value, the - minibuffer is exited with that argument as the value. +- a function, which will be called with a single argument, the + input unquoted by `substitute-in-file-name', which see. If the + function returns a non-nil value, the minibuffer is exited with + that argument as the value. - anything else behaves like t except that typing RET does not exit if it does non-null completion. @@ -3576,7 +3577,13 @@ See `read-file-name' for the meaning of the arguments." (let ((ignore-case read-file-name-completion-ignore-case) (minibuffer-completing-file-name t) (pred (or predicate 'file-exists-p)) - (add-to-history nil)) + (add-to-history nil) + (require-match (if (functionp mustmatch) + (lambda (input) + (funcall mustmatch + ;; User-supplied MUSTMATCH expects an unquoted filename + (substitute-in-file-name input))) + mustmatch))) (let* ((val (if (or (not (next-read-file-uses-dialog-p)) @@ -3612,7 +3619,7 @@ See `read-file-name' for the meaning of the arguments." (read-file-name--defaults dir initial)))) (set-syntax-table minibuffer-local-filename-syntax)) (completing-read prompt 'read-file-name-internal - pred mustmatch insdef + pred require-match insdef 'file-name-history default-filename))) ;; If DEFAULT-FILENAME not supplied and DIR contains ;; a file name, split it. diff --git a/test/src/treesit-tests.el b/test/src/treesit-tests.el index a89bf1298c0..bdc9630c783 100644 --- a/test/src/treesit-tests.el +++ b/test/src/treesit-tests.el @@ -254,7 +254,7 @@ (should (eq nil (treesit-node-text (treesit-search-subtree subarray "\\[")))) - ;; If ALL=nil, searching for number should still find the + ;; If ALL=t, searching for number should still find the ;; numbers. (should (equal "1" (treesit-node-text (treesit-search-subtree |