Merge from origin/emacs-31

249e293f7a em-script-tests: don't load the site file
442674babb emacsclient-tests: don't load the site file
b4612c6f29 Fix navigating vertical completions with annotations (bug...
f60d4243e6 Fix 'describe-package' for the Emacs pseudo package
d3229f9f37 Avoid errors in text-only client frames of PGTK build
This commit is contained in:
Sean Whitton 2026-08-24 11:29:00 +01:00
commit 6a8c1253dd
5 changed files with 17 additions and 8 deletions

View file

@ -2815,7 +2815,10 @@ If no such file exists, the function returns nil."
"Insert the package description for PKG.
Helper function for `describe-package'."
(require 'lisp-mnt)
(let* ((desc (package-get-descriptor pkg t))
(let* ((desc (if (eq pkg 'emacs)
(package--from-builtin
(assq 'emacs package--builtins))
(package-get-descriptor pkg t)))
(name (if desc (package-desc-name desc) pkg))
(pkg-dir (if desc (package-desc-dir desc)))
(reqs (if desc (package--dependencies desc)))

View file

@ -932,7 +932,9 @@ invert the prefix arg instead."
(if (stringp dpy)
(cond
((featurep 'pgtk)
(setq classname (pgtk-backend-display-class))
(setq classname
(if (window-system)
(pgtk-backend-display-class)))
(if (equal classname "GdkWaylandDisplay")
(progn
;; The `display' frame parameter is probably wrong.

View file

@ -10178,8 +10178,11 @@ the completions is popped up and down."
(last-col (progn
(first-completion)
(goto-char (pos-eol))
(goto-char (previous-single-property-change
(point) 'mouse-face))
;; Go to the beginning of the candidate. We loop
;; to move past any completion annotations.
(while (not (get-text-property (point) 'mouse-face))
(goto-char
(previous-single-property-change (point) 'mouse-face)))
(current-column))))
(if (zerop last-col)
;; If there is only one column of completions, the last

View file

@ -50,12 +50,13 @@
(ert-deftest emacsclient-test-alternate-editor-allows-arguments ()
(emacsclient-test-call-emacsclient
(concat (expand-file-name invocation-name invocation-directory) " --batch")))
(concat (expand-file-name invocation-name invocation-directory)
" --batch -Q")))
(ert-deftest emacsclient-test-alternate-editor-allows-quotes ()
(emacsclient-test-call-emacsclient
(concat "\"" (expand-file-name invocation-name invocation-directory)
"\"" " --batch")))
"\"" " --batch -Q")))
(provide 'emacsclient-tests)
;;; emacsclient-tests.el ends here

View file

@ -138,7 +138,7 @@
(with-temp-eshell-settings
(call-process (expand-file-name invocation-name invocation-directory)
nil '(t nil) nil
"--batch" "-f" "eshell-batch-file" temp-file))
"--batch" "-Q" "-f" "eshell-batch-file" temp-file))
(should (equal (buffer-string) "hi\n")))))
(ert-deftest em-script-test/batch-file/shebang ()
@ -149,7 +149,7 @@
(string-match-p "openbsd" system-configuration))))
(ert-with-temp-file temp-file
:text (format
"#!/usr/bin/env -S %s --batch -f eshell-batch-file\necho hi"
"#!/usr/bin/env -S %s --batch -Q -f eshell-batch-file\necho hi"
(expand-file-name invocation-name invocation-directory))
(set-file-modes temp-file #o744)
(with-temp-buffer