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

Merge from origin/emacs-29

920a7d38e9 ; Fix typos
48a62c5546 Add constructor_declaration as java-ts-mode defun
72c45fa910 Further improvement for non-string values in pcomplete
1ef359095e ; * etc/NEWS (--with-native-compilation=aot): Tweak wording.
a8eb9dd400 Fix the case in first-completion revealed by minibuffer-t...

# Conflicts:
#	doc/misc/modus-themes.org
#	etc/NEWS
This commit is contained in:
Stefan Kangas 2023-01-15 13:08:02 +01:00
commit cc576cc410
13 changed files with 72 additions and 56 deletions

View file

@ -25,11 +25,13 @@ applies, and please also update docstrings as needed.
* Installation Changes in Emacs 29.1
---
** Ahead-of-time native compilation can now be specified via configure.
Use '--with-native-compilation=aot' to specify that all the Lisp files
** Ahead-of-time native compilation can now be requested via configure.
Use '--with-native-compilation=aot' to request that all the Lisp files
in the Emacs tree should be natively compiled ahead of time. (This is
slow on most machines.)
This feature existed in Emacs 28.1, but was less easy to request.
+++
** Emacs can be built with the tree-sitter parsing library.
This library, together with grammar libraries, provides incremental

View file

@ -252,7 +252,7 @@ the default otherwise."
"Step forward completions by one entry.
Second entry becomes the first and can be selected with
`icomplete-force-complete-and-exit'.
Return non-nil iff something was stepped."
Return non-nil if something was stepped."
(interactive)
(let* ((beg (icomplete--field-beg))
(end (icomplete--field-end))
@ -270,7 +270,7 @@ Return non-nil iff something was stepped."
"Step backward completions by one entry.
Last entry becomes the first and can be selected with
`icomplete-force-complete-and-exit'.
Return non-nil iff something was stepped."
Return non-nil if something was stepped."
(interactive)
(let* ((beg (icomplete--field-beg))
(end (icomplete--field-end))

View file

@ -241,7 +241,7 @@ return `:middle'."
(t :middle)))
(defun org-mouse-empty-line ()
"Return non-nil iff the line contains only white space."
"Return non-nil if the line contains only white space."
(save-excursion (beginning-of-line) (looking-at "[ \t]*$")))
(defun org-mouse-next-heading ()
@ -283,7 +283,7 @@ keyword as the only argument.
If SELECTED is nil, then all items are normal menu items. If
SELECTED is a function, then each item is a checkbox, which is
enabled for a given keyword iff (funcall SELECTED keyword) return
enabled for a given keyword if (funcall SELECTED keyword) return
non-nil. If SELECTED is neither nil nor a function, then the
items are radio buttons. A radio button is enabled for the
keyword `equal' to SELECTED.

View file

@ -632,6 +632,13 @@ This will modify the current buffer."
;;; Internal Functions:
;; argument handling
(defsubst pcomplete-actual-arg (&optional index offset)
"Return the actual text representation of the last argument.
This is different from `pcomplete-arg', which returns the textual value
that the last argument evaluated to. This function returns what the
user actually typed in."
(buffer-substring (pcomplete-begin index offset) (point)))
(defun pcomplete-arg (&optional index offset)
"Return the textual content of the INDEXth argument.
INDEX is based from the current processing position. If INDEX is
@ -659,11 +666,20 @@ the pcomplete-arg-value text property of that string."
(_ (- pcomplete-index (or index 0))))
(or offset 0))
pcomplete-args)))
(if (stringp arg)
(if (or (stringp arg)
;; FIXME: 'last' is handled specially in Emacs 29, because
;; 'pcomplete-parse-arguments' accepts a list of strings
;; (which are completion candidates) as return value for
;; (pcomplete-arg 'last). See below: "it means it's a
;; list of completions computed during parsing,
;; e.g. Eshell uses that to turn globs into lists of
;; completions". This special case will be dealt with
;; differently in Emacs 30: the pcomplete-arg-value
;; property will be used by 'pcomplete-parse-arguments'.
(eq index 'last))
arg
(propertize
(buffer-substring (pcomplete-begin index offset)
(pcomplete-begin (1- (or index 0)) offset))
(car (split-string (pcomplete-actual-arg index offset)))
'pcomplete-arg-value arg))))
(defun pcomplete-begin (&optional index offset)
@ -679,13 +695,6 @@ See the documentation for `pcomplete-arg'."
(setq index (+ index offset)))
(nth index pcomplete-begins))
(defsubst pcomplete-actual-arg (&optional index offset)
"Return the actual text representation of the last argument.
This is different from `pcomplete-arg', which returns the textual value
that the last argument evaluated to. This function returns what the
user actually typed in."
(buffer-substring (pcomplete-begin index offset) (point)))
(defsubst pcomplete-next-arg ()
"Move the various pointers to the next argument."
(setq pcomplete-index (1+ pcomplete-index)

View file

@ -316,7 +316,8 @@ Return nil if there is no name or if NODE is not a defun node."
"enum_declaration"
"import_declaration"
"package_declaration"
"module_declaration")))
"module_declaration"
"constructor_declaration")))
(setq-local treesit-defun-name-function #'java-ts-mode--defun-name)
(setq-local treesit-sentence-type-regexp

View file

@ -2228,8 +2228,8 @@ are available:
This includes commands marked as specific to the current
buffer's modes and commands that have keybindings in the
current buffer's active local keymaps. It also includes
several commands, like Cuztomize commands, which should
always be avaliable."
several commands, like Customize commands, which should
always be available."
:version "28.1"
:group 'completion
:type '(choice (const :tag "Don't exclude any commands" nil)
@ -9741,7 +9741,11 @@ the completions is popped up and down."
"Move to the first item in the completion list."
(interactive)
(goto-char (point-min))
(unless (get-text-property (point) 'mouse-face)
(if (get-text-property (point) 'mouse-face)
(unless (get-text-property (point) 'first-completion)
(let ((inhibit-read-only t))
(add-text-properties (point) (min (1+ (point)) (point-max))
'(first-completion t))))
(when-let ((pos (next-single-property-change (point) 'mouse-face)))
(goto-char pos))))

View file

@ -3402,7 +3402,7 @@ Format paragraphs upto TO. Supports special chars.
(defvar woman-registers ; these are all read-only
'((".H" 24) (".V" 48) ; resolution in basic units
(".g" 0) ; not groff
;; (Iff emulating groff need to implement groff italic correction
;; (If emulating groff need to implement groff italic correction
;; \/, e.g. for pic.1)
(".i" left-margin) ; current indent
(".j" woman-adjust) ; current adjustment

View file

@ -1987,7 +1987,7 @@ ccl_get_compiled_code (Lisp_Object ccl_prog, ptrdiff_t *idx)
/* Setup fields of the structure pointed by CCL appropriately for the
execution of CCL program CCL_PROG. CCL_PROG is the name (symbol)
of the CCL program or the already compiled code (vector).
Return true iff successful.
Return true if successful.
If CCL_PROG is nil, just reset the structure pointed by CCL. */
bool

View file

@ -21,7 +21,7 @@
(0.00 ":irc.example.net 376 tester :End of message of the day."))
((mode 10 "MODE tester +i")
(0.00 ":irc.example.net 501 tester x :is not a recognised user mode.")
(0.00 ":irc.example.net 501 tester x :is not a recognized user mode.")
(0.00 ":NickServ!NickServ@services.int NOTICE tester :Welcome to FooNet, tester! Here on FooNet, we provide services to enable the registration of nicknames and channels! For details, type \2/msg NickServ help\2 and \2/msg ChanServ help\2.")
(0.02 ":tester!user@10.0.2.100 MODE tester :+i"))

View file

@ -421,7 +421,7 @@
(switch-to-completions)
;; Fixed in bug#55430
(should (equal "aa" (get-text-property (point) 'completion--string)))
(next-completion 3)
(next-completion 2)
(should (equal "ac" (get-text-property (point) 'completion--string)))
(previous-completion 2)
(should (equal "aa" (get-text-property (point) 'completion--string)))