commit be34fc99d6a8b5ab64e4c1538ac9af8d2b11435e Author: Sean Whitton Date: Fri Sep 25 18:27:28 2026 +0100 VC: Cache failures to find the incoming revision * lisp/vc/vc-dir.el (vc-dir--count-outgoing): Bind non-essential to non-nil around call to vc-incoming-outgoing-internal. * lisp/vc/vc.el (vc--incoming-revision): Cache failures to find the incoming revision. Make sure that C-g can quit an attempt to find the incoming revision. diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index d702cc8efa5..6df3c370d63 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -1572,9 +1572,12 @@ uses OVERLAY." (with-current-buffer buf (condition-case _ (progn - (vc-incoming-outgoing-internal backend nil - (current-buffer) - '(log-outgoing short)) + ;; `non-essential' here affects TRAMP if this repo + ;; is remote, and also `vc--incoming-revision'. + (let ((non-essential t)) + (vc-incoming-outgoing-internal backend nil + (current-buffer) + '(log-outgoing short))) (setq proc (get-buffer-process (current-buffer))) (set-process-query-on-exit-flag proc nil) (overlay-put overlay 'proc proc) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 25e8b943778..ae1e526a058 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -4666,19 +4666,49 @@ BACKEND is the VC backend." ;; Do store `nil', before signaling an error, if there is no incoming ;; revision, because that's also something that can be slow to ;; determine and so should be remembered. - (or (if-let* ((_ (not refresh)) - (record (assoc upstream-location - (vc--repo-getprop backend - 'vc-incoming-revision)))) - (cdr record) - (let ((res (vc-call-backend backend 'incoming-revision - upstream-location refresh)) - (alist (vc--repo-getprop backend 'vc-incoming-revision))) - (prog1 - (setf (alist-get upstream-location alist nil nil #'equal) - res) - (vc--repo-setprop backend 'vc-incoming-revision alist)))) - (user-error "No incoming revision -- local-only branch?"))) + ;; Similarly cache failures because of how every refresh of VC-Dir + ;; calls us, via `vc-dir--set-header' and `vc-dir--count-outgoing': + ;; finding the incoming revision is always synchronous and so if the + ;; fetch times out or the user decides to C-g it, we want to avoid + ;; trying again, synchronously and probably fruitlessly, when VC-Dir + ;; is refreshed. Ignore cached failures when `non-essential' is nil + ;; so that interactive callers always retry the failure. + (cond* + ((bind* + (rec (and (not refresh) + (assoc upstream-location + (vc--repo-getprop backend + 'vc-incoming-revision)))))) + ((and rec (null (cdr rec))) + (user-error "No incoming revision -- local-only branch?")) + ((and rec (atom (cdr rec))) + (cdr rec)) + ((and rec non-essential) + (error "Previous attempt to find incoming revision failed, \ +not trying again: %s" (error-message-string (cdr rec)))) + ((bind* + (msg (substitute-command-keys "\ +Finding incoming revision ... (\\[keyboard-quit] to skip)")) + (res (condition-case-unless-debug err + ;; `vc-dir--count-outgoing' calls us from an idle timer + ;; which binds `inhibit-quit' to non-nil. + (let ((inhibit-quit nil)) + (with-delayed-message (2 msg) + (vc-call-backend backend 'incoming-revision + upstream-location refresh))) + ((error quit) err))) + (alist (vc--repo-getprop backend 'vc-incoming-revision)) + (rec (assoc upstream-location alist)))) + ;; Don't overwrite a useful cached value with an error. + ((not (and rec (atom (cdr rec)) (consp res))) + (setf (alist-get upstream-location alist nil nil #'equal) res) + (vc--repo-setprop backend 'vc-incoming-revision alist) + :non-exit) + ((consp res) + (error "Attempt to find incoming revision failed: %s" + (error-message-string res))) + (res) + (t (user-error "No incoming revision -- local-only branch?")))) ;;;###autoload (defun vc-root-log-incoming (&optional upstream-location) commit 10b12da3eb1043094161bd8939cfb0e19256c0bd Merge: 517ee1fe9ff 11e007541f8 Author: Sean Whitton Date: Fri Sep 25 16:59:11 2026 +0100 Merge from origin/emacs-31 11e007541f8 vc--incoming-revision: Fix alist update 57d3ecea5e1 Fix DirectWrite drawing glyphs from a wrong font 9a7357a299b ; Minor change in Custom menus 6baea4ccac5 ; Minor fixes for MSDOS build 77805ebd0fb ; Improve documentation of help-definition-prefixes. 6786d76a5f5 vc-apply-to-other-working-tree: Fix for unbound vc-FOO-di... 803f8c18b97 Fix calc of large image sizes in Cairo etc commit 11e007541f88f395c4033ea1af83abacba8dd15f Author: Sean Whitton Date: Fri Sep 25 16:56:11 2026 +0100 vc--incoming-revision: Fix alist update * lisp/vc/vc.el (vc--incoming-revision): Always write the alist back to the repo property. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 87af84352ad..d2b5f0b4e42 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -4660,16 +4660,12 @@ BACKEND is the VC backend." 'vc-incoming-revision)))) (cdr record) (let ((res (vc-call-backend backend 'incoming-revision - upstream-location refresh))) - (if-let* ((alist (vc--repo-getprop backend - 'vc-incoming-revision))) - (setf (alist-get upstream-location alist - nil nil #'equal) + upstream-location refresh)) + (alist (vc--repo-getprop backend 'vc-incoming-revision))) + (prog1 + (setf (alist-get upstream-location alist nil nil #'equal) res) - (vc--repo-setprop backend - 'vc-incoming-revision - `((,upstream-location . ,res)))) - res)) + (vc--repo-setprop backend 'vc-incoming-revision alist)))) (user-error "No incoming revision -- local-only branch?"))) ;;;###autoload commit 517ee1fe9ff8004fea1622d9a401ddaff20bf893 Author: Arash Esbati Date: Fri Sep 25 17:24:47 2026 +0200 ; Improve parsing in verbatim context (bug#81805) * lisp/textmodes/reftex-parse.el (reftex-parse-from-file): Don't change match data when calling `syntax-ppss'. * test/lisp/textmodes/reftex-tests.el (reftex-parse-ignore-verbatim-context-bug81805): New test. diff --git a/lisp/textmodes/reftex-parse.el b/lisp/textmodes/reftex-parse.el index 3e9fd6d98ab..03702c3f45f 100644 --- a/lisp/textmodes/reftex-parse.el +++ b/lisp/textmodes/reftex-parse.el @@ -211,7 +211,8 @@ of master file." (verbatim-p (lambda () (let (syntax) (or ;; This is for AUCTeX `LaTeX-mode': - (nth 3 (setq syntax (syntax-ppss))) + (nth 3 (save-match-data + (setq syntax (syntax-ppss)))) ;; This is for built-in `latex-mode': (nth 4 syntax)))))) diff --git a/test/lisp/textmodes/reftex-tests.el b/test/lisp/textmodes/reftex-tests.el index ea86235aba4..e27dabd7f3d 100644 --- a/test/lisp/textmodes/reftex-tests.el +++ b/test/lisp/textmodes/reftex-tests.el @@ -139,6 +139,41 @@ (should (null parsed))) (t (should-not t))))))))) +(ert-deftest reftex-parse-ignore-verbatim-context-bug81805 () + "Test for parsing elements in verbatim context." + (ert-with-temp-directory temp-dir + (let ((tex-file (expand-file-name "verbatim.tex" temp-dir)) + toc docstruct) + (with-temp-buffer + (insert "\ +\\documentclass{article} + +\\begin{document} + +\\section{Introduction} +\\label{sec:intro} + +\\begin{verbatim} +\\section{Ignore} +\\label{sec:ignore} +\\end{verbatim} + +\\section{Conclusion} +\\label{sec:conclu} + +\\end{document}") + (write-region (point-min) (point-max) tex-file)) + (find-file tex-file) + (reftex-parse-all) + (setq docstruct (symbol-value reftex-docstruct-symbol)) + ;; \label is never ignored: + (should (assoc "sec:ignore" docstruct)) + (setq toc (reftex-all-assq 'toc docstruct)) + ;; \section is ignored: + (dolist (elt toc) + (should-not (string-search "Ignore" (nth 2 elt)))) + (kill-buffer (file-name-nondirectory tex-file))))) + ;;; reftex-cite (require 'reftex-cite) commit 193785af9fb7c269dfadfdbf96d3418e03787cc2 Author: Stephen Berman Date: Fri Sep 25 17:06:15 2026 +0200 Fix creation of commit message from ChangeLog (bug#81909) * lisp/vc/log-edit.el (log-edit-insert-changelog-entry): Display warning only when ChangeLog entry lists a file that is not in the changeset to commit, but not vice versa, since it is sometimes preferable to omit listing certain changed files in the commit message. Adjust warning text and doc string accordingly. * doc/emacs/maintaining.texi (Log Buffer): * etc/NEWS: Adjust text to change in warning trigger. * test/lisp/vc/vc-tests/vc-test-misc.el (vc-test-log-message-from-changelog): Simplify. (vc-test-log-message-from-changelog-with-warning): New test. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 99020769eed..eaf6400e68f 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -833,10 +833,9 @@ or buffer, then the command simply inserts the entire body of the entry into the @file{*vc-log*} buffer. In addition, if the first line of the entry does not begin with @samp{* } (an asterisk followed by a space), VC considers it to be a summary line and moves it to the @samp{Summary} -header. Finally, if VC detects that the set of changed files listed in -the ChangeLog entry differs from the current VC fileset, it displays a -warning urging you to fix this discrepancy before committing the -changes. +header. Finally, if one or more files listed in the ChangeLog entry are +not in the current VC fileset, VC displays a warning urging you to fix +this discrepancy before committing the changes. @ifnottex If you are using CVS or RCS, see @ref{Change Logs and VC}, for the diff --git a/etc/NEWS b/etc/NEWS index 5dc00e5b870..5cf10dbb92f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -266,9 +266,9 @@ intuitive. When VC detects that all log entries for the current changeset come from the same ChangeLog file or buffer, it now inserts the entire body of the ChangeLog entry into the "*vc-log*" buffer. If the ChangeLog entry -contains a summary line, VC inserts it into the "*vc-log*" Summary header. -If VC detects that the set of changed files listed in the ChangeLog -entry differs from the current VC fileset, it displays a warning. +contains a summary line, VC inserts it into the "*vc-log*" Summary +header. If one or more files listed in the ChangeLog entry are not in +the current VC fileset, VC displays a warning. --- *** The face 'log-edit-headers-separator' inherits from separator-line. diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 814e32df1cc..83a2896d2bf 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -1395,10 +1395,9 @@ does not begin with \"* \", move it to the Summary header in the \"*vc-log*\" buffer, thus making is the summary line of the commit message. -If the set of files listed in the ChangeLog entry differs from the set -of files with changes to commit according to VC, display a warning -urging the user to correct this discrepancy before committing the -changes." +If any of the files listed in the ChangeLog entry are not in the VC +fileset to commit, display a warning urging the user to correct this +discrepancy before committing the changes." (let (summary beg end files-in-changelog) (with-current-buffer buffer (save-restriction @@ -1429,13 +1428,14 @@ changes." (push fn files-in-changelog)))))))) (log-edit-changelog-insert-entries buffer beg end) (when summary (log-edit-set-header "Summary" summary)) - (unless (seq-set-equal-p + (unless (cl-subsetp + files-in-changelog (save-current-buffer (nth 2 (vc-deduce-fileset nil nil 'state-model-only-files))) - files-in-changelog) + :test 'equal) (display-warning 'log-edit - "Files in ChangeLog entry differ from files with changes to commit! + "A file in the ChangeLog entry is not in the changeset to commit! Remove this discrepancy before committing the changes by adjusting as appropriate either the ChangeLog entry or the selection of files to commit.")))) diff --git a/test/lisp/vc/vc-tests/vc-test-misc.el b/test/lisp/vc/vc-tests/vc-test-misc.el index df680aa9e75..9d893dc6ffb 100644 --- a/test/lisp/vc/vc-tests/vc-test-misc.el +++ b/test/lisp/vc/vc-tests/vc-test-misc.el @@ -536,7 +536,7 @@ See bug#80803 and bug#80967." (skip-unless (executable-find vc-git-program)) (vc-test--with-author-identity 'Git (let ((vc-handled-backends '(Git)) - file-buf vc-dir-buf vc-diff-buf changelog-buf log-edit-buf + vc-dir-buf vc-diff-buf changelog-buf log-edit-buf changelog-entry log-edit-entry) (unwind-protect (ert-with-temp-directory tempdir @@ -545,13 +545,12 @@ See bug#80803 and bug#80967." vc-async-checkin) (vc-test--create-repo-function 'Git) (write-region "hello\n" nil file) - (with-current-buffer (setq file-buf (find-file-noselect file)) - (vc-register `(Git (,file))) - (vc-checkin (list file) 'Git) - (insert "Initial commit") - (let (vc-async-checkin) - (log-edit-done)) - (write-region "Hello\n" nil "README" nil t)) + (vc-register `(Git (,file))) + (vc-checkin (list file) 'Git) ; Makes *vc-log* current buffer. + (insert "Initial commit") + (let (vc-async-checkin) + (log-edit-done)) + (write-region "Hello\n" nil "README" nil t) (vc-dir default-directory 'Git) (while (vc-dir-busy) (sit-for 0.05)) (setq vc-dir-buf (current-buffer)) @@ -581,9 +580,78 @@ See bug#80803 and bug#80967." (setq log-edit-entry (buffer-substring-no-properties (point) (point-max))) (should (equal changelog-entry log-edit-entry)))) - (dolist (buf (list file-buf vc-dir-buf vc-diff-buf changelog-buf + (dolist (buf (list vc-dir-buf vc-diff-buf changelog-buf log-edit-buf "*log-edit-files*" "*vc*")) (kill-buffer buf)))))) +(ert-deftest vc-test-log-message-from-changelog-with-warning () ; bug#81909 + "Test (not) displaying warning on insertion of log message." + (skip-unless (executable-find vc-git-program)) + (vc-test--with-author-identity 'Git + (let ((vc-handled-backends '(Git)) + (def-dir default-directory) + buffers) + (unwind-protect + (ert-with-temp-directory tempdir + (let* ((default-directory tempdir) + (data + (list + (list + (expand-file-name "foo.el" default-directory) + "(defun foo-do()\n (quux 'do))" + "(defun foo-do(&optional arg)\n (quux (or arg 'do)))") + (list + (expand-file-name "bar.el" default-directory) + "(defun bar-do()\n (foo))" + "(defun bar-do()\n (foo quux-do))"))) + (files (mapcar #'car data)) + vc-async-checkin) + (make-empty-file "quux.el") + (push (expand-file-name "quux.el" default-directory) files) + (vc-test--create-repo-function 'Git) + (dolist (d data) + (write-region (nth 1 d) nil (nth 0 d))) + (vc-register `(Git ,files)) + (vc-checkin files 'Git) ; *vc-log* now current buffer. + (insert "Initial commit") + (let (vc-async-checkin) + (log-edit-done)) ; *vc-log* now killed. + (dolist (d data) + (write-region (nth 2 d) nil (nth 0 d))) + (vc-dir default-directory 'Git) ; *vc-dir* now current buffer. + (while (vc-dir-busy) (sit-for 0.05)) + (push (current-buffer) buffers) + (save-window-excursion + (vc-diff) ; *vc-diff* now current buffer. + (push (current-buffer) buffers) + (diff-add-change-log-entries-other-window) + (push (get-buffer "foo.el") buffers) + (push (get-buffer "bar.el") buffers) + (push (get-buffer (concat "*changes to " tempdir "*")) + buffers)) + (vc-next-action nil) ; *vc-log* now current buffer. + (should-not (get-buffer "*Warnings*")) + (kill-buffer (get-buffer "*vc-log*")) + (switch-to-buffer (concat "*changes to " tempdir "*")) + (goto-char (point-max)) + (re-search-backward "^\t\\*") + ;; Remove last entry from log buffer. + (delete-region (pos-bol) (+ (pos-eol) 2)) + (switch-to-buffer (car (last buffers))) ; *vc-dir* + (vc-next-action nil) ; *vc-log* now current buffer. + (should-not (get-buffer "*Warnings*")) + (kill-buffer (get-buffer "*vc-log*")) + (switch-to-buffer (concat "*changes to " tempdir "*")) + (goto-char (point-max)) + ;; Add entry that's not in changeset. + (insert "\t* quux.el: \n\n") + (switch-to-buffer (car (last buffers))) ; *vc-dir* + (vc-next-action nil) ; *vc-log* now current buffer. + (push (current-buffer) buffers) + (should (get-buffer "*Warnings*")) + (push (get-buffer "*Warnings*") buffers))) + (dolist (buf buffers) + (kill-buffer buf)))))) + (provide 'vc-test-misc) ;;; vc-test-misc.el ends here commit 57d3ecea5e19dffbf9ab2564c1af21eef3057b34 Author: Cecilio Pardo Date: Thu Sep 24 19:52:57 2026 +0200 Fix DirectWrite drawing glyphs from a wrong font The glyph indices we draw on MS-Windows are produced by HarfBuzz from the font tables read with GetFontData from the HFONT that GDI realized, but the DirectWrite font face used to draw and measure them was obtained separately, by matching the LOGFONT against DirectWrite's font collection with CreateFontFromLOGFONT. Nothing guarantees that both lookups resolve to the same physical font, and they do not when two versions of a font are installed. As glyph indices are only meaningful for the font they were produced from, what gets displayed in that case is unrelated glyphs. Use CreateFontFaceFromHdc instead, which is documented to return the face of the font GDI would use, and verify that the two agree before drawing with DirectWrite. (Bug#81832) * src/w32dwrite.c (IDWriteFontFaceVtbl): Declare GetGlyphCount. (IDWriteGdiInteropVtbl): Declare CreateFontFaceFromHdc. (get_font_face): Get the font face from a device context that has the font selected, instead of from the LOGFONT. Don't use DirectWrite for the font if its number of glyphs disagrees with the one GDI reports in the 'maxp' table. diff --git a/src/w32dwrite.c b/src/w32dwrite.c index 664a7fe66d6..0c750f17b6c 100644 --- a/src/w32dwrite.c +++ b/src/w32dwrite.c @@ -220,7 +220,7 @@ typedef struct IDWriteFontFaceVtbl { void (STDMETHODCALLTYPE *GetMetrics) (IDWriteFontFace *This, DWRITE_FONT_METRICS *metrics); - EMACS_DWRITE_UNUSED (GetGlyphCount); + UINT16 (STDMETHODCALLTYPE *GetGlyphCount) (IDWriteFontFace *This); EMACS_DWRITE_UNUSED (GetDesignGlyphMetrics); HRESULT (STDMETHODCALLTYPE *GetGlyphIndices) @@ -392,7 +392,8 @@ typedef struct IDWriteGdiInteropVtbl { EMACS_DWRITE_UNUSED (ConvertFontToLOGFONT); EMACS_DWRITE_UNUSED (ConvertFontFaceToLOGFONT); - EMACS_DWRITE_UNUSED (CreateFontFaceFromHdc); + HRESULT (STDMETHODCALLTYPE *CreateFontFaceFromHdc) + (IDWriteGdiInterop *This, HDC hdc, IDWriteFontFace **font_face); HRESULT (STDMETHODCALLTYPE *CreateBitmapRenderTarget) (IDWriteGdiInterop *This, HDC hdc, UINT32 width, UINT32 height, @@ -708,6 +709,15 @@ verify_hr (HRESULT hr, const char *msg) font size in points. It may fail to get a DirectWrite font, and face will be NULL on return. This happens for some fonts like Courier. + We ask DirectWrite for the face of the font that GDI realized in a + device context, instead of matching the LOGFONT against DirectWrite's + font collection. Only the former is documented to reference the same + physical font that GDI would use, and that is the font whose tables + HarfBuzz read to produce the glyph indices we are going to draw. If + the two resolve to different files, as can happen when two versions + of a font are installed, the glyph indices are meaningless for the + font we draw with, and we display garbage. + Never call Release on the result, as it is cached for reuse on the struct font. */ static float @@ -715,7 +725,6 @@ get_font_face (struct font *infont, IDWriteFontFace **face) { HRESULT hr; LOGFONTW logfont; - IDWriteFont *font; struct uniscribe_font_info *uniscribe_font = (struct uniscribe_font_info *) infont; @@ -727,24 +736,49 @@ get_font_face (struct font *infont, IDWriteFontFace **face) GetObjectW (FONT_HANDLE (infont), sizeof (LOGFONTW), &logfont); - hr = gdi_interop->lpVtbl->CreateFontFromLOGFONT (gdi_interop, - (const LOGFONTW *) &logfont, - &font); + /* Select the font into a DC, so that DirectWrite can give us the face + for the font GDI realizes for it. */ + struct frame *f = SELECTED_FRAME (); + HDC hdc = get_frame_dc (f); + HFONT old_font = SelectObject (hdc, FONT_HANDLE (infont)); + + hr = gdi_interop->lpVtbl->CreateFontFaceFromHdc (gdi_interop, hdc, face); + + /* The number of glyphs of the font GDI selected, from its 'maxp' + table. The tag is pushed into a DWORD backwards, to cope with + endianness, as GetFontData expects it. */ + BYTE num_glyphs[2]; + DWORD nbytes = GetFontData (hdc, ('p' << 24) | ('x' << 16) | ('a' << 8) | 'm', + 4, num_glyphs, 2); - if (!verify_hr (hr, "Failed to CreateFontFromLOGFONT")) + SelectObject (hdc, old_font); + release_frame_dc (f, hdc); + + if (!verify_hr (hr, "Failed to CreateFontFaceFromHdc")) { uniscribe_font->dwrite_skip_font = true; *face = NULL; return 0.0; } - hr = font->lpVtbl->CreateFontFace (font, face); - RELEASE_COM (font); - if (!verify_hr (hr, "Failed to create DWriteFontFace")) + /* CreateFontFaceFromHdc is documented to return the face of the font + that GDI uses, but if that ever fails to hold, we would be drawing + glyph indices produced from the GDI font with a different font, + and display garbage. Verify it, and let GDI do the drawing for + this font if the two disagree. If 'maxp' could not be read, + skip the check rather than lose DirectWrite for this font. */ + if (nbytes == 2) { - uniscribe_font->dwrite_skip_font = true; - *face = NULL; - return 0.0; + unsigned gdi_glyph_count = (num_glyphs[0] << 8) + num_glyphs[1]; + + if (gdi_glyph_count != (*face)->lpVtbl->GetGlyphCount (*face)) + { + DebPrint (("DirectWrite and GDI disagree about the font\n")); + RELEASE_COM (*face); + uniscribe_font->dwrite_skip_font = true; + *face = NULL; + return 0.0; + } } /* Cache this FontFace. */ commit 9a7357a299b33221ea43ad0d624d0d762e9d6452 Author: Eli Zaretskii Date: Thu Sep 24 16:39:55 2026 +0300 ; Minor change in Custom menus * lisp/cus-edit.el (custom-reset-extended-menu): Avoid apostrophe, so as to prevent display problems when it is converted into Unicode single-quote. diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index a54ecfab614..3b5d9121ef4 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -804,7 +804,7 @@ when the action is chosen.") 'modified)) custom-options))) (define-key-after map [Custom-reset-saved] - `(menu-item "Revert This Session's Customizations" Custom-reset-saved + `(menu-item "Revert Customizations of This Session" Custom-reset-saved :enable (seq-some ,(lambda (option) (memq (widget-get option :custom-state) '(modified set changed rogue))) commit 6baea4ccac5c7a4e5b9410ed97ee5ffd23d21e19 Author: Eli Zaretskii Date: Thu Sep 24 16:32:32 2026 +0300 ; Minor fixes for MSDOS build * lisp/loadup.el (dump-mode): Update name of MSDOS dump file. * msdos/sed2v2.inp (PACKAGE_BUGREPORT): Define. diff --git a/lisp/loadup.el b/lisp/loadup.el index efc9e7ebb40..0b8cb565696 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -596,10 +596,13 @@ directory got moved. This is set to be a pair in the form of: nil) (error nil)))))) (if dump-mode - (let ((output (cond ((equal dump-mode "pdump") "emacs.pdmp") + (let ((output (cond ((equal dump-mode "pdump") + (if (eq system-type 'ms-dos) + "emacs.dmp" + "emacs.pdmp")) ((equal dump-mode "pbootstrap") (if (eq system-type 'ms-dos) - "b-emacs.pdmp" + "b-emacs.dmp" "bootstrap-emacs.pdmp")) (t (error "Unrecognized dump mode %s" dump-mode))))) (when (and (featurep 'native-compile) diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index f5da9e11ba0..bb6f5f65f77 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -62,7 +62,7 @@ /^#undef DATA_START/s/^.*$/#define DATA_START (\&etext + 1)/ /^#undef GC_SETJMP_WORKS/s/^.*$/#define GC_SETJMP_WORKS 1/ /^#undef ORDINARY_LINK/s/^.*$/#define ORDINARY_LINK 1/ -/^#undef PACKAGE_BUGREPORT/s/^.*$/#define PACKAGE_BUGREPORT ""/ +/^#undef PACKAGE_BUGREPORT/s/^.*$/#define PACKAGE_BUGREPORT "bug-gnu-emacs@gnu.org"/ /^#undef PACKAGE_NAME/s/^.*$/#define PACKAGE_NAME ""/ /^#undef PACKAGE_STRING/s/^.*$/#define PACKAGE_STRING ""/ /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/ commit 77805ebd0fbc6a953bb03310117bb1299f66847c Author: Sean Whitton Date: Thu Sep 24 14:01:20 2026 +0100 ; Improve documentation of help-definition-prefixes. diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi index 77880dd611d..5265d146eb7 100644 --- a/doc/lispref/loading.texi +++ b/doc/lispref/loading.texi @@ -822,19 +822,31 @@ function, only a macro. @cindex autoload by prefix @vindex definition-prefixes +@vindex help-definition-prefixes @findex register-definition-prefixes @vindex autoload-compute-prefixes During completion for the commands @code{describe-variable} and -@code{describe-function}, Emacs will try to load files which may -contain definitions matching the prefix being completed. The variable -@code{definition-prefixes} holds a hashtable which maps a prefix to -the corresponding list of files to load for it. Entries to this -mapping are added by calls to @code{register-definition-prefixes} -which are generated by @code{loaddefs-generate} -(@pxref{Autoload}). Files which don't contain any definitions worth -loading (test files, for example), should set -@code{autoload-compute-prefixes} to @code{nil} as a file-local -variable. +@code{describe-function}, Emacs will try to load files which may contain +definitions matching the prefix being completed. The variables +@code{definition-prefixes} and @code{help-definition-prefixes} drive +this process. @code{definition-prefixes} holds a hash table mapping +prefixes to corresponding lists of files to load, and +@code{help-definition-prefixes} holds a radix tree performing the same +mapping. As you use completion and Emacs loads files, entries are +removed from these variables since the files don't need to be loaded +again. + +Entries in @code{definition-prefixes} are added by calls to +@code{register-definition-prefixes} which are generated by +@code{loaddefs-generate} (@pxref{Autoload}). Files which don't contain +any definitions worth loading (test files, for example), should set +@code{autoload-compute-prefixes} to @code{nil} as a file-local variable. + +Entries in @code{help-definition-prefixes} are added from entries in +@code{definition-prefixes} when you start using completion for the +relevant commands. At some point in the future +@code{help-definition-prefixes} may be removed in favour of making +@code{definition-prefixes} a radix tree. @node When to Autoload @subsection When to Use Autoload diff --git a/lisp/subr.el b/lisp/subr.el index b465738f106..dcd09f6ed6b 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -7676,7 +7676,9 @@ Note that it does not imply that all definitions starting with PREFIX can be found in those files. E.g. if prefix is \"gnus-article-\" there might still be definitions of the form \"gnus-article-toto-titi\" in other files, which would presumably appear in this table under another prefix such as -\"gnus-\" or \"gnus-article-toto-\".") +\"gnus-\" or \"gnus-article-toto-\". + +See also `help-definition-prefixes'.") (defun register-definition-prefixes (file prefixes) "Register that FILE uses PREFIXES." commit 6786d76a5f5976a640df11781f7370012747987a Author: Sean Whitton Date: Thu Sep 24 13:38:38 2026 +0100 vc-apply-to-other-working-tree: Fix for unbound vc-FOO-diff-switches * lisp/vc/vc.el (vc--apply-to-other-working-tree): Don't assume vc-FOO-diff-switches is bound. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 2e0e18500b5..87af84352ad 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -6101,14 +6101,17 @@ MOVE non-nil means to move instead of copy." ;; An empty files list makes `vc-diff-internal' diff the ;; whole of `default-directory'. ((cadr diff-fileset) - (cl-letf ((display-buffer-overriding-action - '(display-buffer-no-window (allow-no-window . t))) - ;; Try to disable, e.g., Git's rename detection. - ((symbol-value (vc-make-backend-sym backend - 'diff-switches)) - t)) - (vc-diff-internal nil diff-fileset nil nil nil - (current-buffer)))) + (let ((display-buffer-overriding-action + '(display-buffer-no-window (allow-no-window . t))) + (backend-sym (vc-make-backend-sym backend + 'diff-switches))) + ;; Try to disable, e.g., Git's rename detection. + (if (boundp backend-sym) + (cl-letf (((symbol-value backend-sym) t)) + (vc-diff-internal nil diff-fileset nil nil nil + (current-buffer))) + (vc-diff-internal nil diff-fileset nil nil nil + (current-buffer))))) (t (require 'diff-mode))) ;; We'll handle any `added', `removed', `missing' and ;; `unregistered' files in FILESET by copying or moving whole commit 803f8c18b97b80970235b7723c3eb9e7d5cb3e1f Author: Paul Eggert Date: Wed Sep 23 10:37:00 2026 -0700 Fix calc of large image sizes in Cairo etc Problem reported by Wonyoung Jung. * src/image.c (image_size_in_bytes): If USE_CAIRO || HAVE_X_WINDOWS || HAVE_ANDROID, avoid undefined behavior if image size in bytes fits in ptrdiff_t but not in int. diff --git a/src/image.c b/src/image.c index e76911c3cd3..564bf87c041 100644 --- a/src/image.c +++ b/src/image.c @@ -2479,23 +2479,23 @@ image_size_in_bytes (struct image *img) #if defined USE_CAIRO Emacs_Pixmap pm = img->pixmap; if (pm) - size += pm->height * pm->bytes_per_line; + size += pm->height * (ptrdiff_t) {pm->bytes_per_line}; Emacs_Pixmap msk = img->mask; if (msk) - size += msk->height * msk->bytes_per_line; + size += msk->height * (ptrdiff_t) {msk->bytes_per_line}; #elif defined HAVE_X_WINDOWS || defined HAVE_ANDROID /* Use a nominal depth of 24 and a bpp of 32 for pixmap and 1 bpp for mask, to avoid having to query the server. */ if (img->pixmap != NO_PIXMAP) - size += img->width * img->height * 4; + size += img->width * (ptrdiff_t) {img->height} * 4; if (img->mask != NO_PIXMAP) - size += img->width * img->height / 8; + size += img->width * (ptrdiff_t) {img->height} / 8; if (img->ximg && img->ximg->data) - size += img->ximg->bytes_per_line * img->ximg->height; + size += img->ximg->bytes_per_line * (ptrdiff_t) {img->ximg->height}; if (img->mask_img && img->mask_img->data) - size += img->mask_img->bytes_per_line * img->mask_img->height; + size += img->mask_img->bytes_per_line * (ptrdiff_t) {img->mask_img->height}; #elif defined HAVE_NS if (img->pixmap)