commit 6392f5d61f62f9c8b4a836f288bf3d07c31d3f8a (HEAD, refs/remotes/origin/master) Author: john muhl Date: Thu Jul 24 20:41:51 2025 -0500 ; Remove duplicate menu item in 'eww' * lisp/net/eww.el (eww-mode-map): Delete "Exit" menu item. It once called 'eww-quit', which was deleted in Dec 2013, so now it does the same as "Close browser" menu item. (Bug#79284) diff --git a/lisp/net/eww.el b/lisp/net/eww.el index e0ec7d91090..6f06302cb3f 100644 --- a/lisp/net/eww.el +++ b/lisp/net/eww.el @@ -1356,7 +1356,6 @@ This consults the entries in `eww-readable-urls' (which see)." "" #'eww-forward-url :menu '("Eww" - ["Exit" quit-window t] ["Close browser" quit-window t] ["Reload" eww-reload t] ["Follow URL in new buffer" eww-open-in-new-buffer] commit c6bf09d5c3a7c514348a7afc2bde7138173e78d2 Author: Dmitry Gutov Date: Thu Aug 21 04:06:44 2025 +0300 ; Fix typo (wrong-type-argument not wrong-argument-type) diff --git a/doc/misc/eieio.texi b/doc/misc/eieio.texi index 39225535089..bf6f2fdb430 100644 --- a/doc/misc/eieio.texi +++ b/doc/misc/eieio.texi @@ -881,7 +881,7 @@ help with this a plethora of predicates have been created. @anchor{find-class} Return the class that @var{symbol} represents. If there is no class, @code{nil} is returned if @var{errorp} is @code{nil}. -If @var{errorp} is non-@code{nil}, @code{wrong-argument-type} is signaled. +If @var{errorp} is non-@code{nil}, @code{wrong-type-argument} is signaled. @end defun @defun class-p class diff --git a/lisp/emacs-lisp/eieio.el b/lisp/emacs-lisp/eieio.el index e1051eb7d4e..7f7b2adde45 100644 --- a/lisp/emacs-lisp/eieio.el +++ b/lisp/emacs-lisp/eieio.el @@ -593,7 +593,7 @@ OBJECT can be an instance or a class." (defun find-class (symbol &optional errorp) "Return the class that SYMBOL represents. If there is no class, nil is returned if ERRORP is nil. -If ERRORP is non-nil, `wrong-argument-type' is signaled." +If ERRORP is non-nil, `wrong-type-argument' is signaled." (let ((class (cl--find-class symbol))) (cond ((eieio--class-p class) class) commit b511c38bba5354ff21c697e4d27279bf73e4d3cf Author: Spencer Baugh Date: Wed Aug 20 13:23:34 2025 -0400 Avoid duplicating strings in pcm--merge-completions Make completion-pcm--merge-completions operate only on the text matched by the wildcards, instead of also the text in between the wildcards. This improves performance and simplifies the code by removing the need for the previous mutable variable "fixed". * lisp/minibuffer.el (completion-pcm--merge-completions): Operate only on text matched by wildcards. (bug#79265) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index b5060614841..2dd5e09f8bb 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -4586,38 +4586,35 @@ the same set of elements." (cond ((null (cdr strs)) (list (car strs))) (t - (let ((re (completion-pcm--pattern->regex pattern 'group)) + (let ((re (concat + (completion-pcm--pattern->regex pattern 'group) + ;; The implicit trailing `any' is greedy. + "\\([^z-a]*\\)")) (ccs ())) ;Chopped completions. - ;; First chop each string into the parts corresponding to each - ;; non-constant element of `pattern', using regexp-matching. + ;; First match each string against PATTERN as a regex and extract + ;; the text matched by each wildcard. (let ((case-fold-search completion-ignore-case)) (dolist (str strs) (unless (string-match re str) (error "Internal error: %s doesn't match %s" str re)) (let ((chopped ()) - (last 0) (i 1) next) - (while (setq next (match-end i)) - (push (substring str last next) chopped) - (setq last next) + (while (setq next (match-string i str)) + (push next chopped) (setq i (1+ i))) - ;; Add the text corresponding to the implicit trailing `any'. - (push (substring str last) chopped) (push (nreverse chopped) ccs)))) - ;; Then for each of those non-constant elements, extract the - ;; commonality between them. + ;; Then for each of those wildcards, extract the commonality between them. (let ((res ()) - (fixed "") ;; Accumulate each stretch of wildcards, and process them as a unit. (wildcards ())) ;; Make the implicit trailing `any' explicit. (dolist (elem (append pattern '(any))) (if (stringp elem) (progn - (setq fixed (concat fixed elem)) + (push elem res) (setq wildcards nil)) (let ((comps ())) (push elem wildcards) @@ -4628,18 +4625,13 @@ the same set of elements." ;; different capitalizations in different parts. ;; In practice, it doesn't seem to make any difference. (setq ccs (nreverse ccs)) - ;; FIXED is a prefix of all of COMPS. Try to grow that prefix. - (let* ((prefix (try-completion fixed comps)) - (unique (or (and (eq prefix t) (setq prefix fixed)) + (let* ((prefix (try-completion "" comps)) + (unique (or (and (eq prefix t) (setq prefix "")) (and (stringp prefix) ;; If PREFIX is equal to all of COMPS, ;; then PREFIX is a unique completion. (seq-every-p - ;; PREFIX is still a prefix of all of - ;; COMPS, so if COMP is the same length, - ;; they're equal. - (lambda (comp) - (= (length prefix) (length comp))) + (lambda (comp) (= (length prefix) (length comp))) comps))))) ;; If there's only one completion, `elem' is not useful ;; any more: it can only match the empty string. @@ -4654,7 +4646,7 @@ the same set of elements." ;; `prefix' only wants to include the fixed part before the ;; wildcard, not the result of growing that fixed part. (when (seq-some (lambda (elem) (eq elem 'prefix)) wildcards) - (setq prefix fixed)) + (setq prefix "")) (push prefix res) ;; Push all the wildcards in this stretch, to preserve `point' and ;; `star' wildcards before ELEM. @@ -4678,8 +4670,7 @@ the same set of elements." (unless (equal suffix "") (push suffix res)))) ;; We pushed these wildcards on RES, so we're done with them. - (setq wildcards nil)) - (setq fixed ""))))) + (setq wildcards nil)))))) ;; We return it in reverse order. res))))) commit 1bd7b6ac27c1b2baae2733e190f2b508557d5f2f Author: Spencer Baugh Date: Mon Aug 18 14:50:44 2025 -0400 Treat point more consistently in PCM completion Properly fix bug#38458, which is fundamentally an issue with completion-ignore-case, by checking if the completions are unique ignoring case. When the completions are unique, the normal code to delete a wildcard naturally causes point to be moved to the end of the minibuffer, which is the correct behavior. Now that the bug is fixed properly, remove a hack which previously was used to "fix" it, which made point behave inconsistently if it was in the middle of the minibuffer versus at the end of the minibuffer. * lisp/minibuffer.el (completion-pcm--merge-completions): Respect completion-ignore-case when checking for completion uniqueness. (bug#79265) (completion-pcm--string->pattern) (completion-pcm--optimize-pattern): Allow point at the end of the pattern. * test/lisp/minibuffer-tests.el (completion-table-test-quoting) (completion-test--pcm-bug38458, completion-pcm-test-8): Update tests for more correct behavior. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index f0994adbb70..b5060614841 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -4117,7 +4117,7 @@ style." "Split STRING into a pattern. A pattern is a list where each element is either a string or a symbol, see `completion-pcm--merge-completions'." - (if (and point (< point (length string))) + (if (and point (<= point (length string))) (let ((prefix (substring string 0 point)) (suffix (substring string point))) (append (completion-pcm--string->pattern prefix) @@ -4178,12 +4178,6 @@ or a symbol, see `completion-pcm--merge-completions'." (pcase p (`(,(or 'any 'any-delim) ,(or 'any 'point) . ,_) (setq p (cdr p))) - ;; This is not just a performance improvement: it turns a - ;; terminating `point' into an implicit `any', which affects - ;; the final position of point (because `point' gets turned - ;; into a non-greedy ".*?" regexp whereas we need it to be - ;; greedy when it's at the end, see bug#38458). - (`(point) (setq p nil)) ;Implicit terminating `any'. (_ (push (pop p) n)))) (nreverse n))) @@ -4634,10 +4628,19 @@ the same set of elements." ;; different capitalizations in different parts. ;; In practice, it doesn't seem to make any difference. (setq ccs (nreverse ccs)) + ;; FIXED is a prefix of all of COMPS. Try to grow that prefix. (let* ((prefix (try-completion fixed comps)) (unique (or (and (eq prefix t) (setq prefix fixed)) (and (stringp prefix) - (eq t (try-completion prefix comps)))))) + ;; If PREFIX is equal to all of COMPS, + ;; then PREFIX is a unique completion. + (seq-every-p + ;; PREFIX is still a prefix of all of + ;; COMPS, so if COMP is the same length, + ;; they're equal. + (lambda (comp) + (= (length prefix) (length comp))) + comps))))) ;; If there's only one completion, `elem' is not useful ;; any more: it can only match the empty string. ;; FIXME: in some cases, it may be necessary to turn an diff --git a/test/lisp/minibuffer-tests.el b/test/lisp/minibuffer-tests.el index f9a26d17e58..59b72899e22 100644 --- a/test/lisp/minibuffer-tests.el +++ b/test/lisp/minibuffer-tests.el @@ -100,10 +100,10 @@ ;; Test that $$ in input is properly unquoted. ("data/m-cttq$$t" "data/minibuffer-test-cttq$$tion") ;; Test that env-vars are preserved. - ("lisp/c${CTTQ1}et/se-u" "lisp/c${CTTQ1}et/semantic-utest") - ("lisp/ced${CTTQ2}se-u" "lisp/ced${CTTQ2}semantic-utest") + ("lisp/c${CTTQ1}et/se-u-c" "lisp/c${CTTQ1}et/semantic-utest-c.test") + ("lisp/ced${CTTQ2}se-u-c" "lisp/ced${CTTQ2}semantic-utest-c.test") ;; Test that env-vars don't prevent partial-completion. - ("lis/c${CTTQ1}/se-u" "lisp/c${CTTQ1}et/semantic-utest") + ("lis/c${CTTQ1}/se-u-c" "lisp/c${CTTQ1}et/semantic-utest-c.test") )) (should (equal (completion-try-completion input #'completion--file-name-table @@ -118,11 +118,11 @@ ;; When an env var is in the completion bounds, try-completion ;; won't change letter case. ("lisp/c${CTTQ1}E" "lisp/c${CTTQ1}Et/") - ("lisp/ced${CTTQ2}SE-U" "lisp/ced${CTTQ2}SEmantic-utest") + ("lisp/ced${CTTQ2}SE-U-c" "lisp/ced${CTTQ2}SEmantic-utest-c.test") ;; If the env var is before the completion bounds, try-completion ;; *will* change letter case. - ("lisp/c${CTTQ1}et/SE-U" "lisp/c${CTTQ1}et/semantic-utest") - ("lis/c${CTTQ1}/SE-U" "lisp/c${CTTQ1}et/semantic-utest") + ("lisp/c${CTTQ1}et/SE-U-c" "lisp/c${CTTQ1}et/semantic-utest-c.test") + ("lis/c${CTTQ1}/SE-U-c" "lisp/c${CTTQ1}et/semantic-utest-c.test") )) (should (equal (car (completion-try-completion input #'completion--file-name-table @@ -224,7 +224,11 @@ (completion-pcm--merge-try '("tes" point "ing") '("Testing" "testing") "" "")) - '("testing" . 4)))) + '("testing" . 7))) + (should (equal + (let ((completion-ignore-case t)) + (completion-pcm-try-completion "tes" '("Testing" "testing") nil 3)) + '("testing" . 7)))) (ert-deftest completion-pcm-test-1 () ;; Point is at end, this does not match anything @@ -318,6 +322,16 @@ '(prefix any "bar" any) '("xbarxfoo" "ybaryfoo") "" "") '("bar" . 3)))) +(ert-deftest completion-pcm-test-8 () + ;; try-completion inserts the common prefix and suffix at point. + (should (equal (completion-pcm-try-completion + "r" '("fooxbar" "fooybar") nil 0) + '("foobar" . 3))) + ;; Even if point is at the end of the minibuffer. + (should (equal (completion-pcm-try-completion + "" '("fooxbar" "fooybar") nil 0) + '("foobar" . 3)))) + (ert-deftest completion-substring-test-1 () ;; One third of a match! (should (equal commit 33adf9ea4e6ed1b494938ad87c3405e3b8a8f3af Author: Paul Eggert Date: Wed Aug 20 15:33:49 2025 -0700 Update comments re GCC bugs 117423 and 119085 diff --git a/configure.ac b/configure.ac index 8c2e6b421d9..140ff76029e 100644 --- a/configure.ac +++ b/configure.ac @@ -2232,9 +2232,9 @@ AC_CACHE_CHECK([for flag to work around GCC union bugs], [/* Work around GCC bugs 117423 and 119085 re holes in unions: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117423 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119085 - These are fixed in GCC 15.2. + These are fixed in GCC 14.4 and 15.2. - Working wround them also works around GCC bug 58416 + Working around them also works around GCC bug 58416 with double in unions on x86, where the generated insns copy non-floating-point data via fldl/fstpl instruction pairs. This can misbehave if the data's bit pattern looks like a NaN. commit 6eb6ef3d0c731f180b588088a100b190848f24b3 Author: Gerd Möllmann Date: Wed Aug 20 17:40:06 2025 +0100 ; Makefile.in: Fix ldefs-boot.el rule for BSD sed. diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 17182357739..9dacf766108 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -212,7 +212,8 @@ autoloads-force: $(MAKE) autoloads ldefs-boot.el: autoloads-force - sed '/^;; Local Variables:/a ;; no-byte-compile: t'\ + sed '/^;; Local Variables:/a\ +;; no-byte-compile: t'\ < $(lisp)/loaddefs.el > $(lisp)/ldefs-boot.el # This is required by the bootstrap-emacs target in ../src/Makefile, so commit 55f7f00f91677153ef5afcc586e44ea159817dcf Author: Michael Albinus Date: Wed Aug 20 18:14:37 2025 +0200 Change default of tramp-debug-buffer-limit * lisp/net/tramp-message.el (tramp-debug-buffer-limit): Change default to 100MB. Suggested by Francesco Potortì . diff --git a/lisp/net/tramp-message.el b/lisp/net/tramp-message.el index 7f66f7d8087..a328183e184 100644 --- a/lisp/net/tramp-message.el +++ b/lisp/net/tramp-message.el @@ -94,7 +94,7 @@ This increases `tramp-verbose' to 6 if necessary." :type 'boolean :link '(info-link :tag "Tramp manual" "(tramp) Traces and Profiles")) -(defcustom tramp-debug-buffer-limit (* 3 1024 1024 1024) ;3GB +(defcustom tramp-debug-buffer-limit (* 100 1024 1024) ;100MB "The upper limit of a Tramp debug buffer. If the size of a debug buffer exceeds this limit, a warning is raised. Set it to 0 if there is no limit." commit 0c277ad022c9aae0b34eb090583f2eb7f9974e84 Author: Gerd Möllmann Date: Wed Aug 20 14:52:18 2025 +0200 ; Remove declarations introduced in e92da50e057 diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index e4c174ed859..cfca7b4662e 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -687,9 +687,6 @@ Before doing that, check if there are any old backups and get rid of them." (vc-make-version-backup file))))) (declare-function vc-dir-resynch-file "vc-dir" (&optional fname)) -(declare-function vc-diff-outgoing "vc" (&optional remote-location fileset)) -(declare-function vc-diff-incoming "vc" (&optional remote-location fileset)) -(declare-function vc-working-tree-switch-project "vc" (dir)) (defvar vc-dir-buffers nil "List of `vc-dir' buffers.") commit c60db19ee2376b5f8fab667511144d902108d976 Author: Sean Whitton Date: Wed Aug 20 13:11:14 2025 +0100 Rename some incoming & outgoing diff commands * lisp/vc/vc.el (vc-fileset-diff-incoming) (vc-fileset-diff-outgoing): Rename to ... (vc-diff-incoming, vc-diff-outgoing): ... these. All uses changed. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 4e531805f26..3de00fe8684 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1075,7 +1075,7 @@ Display a diff of all changes that a pull operation will retrieve. If you customize @code{vc-use-incoming-outgoing-prefixes} to non-@code{nil}, this command becomes available on @kbd{C-x v I D}. -@item M-x vc-fileset-diff-incoming +@item M-x vc-diff-incoming Display a diff of changes that a pull operation will retrieve, but limited to the current fileset. @@ -1097,7 +1097,7 @@ operation. If you customize @code{vc-use-incoming-outgoing-prefixes} to non-@code{nil}, this command is bound to @kbd{C-x v O D}. -@item M-x vc-fileset-diff-outgoing +@item M-x vc-diff-outgoing Display a diff of changes that will be sent by the next push operation, but limited to the current fileset. @@ -1197,14 +1197,13 @@ use a prefix argument here too to specify a particular remote location. quickly check that all and only the changes you intended to include were committed and will be pushed. -@findex vc-fileset-diff-incoming -@findex vc-fileset-diff-outgoing - The commands @code{vc-fileset-diff-incoming} and -@code{vc-fileset-diff-outgoing} are very similar. They also display -changes that would be pulled or pushed. The difference is that the -diffs reported are limited to the current fileset. Don't forget that -actual pull and push operations always affect the whole working tree, -not just the current fileset. +@findex vc-diff-incoming +@findex vc-diff-outgoing + The commands @code{vc-diff-incoming} and @code{vc-diff-outgoing} are +very similar. They also display changes that would be pulled or pushed. +The difference is that the diffs reported are limited to the current +fileset. Don't forget that actual pull and push operations always +affect the whole working tree, not just the current fileset. @cindex VC log buffer, commands in @cindex vc-log buffer diff --git a/etc/NEWS b/etc/NEWS index ebf03b53e12..f45ee437bf9 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2141,8 +2141,8 @@ In particular, 'vc-root-diff-outgoing' is useful as a way to preview your push and ensure that all and only the changes you intended to include were committed and will be pushed. -'vc-fileset-diff-incoming' and 'vc-fileset-diff-outgoing' are similar -but limited to the current VC fileset. +'vc-diff-incoming' and 'vc-diff-outgoing' are similar but limited to the +current VC fileset. +++ *** New user option 'vc-use-incoming-outgoing-prefixes'. diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 53602491cad..e4c174ed859 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -687,8 +687,8 @@ Before doing that, check if there are any old backups and get rid of them." (vc-make-version-backup file))))) (declare-function vc-dir-resynch-file "vc-dir" (&optional fname)) -(declare-function vc-fileset-diff-outgoing "vc" (&optional remote-location fileset)) -(declare-function vc-fileset-diff-incoming "vc" (&optional remote-location fileset)) +(declare-function vc-diff-outgoing "vc" (&optional remote-location fileset)) +(declare-function vc-diff-incoming "vc" (&optional remote-location fileset)) (declare-function vc-working-tree-switch-project "vc" (dir)) (defvar vc-dir-buffers nil "List of `vc-dir' buffers.") @@ -979,11 +979,11 @@ In the latter case, VC mode is deactivated for this buffer." (defvar-keymap vc-incoming-prefix-map "L" #'vc-log-incoming - "=" #'vc-fileset-diff-incoming + "=" #'vc-diff-incoming "D" #'vc-root-diff-incoming) (defvar-keymap vc-outgoing-prefix-map "L" #'vc-log-outgoing - "=" #'vc-fileset-diff-outgoing + "=" #'vc-diff-outgoing "D" #'vc-root-diff-outgoing) (defcustom vc-use-incoming-outgoing-prefixes nil diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 95b8a6f3a23..9634b06a40e 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2546,10 +2546,10 @@ See `vc-use-incoming-outgoing-prefixes' regarding giving this command a global binding." (interactive (list (vc--maybe-read-remote-location))) (vc--with-backend-in-rootdir "VC root-diff" - (vc-fileset-diff-incoming remote-location `(,backend (,rootdir))))) + (vc-diff-incoming remote-location `(,backend (,rootdir))))) ;;;###autoload -(defun vc-fileset-diff-incoming (&optional remote-location fileset) +(defun vc-diff-incoming (&optional remote-location fileset) "Report changes to VC fileset that would be pulled from REMOTE-LOCATION. When unspecified REMOTE-LOCATION is the place \\[vc-update] would pull from. When called interactively with a prefix argument, prompt for REMOTE-LOCATION. @@ -2579,10 +2579,10 @@ See `vc-use-incoming-outgoing-prefixes' regarding giving this command a global binding." (interactive (list (vc--maybe-read-remote-location))) (vc--with-backend-in-rootdir "VC root-diff" - (vc-fileset-diff-outgoing remote-location `(,backend (,rootdir))))) + (vc-diff-outgoing remote-location `(,backend (,rootdir))))) ;;;###autoload -(defun vc-fileset-diff-outgoing (&optional remote-location fileset) +(defun vc-diff-outgoing (&optional remote-location fileset) "Report changes to VC fileset that would be pushed to REMOTE-LOCATION. When unspecified REMOTE-LOCATION is the place \\[vc-push] would push to. When called interactively with a prefix argument, prompt for REMOTE-LOCATION.