commit a139748e546b86bef3b85d10b9642d62b3e0d69a (HEAD, refs/remotes/origin/master) Author: Po Lu Date: Tue Sep 13 14:28:54 2022 +0800 Fix frames with explicit parent being unmapped after parent shuts down * src/xterm.c (handle_one_xevent): Delete leftover _XEMBED_INFO property after parent shuts down. diff --git a/src/xterm.c b/src/xterm.c index 48502f12d8..96d25b2643 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -18490,6 +18490,10 @@ handle_one_xevent (struct x_display_info *dpyinfo, during the start of save-set processing. */ FRAME_X_OUTPUT (f)->explicit_parent = false; + + /* Remove the leftover XEMBED_INFO property. */ + XDeleteProperty (dpyinfo->display, FRAME_OUTER_WINDOW (f), + dpyinfo->Xatom_XEMBED_INFO); x_make_frame_visible (f); } #endif commit 9f02128bb18e571d661e084cd96b26441f42512f Merge: 2005a7637b 86f0601392 Author: Stefan Kangas Date: Tue Sep 13 06:30:41 2022 +0200 Merge from origin/emacs-28 86f0601392 ; * admin/notes/www: Fix typos. 2cdb9d03fd ; * admin/make-tarball.txt: Minor clarifications. commit 2005a7637bdee10d6757c7b547fabc7b7a3038ae Merge: 2921b5fa16 f771f122d2 Author: Stefan Kangas Date: Tue Sep 13 06:30:41 2022 +0200 ; Merge from origin/emacs-28 The following commit was skipped: f771f122d2 ; Bump Emacs version past 28.2 commit 2921b5fa169b2511045d6f59c5b7977737b187c5 Merge: 5abcc2fc67 739b5d0e52 Author: Stefan Kangas Date: Tue Sep 13 06:30:40 2022 +0200 Merge from origin/emacs-28 739b5d0e52 Update HISTORY for Emacs 28.2 commit 86f0601392300f4cb1f47d5bec93a9ca72431cb7 (refs/remotes/origin/emacs-28) Author: Stefan Kangas Date: Tue Sep 13 04:53:06 2022 +0200 ; * admin/notes/www: Fix typos. diff --git a/admin/notes/www b/admin/notes/www index 61a80e3d19..d1a8f0637f 100644 --- a/admin/notes/www +++ b/admin/notes/www @@ -26,7 +26,7 @@ more specialized, alternative to M-x vc-dir. * Manual pages The scripts admin/make-manuals, admin/upload-manuals can be used to do -a complete update of the on-line manual pages (eg after a release). +a complete update of the on-line manual pages (e.g. after a release). * Renaming pages, redirects @@ -99,7 +99,7 @@ https://lists.gnu.org/r/bug-gnulib/2012-12/msg00072.html To use something other than CVS, convert the web-pages CVS repository to the other VCS, then set up a two-way sync between them. It needs to be two-way in case eg GNU webmasters make a change to the CVS. -Ref eg +Ref e.g. https://github.com/mikjo/bigitr https://lists.gnu.org/r/savannah-hackers-public/2013-04/msg00022.html commit 5abcc2fc679cc256b4fe5fe300cc67fd205aaf26 Author: Paul Eggert Date: Mon Sep 12 15:31:36 2022 -0500 Fix comp-tests.el problem after reconfiguring * test/src/comp-tests.el: Do not byte-compile, as the .elc file would be machine-dependent (bug#51104). diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el index 1b239cec79..a5f33069e0 100644 --- a/test/src/comp-tests.el +++ b/test/src/comp-tests.el @@ -1472,4 +1472,8 @@ folded." (equal (comp-mvar-typeset mvar) comp-tests-cond-rw-expected-type)))))))) +;; Local Variables: +;; no-byte-compile: t +;; End: + ;;; comp-tests.el ends here commit 5e6a7a210bbb92b7f4c94b5765297fd814362338 Author: Juri Linkov Date: Mon Sep 12 22:12:50 2022 +0300 Document the recently added branch commands (bug#50344) * doc/emacs/maintaining.texi (VC Directory Commands): Change the prefix key from "B" to "b". Replace vc-create-tag with vc-create-branch, and vc-retrieve-tag with vc-switch-branch. (Switching Branches): Mention vc-switch-branch bound to 'C-x v b s'. (Creating Branches): Mention vc-create-branch bound to 'C-x v b c'. * lisp/vc/vc-dir.el (vc-dir-mode-map): In branch keymap 'b' rebind "c" from vc-create-tag to vc-create-branch, and "s" from vc-retrieve-tag to vc-switch-branch. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 9f81313844..89e6b2215c 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1398,18 +1398,19 @@ Apart from acting on multiple files, these commands behave much like their single-buffer counterparts (@pxref{Search}). The VC Directory buffer additionally defines some branch-related -commands starting with the prefix @kbd{B}: +commands starting with the prefix @kbd{b}: @table @kbd -@item B c -Create a new branch (@code{vc-create-tag}). +@item b c +Create a new branch (@code{vc-create-branch}). @xref{Creating +Branches}. -@item B l +@item b l Prompt for the name of a branch and display the change history of that branch (@code{vc-print-branch-log}). -@item B s -Switch to a branch (@code{vc-retrieve-tag}). @xref{Switching +@item b s +Switch to a branch (@code{vc-switch-branch}). @xref{Switching Branches}. @item d @@ -1473,7 +1474,7 @@ Mercurial, command @kbd{hg update} is used to switch to another branch. The VC command to switch to another branch in the current directory -is @kbd{C-x v r @var{branch-name} @key{RET}} (@code{vc-retrieve-tag}). +is @kbd{C-x v b s @var{branch-name} @key{RET}} (@code{vc-switch-branch}). On centralized version control systems, you can also switch between branches by typing @kbd{C-u C-x v v} in an up-to-date work file @@ -1623,8 +1624,8 @@ if the current revision is 2.5, the branch ID should be 2.5.1, 2.5.2, and so on, depending on the number of existing branches at that point. This procedure will not work for distributed version control systems -like git or Mercurial. For those systems you should use the prefix -argument to @code{vc-create-tag} (@kbd{C-u C-x v s}) instead. +like git or Mercurial. For those systems you should use the command +@code{vc-create-branch} (@kbd{C-x v b c}) instead. To create a new branch at an older revision (one that is no longer the head of a branch), first select that revision (@pxref{Switching diff --git a/etc/NEWS b/etc/NEWS index 562cb70182..35d3db5ceb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1647,9 +1647,12 @@ info node. This command only works for the Emacs and Emacs Lisp manuals. ** VC ++++ *** 'C-x v b' prefix key is used now for branch commands. 'vc-print-branch-log' is bound to 'C-x v b l', and new commands are 'vc-create-branch' ('C-x v b c') and 'vc-switch-branch' ('C-x v b s'). +The VC Directory buffer now uses the prefix 'b' for these branch-related +commands. +++ *** New command '%' ('vc-dir-mark-by-regexp'). diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index aa8bad7961..b4568727ea 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -357,9 +357,9 @@ See `run-hooks'." (let ((branch-map (make-sparse-keymap))) (define-key map "b" branch-map) - (define-key branch-map "c" #'vc-create-tag) + (define-key branch-map "c" #'vc-create-branch) (define-key branch-map "l" #'vc-print-branch-log) - (define-key branch-map "s" #'vc-retrieve-tag)) + (define-key branch-map "s" #'vc-switch-branch)) (let ((mark-map (make-sparse-keymap))) (define-key map "*" mark-map) commit bcc95bd66d69f418f33d4277b1d2244eb3026ebe Author: Juri Linkov Date: Mon Sep 12 21:41:17 2022 +0300 * lisp/vc/vc.el (vc-print-branch-log): Fix interactive spec. For reading vc-read-revision in the interactive spec use the same 'backend' and 'rootdir' as in the body of the same function. diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 8491690a4e..39a5be6654 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2741,8 +2741,10 @@ with its diffs (if the underlying VCS supports that)." (defun vc-print-branch-log (branch) "Show the change log for BRANCH root in a window." (interactive - (list - (vc-read-revision "Branch to log: "))) + (let* ((backend (vc-responsible-backend default-directory)) + (rootdir (vc-call-backend backend 'root default-directory))) + (list + (vc-read-revision "Branch to log: " (list rootdir) backend)))) (when (equal branch "") (error "No branch specified")) (let* ((backend (vc-responsible-backend default-directory)) commit 71302884dd3dec26e34916c30e3893dd15b786f8 Author: Juri Linkov Date: Mon Sep 12 21:07:05 2022 +0300 'C-x v b' prefix key is used for branch commands to create/switch/print branch * lisp/vc/vc.el (vc-create-branch): New command. (vc-retrieve-tag): Add new optional arg 'branchp'. (vc-switch-branch): New command (bug#50344). * lisp/vc/vc-hooks.el (vc-prefix-map): Bind "b c" to vc-create-branch, "b l" to vc-print-branch-log, "b s" to vc-switch-branch. Remove obsolete and suppressed "b" from vc-switch-backend. * lisp/vc/vc-dir.el (vc-dir-mode-map): Rebind 'branch-map' from "B" to "b" for consistency with 'vc-prefix-map'. * lisp/vc/vc-git.el (vc-git-create-tag): For a new branch read its start-point. Ask a confirmation if modified files exist. diff --git a/etc/NEWS b/etc/NEWS index 4248b46d8b..562cb70182 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1647,6 +1647,10 @@ info node. This command only works for the Emacs and Emacs Lisp manuals. ** VC +*** 'C-x v b' prefix key is used now for branch commands. +'vc-print-branch-log' is bound to 'C-x v b l', and new commands are +'vc-create-branch' ('C-x v b c') and 'vc-switch-branch' ('C-x v b s'). + +++ *** New command '%' ('vc-dir-mark-by-regexp'). This command marks files based on a regexp. If given a prefix diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el index 068a66b25b..aa8bad7961 100644 --- a/lisp/vc/vc-dir.el +++ b/lisp/vc/vc-dir.el @@ -356,7 +356,7 @@ See `run-hooks'." (define-key map "G" #'vc-dir-ignore) (let ((branch-map (make-sparse-keymap))) - (define-key map "B" branch-map) + (define-key map "b" branch-map) (define-key branch-map "c" #'vc-create-tag) (define-key branch-map "l" #'vc-print-branch-log) (define-key branch-map "s" #'vc-retrieve-tag)) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 2941cc75be..8d8ea33f8b 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -82,7 +82,7 @@ ;; - annotate-time () OK ;; - annotate-current-time () NOT NEEDED ;; - annotate-extract-revision-at-line () OK -;; TAG SYSTEM +;; TAG/BRANCH SYSTEM ;; - create-tag (dir name branchp) OK ;; - retrieve-tag (dir name update) OK ;; MISCELLANEOUS @@ -1572,13 +1572,25 @@ This requires git 1.8.4 or later, for the \"-L\" option of \"git log\"." (expand-file-name fname (vc-git-root default-directory)))) revision))))) -;;; TAG SYSTEM +;;; TAG/BRANCH SYSTEM + +(declare-function vc-read-revision "vc" + (prompt &optional files backend default initial-input)) (defun vc-git-create-tag (dir name branchp) - (let ((default-directory dir)) - (and (vc-git-command nil 0 nil "update-index" "--refresh") + (let ((default-directory dir) + (start-point (when branchp (vc-read-revision + (format-prompt "Start point" + (car (vc-git-branches))) + (list dir) 'Git)))) + (and (or (zerop (vc-git-command nil t nil "update-index" "--refresh")) + (y-or-n-p "Modified files exist. Proceed? ") + (user-error (format "Can't create %s with modified files" + (if branchp "branch" "tag")))) (if branchp - (vc-git-command nil 0 nil "checkout" "-b" name) + (vc-git-command nil 0 nil "checkout" "-b" name + (when (and start-point (not (eq start-point ""))) + start-point)) (vc-git-command nil 0 nil "tag" name))))) (defun vc-git-retrieve-tag (dir name _update) diff --git a/lisp/vc/vc-hooks.el b/lisp/vc/vc-hooks.el index 1f0eeb7e18..7f0d9e4d86 100644 --- a/lisp/vc/vc-hooks.el +++ b/lisp/vc/vc-hooks.el @@ -857,6 +857,9 @@ In the latter case, VC mode is deactivated for this buffer." ;; (autoload 'vc-prefix-map "vc" nil nil 'keymap) (defvar-keymap vc-prefix-map "a" #'vc-update-change-log + "b c" #'vc-create-branch + "b l" #'vc-print-branch-log + "b s" #'vc-switch-branch "d" #'vc-dir "g" #'vc-annotate "G" #'vc-ignore @@ -883,9 +886,6 @@ In the latter case, VC mode is deactivated for this buffer." (fset 'vc-prefix-map vc-prefix-map) (define-key ctl-x-map "v" 'vc-prefix-map) -(with-suppressed-warnings ((obsolete vc-switch-backend)) - (keymap-set vc-prefix-map "b" #'vc-switch-backend)) - (defvar vc-menu-map (let ((map (make-sparse-keymap "Version Control"))) ;;(define-key map [show-files] diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index c75356c4bd..8491690a4e 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -449,7 +449,7 @@ ;; ;; Return the common ancestor between REV1 and REV2 revisions. -;; TAG SYSTEM +;; TAG/BRANCH SYSTEM ;; ;; - create-tag (dir name branchp) ;; @@ -464,8 +464,9 @@ ;; - retrieve-tag (dir name update) ;; ;; Retrieve the version tagged by NAME of all registered files at or below DIR. +;; If NAME is a branch name, switch to that branch. ;; If UPDATE is non-nil, then update buffers of any files in the -;; tag that are currently visited. The default implementation +;; tag/branch that are currently visited. The default implementation ;; does a sanity check whether there aren't any uncommitted changes at ;; or below DIR, and then performs a tree walk, using the `checkout' ;; function to retrieve the corresponding revisions. @@ -664,8 +665,6 @@ ;; display the branch name in the mode-line. Replace ;; vc-cvs-sticky-tag with that. ;; -;; - Add a primitives for switching to a branch (creating it if required. -;; ;; - Add the ability to list tags and branches. ;; ;;;; Unify two different versions of the amend capability @@ -2433,7 +2432,23 @@ checked out in that new branch." (message "Making %s... done" (if branchp "branch" "tag"))) ;;;###autoload -(defun vc-retrieve-tag (dir name) +(defun vc-create-branch (dir name) + "Descending recursively from DIR, make a branch called NAME. +After a new branch is made, the files are checked out in that new branch. +Uses `vc-create-tag' with the non-nil arg `branchp'." + (interactive + (let ((granularity + (vc-call-backend (vc-responsible-backend default-directory) + 'revision-granularity))) + (list + (if (eq granularity 'repository) + default-directory + (read-directory-name "Directory: " default-directory default-directory t)) + (read-string "New branch name: " nil 'vc-revision-history)))) + (vc-create-tag dir name t)) + +;;;###autoload +(defun vc-retrieve-tag (dir name &optional branchp) "For each file in or below DIR, retrieve their tagged version NAME. NAME can name a branch, in which case this command will switch to the named branch in the directory DIR. @@ -2443,6 +2458,8 @@ If NAME is empty, it refers to the latest revisions of the current branch. If locking is used for the files in DIR, then there must not be any locked files at or below DIR (but if NAME is empty, locked files are allowed and simply skipped). +If the prefix argument BRANCHP is given, switch the branch +and check out the files in that branch. This function runs the hook `vc-retrieve-tag-hook' when finished." (interactive (let* ((granularity @@ -2458,15 +2475,21 @@ This function runs the hook `vc-retrieve-tag-hook' when finished." (read-directory-name "Directory: " default-directory nil t)))) (list dir - (vc-read-revision (format-prompt "Tag name to retrieve" "latest revisions") + (vc-read-revision (format-prompt + (if current-prefix-arg + "Switch to branch" + "Tag name to retrieve") + "latest revisions") (list dir) - (vc-responsible-backend dir))))) + (vc-responsible-backend dir)) + current-prefix-arg))) (let* ((backend (vc-responsible-backend dir)) (update (when (vc-call-backend backend 'update-on-retrieve-tag) (yes-or-no-p "Update any affected buffers? "))) (msg (if (or (not name) (string= name "")) (format "Updating %s... " (abbreviate-file-name dir)) - (format "Retrieving tag %s into %s... " + (format "Retrieving %s %s into %s... " + (if branchp "branch" "tag") name (abbreviate-file-name dir))))) (message "%s" msg) (vc-call-backend backend 'retrieve-tag dir name update) @@ -2474,6 +2497,25 @@ This function runs the hook `vc-retrieve-tag-hook' when finished." (run-hooks 'vc-retrieve-tag-hook) (message "%s" (concat msg "done")))) +;;;###autoload +(defun vc-switch-branch (dir name) + "Switch to the branch NAME in the directory DIR. +If NAME is empty, it refers to the latest revisions of the current branch. +Uses `vc-retrieve-tag' with the non-nil arg `branchp'." + (interactive + (let* ((granularity + (vc-call-backend (vc-responsible-backend default-directory) + 'revision-granularity)) + (dir + (if (eq granularity 'repository) + (expand-file-name (vc-root-dir)) + (read-directory-name "Directory: " default-directory nil t)))) + (list + dir + (vc-read-revision (format-prompt "Switch to branch" "latest revisions") + (list dir) + (vc-responsible-backend dir))))) + (vc-retrieve-tag dir name t)) ;; Miscellaneous other entry points commit 2f9f5e4850a65ce5ead0fd9ee934dfe29d2d01f3 Author: Eli Zaretskii Date: Mon Sep 12 20:02:59 2022 +0300 ; * etc/NEWS: Fix typo and wording of recently added entry. diff --git a/etc/NEWS b/etc/NEWS index d0e76488a7..4248b46d8b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -950,9 +950,9 @@ non-nil in 'special-mode' and its derivatives. +++ *** New commands 'split-root-window-below' and 'split-root-window-right'. -These commands split the root window in two, and are are bound to 'C-x -w 2' and 'C-x w 3' respectively. A number of other useful -window-related commands are now available under 'C-x w' too. +These commands split the root window in two, and are bound to 'C-x w 2' +and 'C-x w 3', respectively. A number of other useful window-related +commands are now available on the 'C-x w' prefix. +++ *** New user option 'display-buffer-avoid-small-windows'. commit 009c7e9a86964aebf00bf32c9adf20efea4292c0 Author: Sean Whitton Date: Mon Sep 12 08:28:17 2022 -0700 ; etc/NEWS: Fix typo. diff --git a/etc/NEWS b/etc/NEWS index 2bc3d0a8fb..d0e76488a7 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -950,7 +950,7 @@ non-nil in 'special-mode' and its derivatives. +++ *** New commands 'split-root-window-below' and 'split-root-window-right'. -These commands split the root window in to, and are are bound to 'C-x +These commands split the root window in two, and are are bound to 'C-x w 2' and 'C-x w 3' respectively. A number of other useful window-related commands are now available under 'C-x w' too. commit 7374b103392d77e888cf363f869dde367ac0fad0 Author: Sean Whitton Date: Mon Sep 12 08:08:16 2022 -0700 ; etc/NEWS: Update for last change. diff --git a/etc/NEWS b/etc/NEWS index 2f52e9bc37..2bc3d0a8fb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -951,7 +951,8 @@ non-nil in 'special-mode' and its derivatives. +++ *** New commands 'split-root-window-below' and 'split-root-window-right'. These commands split the root window in to, and are are bound to 'C-x -7' and 'C-x 9' respectively. +w 2' and 'C-x w 3' respectively. A number of other useful +window-related commands are now available under 'C-x w' too. +++ *** New user option 'display-buffer-avoid-small-windows'. commit 1c13ecae6623a0703c4ff65dbccd311760380c51 Author: Sean Whitton Date: Mon Sep 12 07:30:07 2022 -0700 Add new C-x w prefix map * window.el (window-prefix-map): New map. (ctl-x-map): Unbind split-root-window-below and split-root-window-right. Bind window-prefix-map to C-x w. diff --git a/lisp/window.el b/lisp/window.el index 67a4a4bbf2..d5f42dd10b 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -10558,8 +10558,6 @@ displaying that processes's buffer." (define-key ctl-x-map "{" 'shrink-window-horizontally) (define-key ctl-x-map "-" 'shrink-window-if-larger-than-buffer) (define-key ctl-x-map "+" 'balance-windows) -(define-key ctl-x-map "7" 'split-root-window-below) -(define-key ctl-x-map "9" 'split-root-window-right) (define-key ctl-x-4-map "0" 'kill-buffer-and-window) (define-key ctl-x-4-map "1" 'same-window-prefix) (define-key ctl-x-4-map "4" 'other-window-prefix) @@ -10590,6 +10588,16 @@ displaying that processes's buffer." (put 'shrink-window-horizontally 'repeat-map 'resize-window-repeat-map) (put 'shrink-window 'repeat-map 'resize-window-repeat-map) +(defvar-keymap window-prefix-map + :doc "Keymap for subcommands of \\`C-x w'." + "2" #'split-root-window-below + "3" #'split-root-window-right + "s" #'window-toggle-side-windows + "f" #'tear-off-window + "-" #'fit-window-to-buffer + "0" #'delete-windows-on) +(define-key ctl-x-map "w" window-prefix-map) + (provide 'window) ;;; window.el ends here commit 82530902931416603340feb32cb186173ec2d46d Author: Stefan Kangas Date: Mon Sep 12 15:14:42 2022 +0200 Skip manual GIF metadata test on MS-Windows * test/manual/image-tests.el (image-skip-unless): Add new arg CONDITION. (image-tests-image-metadata/gif): Skip test on MS-Windows when using native image API. (Bug#57691) diff --git a/test/manual/image-tests.el b/test/manual/image-tests.el index c66080cf02..f867047d08 100644 --- a/test/manual/image-tests.el +++ b/test/manual/image-tests.el @@ -31,9 +31,10 @@ ;;; Code: -(defmacro image-skip-unless (format) - `(skip-unless (and (display-images-p) - (image-type-available-p ,format)))) +(defmacro image-skip-unless (format &rest condition) + `(skip-unless (or (and (display-images-p) + (image-type-available-p ,format)) + ,@condition))) (defconst image-tests--images `((gif . ,(expand-file-name "test/data/image/black.gif" @@ -221,7 +222,7 @@ ;; contain metadata. (ert-deftest image-tests-image-metadata/gif () - (image-skip-unless 'gif) + (image-skip-unless 'gif (not w32-use-native-image-API)) (should (memq 'delay (image-metadata (create-image (cdr (assq 'gif image-tests--images))))))) commit 26e56540da8588dfde4228c4a0fafac840e03268 Author: Lars Ingebrigtsen Date: Mon Sep 12 14:17:25 2022 +0200 Don't overwrite error message in `x' in package.el * lisp/emacs-lisp/package.el (package-menu--perform-transaction): Return whether there were errors. (package-menu-execute): Don't overwrite the error message(s) with a success message (bug#51201). diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index bf71447681..70c15d2793 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -3700,30 +3700,34 @@ objects removed." `((delete . ,del) (install . ,ins) (upgrade . ,upg)))) (defun package-menu--perform-transaction (install-list delete-list) - "Install packages in INSTALL-LIST and delete DELETE-LIST." - (if install-list - (let ((status-format (format ":Installing %%d/%d" - (length install-list))) - (i 0) - (package-menu--transaction-status)) - (dolist (pkg install-list) - (setq package-menu--transaction-status - (format status-format (cl-incf i))) - (force-mode-line-update) - (redisplay 'force) - ;; Don't mark as selected, `package-menu-execute' already - ;; does that. - (package-install pkg 'dont-select)))) - (let ((package-menu--transaction-status ":Deleting")) - (force-mode-line-update) - (redisplay 'force) - (dolist (elt (package--sort-by-dependence delete-list)) - (condition-case-unless-debug err - (let ((inhibit-message (or inhibit-message package-menu-async))) - (package-delete elt nil 'nosave)) - (error (message "Error trying to delete `%s': %S" - (package-desc-full-name elt) - err)))))) + "Install packages in INSTALL-LIST and delete DELETE-LIST. +Return nil if there were no errors; non-nil otherwise." + (let ((errors nil)) + (if install-list + (let ((status-format (format ":Installing %%d/%d" + (length install-list))) + (i 0) + (package-menu--transaction-status)) + (dolist (pkg install-list) + (setq package-menu--transaction-status + (format status-format (cl-incf i))) + (force-mode-line-update) + (redisplay 'force) + ;; Don't mark as selected, `package-menu-execute' already + ;; does that. + (package-install pkg 'dont-select)))) + (let ((package-menu--transaction-status ":Deleting")) + (force-mode-line-update) + (redisplay 'force) + (dolist (elt (package--sort-by-dependence delete-list)) + (condition-case-unless-debug err + (let ((inhibit-message (or inhibit-message package-menu-async))) + (package-delete elt nil 'nosave)) + (error + (push (package-desc-full-name elt) errors) + (message "Error trying to delete `%s': %S" + (package-desc-full-name elt) err))))) + errors)) (defun package--update-selected-packages (add remove) "Update the `package-selected-packages' list according to ADD and REMOVE. @@ -3796,8 +3800,8 @@ Optional argument NOQUERY non-nil means do not ask the user to confirm." (message "Operation %s started" message-template) ;; Packages being upgraded are not marked as selected. (package--update-selected-packages .install .delete) - (package-menu--perform-transaction install-list delete-list) - (when package-selected-packages + (unless (package-menu--perform-transaction install-list delete-list) + ;; If there weren't errors, output data. (if-let* ((removable (package--removable-packages))) (message "Operation finished. Packages that are no longer needed: %d. Type `%s' to remove them" (length removable) commit 7ba2dc95a8a65cb320a5e4c8773c27a7b85a0206 Author: Lars Ingebrigtsen Date: Mon Sep 12 13:09:23 2022 +0200 Remove some XEmacs references in speedbar.el * lisp/speedbar.el (speedbar-toggle-etags): Remove some references to etags support being XEmacs specific (bug#51102). diff --git a/lisp/speedbar.el b/lisp/speedbar.el index e74d6fd80a..515f7d5d75 100644 --- a/lisp/speedbar.el +++ b/lisp/speedbar.el @@ -3509,7 +3509,7 @@ Returns the tag list, or t for an error." (error t))) ) -;;; Tag Management -- etags (old XEmacs compatibility part) +;;; Tag Management -- etags ;; (defvar speedbar-fetch-etags-parse-list '(;; Note that java has the same parse-group as c @@ -3552,10 +3552,7 @@ This variable is ignored if `speedbar-use-imenu-flag' is t." FLAG then becomes a member of etags command line arguments. If flag is \"sort\", then toggle the value of `speedbar-sort-tags'. If its value is \"show\" then toggle the value of -`speedbar-show-unknown-files'. - - This function is a convenience function for XEmacs menu created by -Farzin Guilak ." +`speedbar-show-unknown-files'." (interactive) (cond ((equal flag "sort") commit 87e4922cee2448e0c8d7bda155b35772abd5c025 Author: Lars Ingebrigtsen Date: Mon Sep 12 12:57:34 2022 +0200 Document :vert-only tool bar property * doc/lispref/keymaps.texi (Tool Bar): Document what :vert-only does (bug#51049). This is not what it was intended to do -- but what it intended to do didn't really make that much sense either, so perhaps the prop should just be renamed :image-only? diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi index 2be31d63a6..1e4bf4eb86 100644 --- a/doc/lispref/keymaps.texi +++ b/doc/lispref/keymaps.texi @@ -2911,6 +2911,10 @@ The @code{:rtl} property specifies an alternative image to use for right-to-left languages. Only the GTK+ version of Emacs supports this at present. +Some toolkits display both an image and a text in the toolbar. If you +want to force using only the image, use a @code{:vert-only} +non-@code{nil} property. + Like the menu bar, the tool bar can display separators (@pxref{Menu Separators}). Tool bar separators are vertical rather than horizontal, though, and only a single style is supported. They are commit 76bec09a42de5da8876b5cc6c905dac2d55241a5 Author: Arthur Miller Date: Mon Sep 12 12:38:09 2022 +0200 Remove edebug props in edebug-remove-instrumentation * lisp/emacs-lisp/edebug.el (edebug--strip-plist): New function (bug#51026). (edebug-remove-instrumentation): Use it to remove pros added while running edebug. diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index c916ec431e..31c05057bf 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -4573,6 +4573,12 @@ With prefix argument, make it a temporary breakpoint." (was-macro `(macro . ,unwrapped)) (t unwrapped)))))) +(defun edebug--strip-plist (symbol) + "Remove edebug related properties from plist for SYMBOL." + (dolist (prop '( edebug edebug-behavior edebug-coverage + edebug-freq-count ghost-edebug)) + (cl-remprop symbol prop))) + (defun edebug-remove-instrumentation (functions) "Remove Edebug instrumentation from FUNCTIONS. Interactively, the user is prompted for the function to remove @@ -4604,6 +4610,7 @@ instrumentation for, defaulting to all functions." (dolist (symbol functions) (when-let ((unwrapped (edebug--unwrap*-symbol-function symbol))) + (edebug--strip-plist symbol) (defalias symbol unwrapped))) (message "Removed edebug instrumentation from %s" (mapconcat #'symbol-name functions ", "))) commit b2833732113e02fed57cc8d1658a218be21b3081 Author: Lars Ingebrigtsen Date: Mon Sep 12 12:23:52 2022 +0200 Fix length issues in gnus-cloud-make-chunk * lisp/gnus/gnus-cloud.el (gnus-cloud-make-chunk): Make buffer unibyte (bug#50988). diff --git a/lisp/gnus/gnus-cloud.el b/lisp/gnus/gnus-cloud.el index 9bd9f2155f..0e38fc0680 100644 --- a/lisp/gnus/gnus-cloud.el +++ b/lisp/gnus/gnus-cloud.el @@ -84,6 +84,7 @@ easy interactive way to set this from the Server buffer." (defun gnus-cloud-make-chunk (elems) (with-temp-buffer + (set-buffer-multibyte nil) (insert (format "Gnus-Cloud-Version %s\n" gnus-cloud-version)) (insert (gnus-cloud-insert-data elems)) (buffer-string))) commit 2cdb9d03fd28138f079cfe5c788d860beb9ea7c2 Author: Stefan Kangas Date: Mon Sep 12 12:15:01 2022 +0200 ; * admin/make-tarball.txt: Minor clarifications. diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index a60fead267..ad2aacb57a 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -55,7 +55,8 @@ General steps (for each step, check for possible errors): For a release (as opposed to pretest), delete any left-over "---" and "+++" markers from etc/NEWS, as well as the "Temporary note" section at the beginning of that file, and commit etc/NEWS if it - was modified. + was modified. For a bug fix release (e.g. 28.2), delete any empty + headlines too. 2. Regenerate the versioned ChangeLog.N and etc/AUTHORS files. @@ -118,12 +119,13 @@ General steps (for each step, check for possible errors): Set the version number to that of the actual release (commit in one, as described above). Pick a date about a week from now when - you intend to make the release. Use M-x add-release-logs to add - entries to etc/HISTORY and the ChangeLog file. It's best not to - commit these files until the release is actually made. Merge the - entries from (unversioned) ChangeLog into the top of the current - versioned ChangeLog.N and commit that along with etc/HISTORY. - Then you can tag that commit as the release. + you intend to make the release. Use M-x add-release-logs from + admin/admin.el to add entries to etc/HISTORY and the ChangeLog + file. It's best not to commit these files until the release is + actually made. Merge the entries from (unversioned) ChangeLog + into the top of the current versioned ChangeLog.N and commit that + along with etc/HISTORY. Then you can tag that commit as the + release. Alternatively, you can commit and tag with the RC tag right away, and delay the final tagging until you actually decide to make a @@ -163,7 +165,10 @@ General steps (for each step, check for possible errors): Commit ChangeLog.N, etc/AUTHORS, lisp/ldefs-boot.el, and the files changed by M-x set-version. Note that the set-version changes - should be committed separately, as described in step 3 above. + should be committed separately, as described in step 3 above, to + avoid them being merged to master. The lisp/ldefs-boot.el file + should not be merged to master either, so it could be added to the + same commit or committed separately. The easiest way of doing that is "C-x v d ROOT-DIR RET", then go to the first modified file, press 'M' to mark all modified files, commit f771f122d2af99cc9e97085fab8c0e709c519a14 Author: Stefan Kangas Date: Mon Sep 12 12:02:32 2022 +0200 ; Bump Emacs version past 28.2 * README: * configure.ac: * nt/README.W32: * msdos/sed2v2.inp: * etc/NEWS: Bump Emacs version to 28.2.50. diff --git a/README b/README index cbfdb258a1..1ec0820ec9 100644 --- a/README +++ b/README @@ -2,7 +2,7 @@ Copyright (C) 2001-2022 Free Software Foundation, Inc. See the end of the file for license conditions. -This directory tree holds version 28.2 of GNU Emacs, the extensible, +This directory tree holds version 28.2.50 of GNU Emacs, the extensible, customizable, self-documenting real-time display editor. The file INSTALL in this directory says how to build and install GNU diff --git a/configure.ac b/configure.ac index 2e3f8d33d6..aed4be2959 100644 --- a/configure.ac +++ b/configure.ac @@ -23,7 +23,7 @@ dnl along with GNU Emacs. If not, see . AC_PREREQ(2.65) dnl Note this is parsed by (at least) make-dist and lisp/cedet/ede/emacs.el. -AC_INIT(GNU Emacs, 28.2, bug-gnu-emacs@gnu.org, , https://www.gnu.org/software/emacs/) +AC_INIT(GNU Emacs, 28.2.50, bug-gnu-emacs@gnu.org, , https://www.gnu.org/software/emacs/) dnl Set emacs_config_options to the options of 'configure', quoted for the shell, dnl and then quoted again for a C string. Separate options with spaces. diff --git a/etc/NEWS b/etc/NEWS index 5be6a30c24..4030589dec 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -15,6 +15,33 @@ in older Emacs versions. You can narrow news to a specific version by calling 'view-emacs-news' with a prefix argument or by typing 'C-u C-h C-n'. + +* Installation Changes in Emacs 28.3 + + +* Startup Changes in Emacs 28.3 + + +* Changes in Emacs 28.3 + + +* Editing Changes in Emacs 28.3 + + +* Changes in Specialized Modes and Packages in Emacs 28.3 + + +* New Modes and Packages in Emacs 28.3 + + +* Incompatible Lisp Changes in Emacs 28.3 + + +* Lisp Changes in Emacs 28.3 + + +* Changes in Emacs 28.3 on Non-Free Operating Systems + * Installation Changes in Emacs 28.2 diff --git a/msdos/sed2v2.inp b/msdos/sed2v2.inp index d0065db521..3213096e8c 100644 --- a/msdos/sed2v2.inp +++ b/msdos/sed2v2.inp @@ -67,7 +67,7 @@ /^#undef PACKAGE_NAME/s/^.*$/#define PACKAGE_NAME ""/ /^#undef PACKAGE_STRING/s/^.*$/#define PACKAGE_STRING ""/ /^#undef PACKAGE_TARNAME/s/^.*$/#define PACKAGE_TARNAME ""/ -/^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION "28.2"/ +/^#undef PACKAGE_VERSION/s/^.*$/#define PACKAGE_VERSION "28.2.50"/ /^#undef SYSTEM_TYPE/s/^.*$/#define SYSTEM_TYPE "ms-dos"/ /^#undef HAVE_DECL_GETENV/s/^.*$/#define HAVE_DECL_GETENV 1/ /^#undef SYS_SIGLIST_DECLARED/s/^.*$/#define SYS_SIGLIST_DECLARED 1/ diff --git a/nt/README.W32 b/nt/README.W32 index 607f39c56b..2c6c7d7194 100644 --- a/nt/README.W32 +++ b/nt/README.W32 @@ -1,7 +1,7 @@ Copyright (C) 2001-2022 Free Software Foundation, Inc. See the end of the file for license conditions. - Emacs version 28.2 for MS-Windows + Emacs version 28.2.50 for MS-Windows This README file describes how to set up and run a precompiled distribution of the latest version of GNU Emacs for MS-Windows. You commit 191c4fe249e1191b770a6051c0f24c5783ac09af Author: Arash Esbati Date: Mon Sep 12 09:34:23 2022 +0200 Consider key=val labels when renumbering * lisp/textmodes/reftex-global.el (reftex-translate): Recognize key=val labels given in the optional or mandatory argument of environments (AUCTeX bug#57720). * test/lisp/textmodes/reftex-tests.el (reftex-renumber-simple-labels): New Test. diff --git a/lisp/textmodes/reftex-global.el b/lisp/textmodes/reftex-global.el index 062cea9c50..9f308646fc 100644 --- a/lisp/textmodes/reftex-global.el +++ b/lisp/textmodes/reftex-global.el @@ -276,7 +276,18 @@ one with the `xr' package." ;; to ignore the problematic string. ;; If TEST is nil, it is ignored without query. ;; Return the number of replacements. - (let ((n 0) file label match-data buf macro pos cell) + (let ((n 0) + (opt-re (concat "\\(?:{[^}{]*" + "\\(?:{[^}{]*" + "\\(?:{[^}{]*}[^}{]*\\)*" + "}[^}{]*\\)*" + "}[^][]*\\)*")) + (man-re (concat "\\(?:{[^}{]*" + "\\(?:{[^}{]*" + "\\(?:{[^}{]*}[^}{]*\\)*" + "}[^}{]*\\)*" + "}[^}{]*\\)*")) + file label match-data buf macro pos cell) (while (setq file (pop files)) (setq buf (reftex-get-file-buffer-force file)) (unless buf @@ -301,7 +312,29 @@ one with the `xr' package." (looking-at "\\\\ref[a-zA-Z]*[^a-zA-Z]") (looking-at (format reftex-find-label-regexp-format - (regexp-quote label))))) + (regexp-quote label))) + ;; In case the label-keyval is inside an + ;; optional argument to \begin{env} + (looking-at (concat + "\\\\begin[[:space:]]*{[^}]+}" + "[[:space:]]*" + "\\[[^][]*" + opt-re + (format + reftex-find-label-regexp-format + (regexp-quote label)) + "[^]]*\\]")) + ;; In case the label-keyval is inside the + ;; first mandatory argument to \begin{env} + (looking-at (concat + "\\\\begin[[:space:]]*{[^}]+}" + "[[:space:]]*" + "{[^}{]*" + man-re + (format + reftex-find-label-regexp-format + (regexp-quote label)) + "[^}]*}")))) ;; OK, we should replace it. (set-match-data match-data) (cond diff --git a/test/lisp/textmodes/reftex-tests.el b/test/lisp/textmodes/reftex-tests.el index 97ff390817..67e0100475 100644 --- a/test/lisp/textmodes/reftex-tests.el +++ b/test/lisp/textmodes/reftex-tests.el @@ -334,6 +334,179 @@ And this should be % \\cite{ignored}. #'string<))) (kill-buffer (file-name-nondirectory tex-file))))) +(ert-deftest reftex-renumber-simple-labels () + "Test `reftex-renumber-simple-labels'. +The function must recognize labels defined with macros like +\\label and the ones as key=value option in optional or mandatory +argument of other macros or environments." + (ert-with-temp-directory temp-dir + (let ((tex-file (expand-file-name "renumber.tex" temp-dir))) + (with-temp-buffer + (insert "\ +\\documentclass{article} +\\usepackage{tcolorbox} +\\tcbuselibrary{theorems} +\\usepackage{fancyvrb} +\\usepackage{listings} + +\\begin{document} + +This is with tcolorbox package: +\\begin{problem}[% + colback = white , + colframe = red!50!black , + fonttitle = \\bfseries , + description delimiters = {\\flqq}{\\frqq} , + label = {problem:2}]{Prove RH2}{} + Problem +\\end{problem} + +This is with vanilla \\LaTeX: +\\begin{equation} + \\label{eq:2} + 2 +\\end{equation} +By \\eqref{eq:2} and \\ref{problem:2} + +This is with tcolorbox package: +\\begin{problem}[% + colback=white, + colframe=red!50!black, + fonttitle=\\bfseries, + theorem label supplement={hypertarget={XYZ-##1}}, + theorem full label supplement={code={\\marginnote{##1}}}, + label={problem:1}]{Prove RH1}{} + Problem +\\end{problem} + +This is with vanilla \\LaTeX: +\\begin{equation} + \\label{eq:1} + 1 +\\end{equation} + +\\Cref{problem:1} and \\pageref{eq:1}. + +\\begin{problem}[label={problem:6}]{Some Problem}{} + Problem +\\end{problem} + +\\Ref{problem:6}. + +This is with fancyvrb package: +\\begin{Verbatim}[reflabel={lst:6}] +Some Verb Content +\\end{Verbatim} + +\\pageref{lst:6} + +This is with listings package: +\\begin{lstlisting}[language=elisp,caption=Some Caption,label={lst:3}] +(car (cons 1 '(2))) +\\end{lstlisting} + +\\ref{lst:3} + +\\end{document}") + (write-region (point-min) (point-max) tex-file)) + ;; The label prefix must be known to RefTeX: + (add-to-list 'reftex-label-alist + '("problem" ?p "problem:" "~\\ref{%s}" + nil nil nil) + t) + (add-to-list 'reftex-label-alist + '("Verbatim" ?l "lst:" "~\\ref{%s}" + nil nil nil) + t) + ;; The environments must be known to RefTeX otherwise the labels + ;; aren't parsed correctly: + (add-to-list 'reftex-label-regexps + (concat "\\\\begin{\\(?:problem\\|Verbatim\\)}" + "\\[[^][]*" + "\\(?:{[^}{]*" + "\\(?:{[^}{]*" + "\\(?:{[^}{]*}[^}{]*\\)*" + "}[^}{]*\\)*" + "}[^][]*\\)*" + "\\<\\(?:ref\\)?label[[:space:]]*=[[:space:]]*" + "{?\\(?1:[^] ,}\r\n\t%]+\\)" + "[^]]*\\]") + t) + ;; Always run this after changing `reftex-label-regexps': + (reftex-compile-variables) + (find-file tex-file) + ;; Silence the user query: + (cl-letf (((symbol-function 'yes-or-no-p) #'always)) + (reftex-renumber-simple-labels)) + (should (string= (buffer-string) + "\ +\\documentclass{article} +\\usepackage{tcolorbox} +\\tcbuselibrary{theorems} +\\usepackage{fancyvrb} +\\usepackage{listings} + +\\begin{document} + +This is with tcolorbox package: +\\begin{problem}[% + colback = white , + colframe = red!50!black , + fonttitle = \\bfseries , + description delimiters = {\\flqq}{\\frqq} , + label = {problem:1}]{Prove RH2}{} + Problem +\\end{problem} + +This is with vanilla \\LaTeX: +\\begin{equation} + \\label{eq:1} + 2 +\\end{equation} +By \\eqref{eq:1} and \\ref{problem:1} + +This is with tcolorbox package: +\\begin{problem}[% + colback=white, + colframe=red!50!black, + fonttitle=\\bfseries, + theorem label supplement={hypertarget={XYZ-##1}}, + theorem full label supplement={code={\\marginnote{##1}}}, + label={problem:2}]{Prove RH1}{} + Problem +\\end{problem} + +This is with vanilla \\LaTeX: +\\begin{equation} + \\label{eq:2} + 1 +\\end{equation} + +\\Cref{problem:2} and \\pageref{eq:2}. + +\\begin{problem}[label={problem:3}]{Some Problem}{} + Problem +\\end{problem} + +\\Ref{problem:3}. + +This is with fancyvrb package: +\\begin{Verbatim}[reflabel={lst:1}] +Some Verb Content +\\end{Verbatim} + +\\pageref{lst:1} + +This is with listings package: +\\begin{lstlisting}[language=elisp,caption=Some Caption,label={lst:2}] +(car (cons 1 '(2))) +\\end{lstlisting} + +\\ref{lst:2} + +\\end{document}")) + (kill-buffer (file-name-nondirectory tex-file))))) + ;;; Autoload tests ;; Test to check whether reftex autoloading mechanisms are working commit 739b5d0e52d83ec567bd61a5a49ac0e93e0eb469 (tag: refs/tags/emacs-28.2) Author: Stefan Kangas Date: Mon Sep 12 02:47:11 2022 +0200 Update HISTORY for Emacs 28.2 * etc/HISTORY: Update for the Emacs 28.2 release. diff --git a/etc/HISTORY b/etc/HISTORY index bb4e3e38e1..9e4becc946 100644 --- a/etc/HISTORY +++ b/etc/HISTORY @@ -226,6 +226,8 @@ GNU Emacs 27.2 (2021-03-25) emacs-27.2 GNU Emacs 28.1 (2022-04-04) emacs-28.1 +GNU Emacs 28.2 (2022-09-12) emacs-28.2 + ---------------------------------------------------------------------- This file is part of GNU Emacs.