From 3fb69fad492dd40279cf29c4d417cc86a8018cc7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Aug 2022 10:50:57 +0300 Subject: [PATCH 001/915] Fix documentation of 'glyphless-char-display' * src/xdisp.c (syms_of_xdisp): Doc fix. (gui_produce_glyphs, lookup_glyphless_char_display): Fix indentation. --- src/xdisp.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/xdisp.c b/src/xdisp.c index 9740e6b590e..a4881c48350 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -7408,8 +7408,8 @@ lookup_glyphless_char_display (int c, struct it *it) if (c >= 0) { glyphless_method = CHAR_TABLE_REF (Vglyphless_char_display, c); - if (CONSP (glyphless_method)) - glyphless_method = FRAME_WINDOW_P (it->f) + if (CONSP (glyphless_method)) + glyphless_method = FRAME_WINDOW_P (it->f) ? XCAR (glyphless_method) : XCDR (glyphless_method); } @@ -30546,9 +30546,9 @@ gui_produce_glyphs (struct it *it) /* When no suitable font is found, display this character by the method specified in the first extra slot of Vglyphless_char_display. */ - Lisp_Object acronym = lookup_glyphless_char_display (-1, it); + Lisp_Object acronym = lookup_glyphless_char_display (-1, it); - eassert (it->what == IT_GLYPHLESS); + eassert (it->what == IT_GLYPHLESS); produce_glyphless_glyph (it, true, STRINGP (acronym) ? acronym : Qnil); goto done; @@ -35821,14 +35821,15 @@ Each element, if non-nil, should be one of the following: `empty-box': display as an empty box `thin-space': display as 1-pixel width space `zero-width': don't display +Any other value is interpreted as `empty-box'. An element may also be a cons cell (GRAPHICAL . TEXT), which specifies the display method for graphical terminals and text terminals respectively. GRAPHICAL and TEXT should each have one of the values listed above. -The char-table has one extra slot to control the display of a character for -which no font is found. This slot only takes effect on graphical terminals. -Its value should be an ASCII acronym string, `hex-code', `empty-box', or -`thin-space'. The default is `empty-box'. +The char-table has one extra slot to control the display of characters for +which no font is found on graphical terminals, and characters that cannot +be displayed by text-mode terminals. Its value should be an ASCII acronym +string, `hex-code', `empty-box', or `thin-space'. The default is `hex-code'. If a character has a non-nil entry in an active display table, the display table takes effect; in this case, Emacs does not consult From 72ae02377ebdc3105156be0e3dc0a9c53156599e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Aug 2022 14:24:59 +0300 Subject: [PATCH 002/915] ; * lisp/jit-lock.el (jit-lock-chunk-size): Doc fix. --- lisp/jit-lock.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/jit-lock.el b/lisp/jit-lock.el index 20c12024745..6884313d1ba 100644 --- a/lisp/jit-lock.el +++ b/lisp/jit-lock.el @@ -45,9 +45,12 @@ Preserves the `buffer-modified-p' state of the current buffer." :group 'font-lock) (defcustom jit-lock-chunk-size 1500 - "Jit-lock fontifies chunks of at most this many characters at a time. + "Jit-lock asks to fontify chunks of at most this many characters at a time. -This variable controls both `display-time' and stealth fontification. +The actual size of the fontified chunk of text can be different, +depending on what the `fontification-functions' actually decide to do. + +This variable controls both display-time and stealth fontifications. The optimum value is a little over the typical number of buffer characters which fit in a typical window." From 195fcc932eea396c94483e0265b43a3c01147776 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 28 Aug 2022 08:40:25 +0300 Subject: [PATCH 003/915] Improve the documentation of glyphless-character display * lisp/international/characters.el (glyphless-char-display-control): * src/xdisp.c (syms_of_xdisp) : Mention the 'glyphless-char' face in the doc string. * doc/lispref/display.texi (Glyphless Chars): Index 'glyphless-char' face. --- doc/lispref/display.texi | 4 +++- lisp/international/characters.el | 8 ++++++-- src/xdisp.c | 3 +++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 9aed5b2d7ae..b068c7d08c6 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -7994,6 +7994,7 @@ Display with @var{graphical} on graphical displays, and with must be one of the display methods described above. @end table +@vindex glyphless-char@r{ face} @noindent The @code{thin-space}, @code{empty-box}, @code{hex-code}, and @acronym{ASCII} string display methods are drawn with the @@ -8048,7 +8049,8 @@ emojis). @item no-font Characters for which there is no suitable font, or which cannot be -encoded by the terminal's coding system. +encoded by the terminal's coding system, or those for which the +text-mode terminal has no glyphs. @end table @c FIXME: this can also be 'acronym', but that's not currently diff --git a/lisp/international/characters.el b/lisp/international/characters.el index 7d625d1382a..d845baa2ebf 100644 --- a/lisp/international/characters.el +++ b/lisp/international/characters.el @@ -1599,7 +1599,8 @@ GROUP must be one of these symbols: presentation). `no-font': characters for which no suitable font is found. For character terminals, characters that cannot - be encoded by `terminal-coding-system'. + be encoded by `terminal-coding-system' or those + for which the terminal has no glyphs. METHOD must be one of these symbols: `zero-width': don't display. @@ -1613,7 +1614,10 @@ METHOD must be one of these symbols: Do not set its value directly from Lisp; the value takes effect only via a custom `:set' function (`update-glyphless-char-display'), which updates -`glyphless-char-display'." +`glyphless-char-display'. + +See also the `glyphless-char' face, which is used to display the +visual representation of these characters." :version "28.1" :type '(alist :key-type (symbol :tag "Character Group") :value-type (symbol :tag "Display Method")) diff --git a/src/xdisp.c b/src/xdisp.c index a4881c48350..6d42105474f 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -35831,6 +35831,9 @@ which no font is found on graphical terminals, and characters that cannot be displayed by text-mode terminals. Its value should be an ASCII acronym string, `hex-code', `empty-box', or `thin-space'. The default is `hex-code'. +With the obvious exception of `zero-width', all the other representations +are displayed using the face `glyphless-char'. + If a character has a non-nil entry in an active display table, the display table takes effect; in this case, Emacs does not consult `glyphless-char-display' at all. */); From cc945ec0ed11c93a322db6258d47ea2746aead18 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 28 Aug 2022 08:51:09 +0300 Subject: [PATCH 004/915] ; Fix doc strings in latin1-disp.el * lisp/international/latin1-disp.el (latin1-display-ucs-per-lynx) (latin1-display): Doc fix. --- lisp/international/latin1-disp.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/international/latin1-disp.el b/lisp/international/latin1-disp.el index 96a54cc2128..c8c91fd5709 100644 --- a/lisp/international/latin1-disp.el +++ b/lisp/international/latin1-disp.el @@ -87,7 +87,7 @@ This option also treats some characters in the `mule-unicode-...' charsets if you don't have a Unicode font with which to display them. Setting this variable directly does not take effect; -use either \\[customize] or the function `latin1-display'." +use either \\[customize] or the command `latin1-display'." :group 'latin1-display :type 'boolean :require 'latin1-disp @@ -745,7 +745,7 @@ This uses the transliterations of the Lynx browser. The display isn't changed if the display can render Unicode characters. Setting this variable directly does not take effect; -use either \\[customize] or the function `latin1-display'." +use either \\[customize] or the command `latin1-display-ucs-per-lynx'." :group 'latin1-display :type 'boolean :require 'latin1-disp From d111b5b6512e1c8e932572906e2f516832e6c408 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 28 Aug 2022 14:42:07 +0300 Subject: [PATCH 005/915] * lisp/info.el (Info-mode): Support the Linux console better. --- lisp/info.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/info.el b/lisp/info.el index 739116cceac..5655e3f3ce9 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -4446,9 +4446,12 @@ Advanced commands: (setq buffer-read-only t) (setq Info-tag-table-marker (make-marker)) (unless (or (display-multi-font-p) - (coding-system-equal - (coding-system-base (terminal-coding-system)) - 'utf-8)) + (and (coding-system-equal + (coding-system-base (terminal-coding-system)) + 'utf-8) + ;; The Linux console has limited character + ;; repertoire even when its encoding is UTF-8. + (not (equal (tty-type) "linux")))) (dolist (elt info-symbols-and-replacements) (let ((ch (car elt)) (repl (cdr elt))) From c8c3cd3b08c468a8bc2c93fefaaf1c6f819a0d88 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 28 Aug 2022 17:40:49 +0300 Subject: [PATCH 006/915] ; Fix docs of glyphless-character display * etc/NEWS: Update "glyphless character" entries. * doc/lispref/display.texi (Glyphless Chars): The extra slot of the char-table can now use a cons cell. --- doc/lispref/display.texi | 2 +- etc/NEWS | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index a56f467e0b5..db58cd14c63 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -8563,7 +8563,7 @@ square brackets, @samp{[]}. The char-table has one extra slot, which determines how to display any character that cannot be displayed with any available font, or cannot be encoded by the terminal's coding system. Its value should be one -of the above display methods, except @code{zero-width} or a cons cell. +of the above display methods, except @code{zero-width}. If a character has a non-@code{nil} entry in an active display table, the display table takes effect; in this case, Emacs does not consult diff --git a/etc/NEWS b/etc/NEWS index 1317cd01283..f337381dd44 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1532,11 +1532,13 @@ completion, and adds the Emoji into the search string. This allows an easy way to toggle seeing all glyphless characters in the current buffer. ++++ *** The extra slot of 'glyphless-char-display' can now have cons values. The extra slot of the 'glyphless-char-display' char-table can now have values that are cons cells, specifying separate values for text-mode and GUI terminals. +--- *** "Replacement character" feature for undisplayable characters on TTYs. The 'acronym' method of displaying glyphless characters on text-mode frames treats single-character acronyms specially: they are displayed From 3edee9a6a352d0c352a29d6590233b412bd1ab04 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Sat, 27 Aug 2022 17:42:42 -0400 Subject: [PATCH 007/915] Fix data for files-tests-bug-21454 on Cygwin * test/lisp/files-tests.el (files-tests-bug-21454): Fix test data to reflect the fact that Cygwin supports UNC paths. --- test/lisp/files-tests.el | 47 ++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 14 deletions(-) diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index 20c712226ed..682b5cdb449 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -223,20 +223,39 @@ form.") ("x:/foo/bar/baz/" "z:/qux/foo/")) ("///foo/bar/" "$FOO/baz/;/qux/foo/" ("//foo/bar//baz/" "/qux/foo/"))) - '(("/foo/bar//baz/:/bar/foo/baz//" nil - ("/foo/bar//baz/" "/bar/foo/baz//")) - ("/foo/bar/:/bar/qux/:/qux/foo" nil - ("/foo/bar/" "/bar/qux/" "/qux/foo/")) - ("//foo/bar/:/bar/qux/:/qux/foo/" nil - ("/foo/bar/" "/bar/qux/" "/qux/foo/")) - ("/foo/bar/:/bar/qux/:/qux/foo/" nil - ("/foo/bar/" "/bar/qux/" "/qux/foo/")) - ("/foo//bar/:/bar/qux/:/qux/foo/" nil - ("/foo//bar/" "/bar/qux/" "/qux/foo/")) - ("/foo//bar/:/bar/qux/:/qux/foo" nil - ("/foo//bar/" "/bar/qux/" "/qux/foo/")) - ("/foo/bar" "$FOO/baz/:/qux/foo/" ("/foo/bar/baz/" "/qux/foo/")) - ("//foo/bar/" "$FOO/baz/:/qux/foo/" ("/foo/bar//baz/" "/qux/foo/"))))) + (if (eq system-type 'cygwin) + '(("/foo/bar//baz/:/bar/foo/baz//" nil + ("/foo/bar//baz/" "/bar/foo/baz//")) + ("/foo/bar/:/bar/qux/:/qux/foo" nil + ("/foo/bar/" "/bar/qux/" "/qux/foo/")) + ("//foo/bar/:/bar/qux/:/qux/foo/" nil + ("//foo/bar/" "/bar/qux/" "/qux/foo/")) + ("/foo/bar/:/bar/qux/:/qux/foo/" nil + ("/foo/bar/" "/bar/qux/" "/qux/foo/")) + ("/foo//bar/:/bar/qux/:/qux/foo/" nil + ("/foo//bar/" "/bar/qux/" "/qux/foo/")) + ("/foo//bar/:/bar/qux/:/qux/foo" nil + ("/foo//bar/" "/bar/qux/" "/qux/foo/")) + ("/foo/bar" "$FOO/baz/:/qux/foo/" + ("/foo/bar/baz/" "/qux/foo/")) + ("///foo/bar/" "$FOO/baz/:/qux/foo/" + ("//foo/bar//baz/" "/qux/foo/"))) + '(("/foo/bar//baz/:/bar/foo/baz//" nil + ("/foo/bar//baz/" "/bar/foo/baz//")) + ("/foo/bar/:/bar/qux/:/qux/foo" nil + ("/foo/bar/" "/bar/qux/" "/qux/foo/")) + ("//foo/bar/:/bar/qux/:/qux/foo/" nil + ("/foo/bar/" "/bar/qux/" "/qux/foo/")) + ("/foo/bar/:/bar/qux/:/qux/foo/" nil + ("/foo/bar/" "/bar/qux/" "/qux/foo/")) + ("/foo//bar/:/bar/qux/:/qux/foo/" nil + ("/foo//bar/" "/bar/qux/" "/qux/foo/")) + ("/foo//bar/:/bar/qux/:/qux/foo" nil + ("/foo//bar/" "/bar/qux/" "/qux/foo/")) + ("/foo/bar" "$FOO/baz/:/qux/foo/" + ("/foo/bar/baz/" "/qux/foo/")) + ("//foo/bar/" "$FOO/baz/:/qux/foo/" + ("/foo/bar//baz/" "/qux/foo/")))))) (foo-env (getenv "FOO")) (bar-env (getenv "BAR"))) (unwind-protect From 35af917f187719fecadde278a51fd10bf47eed07 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 28 Aug 2022 22:13:45 +0300 Subject: [PATCH 008/915] Revert parts of 3f076a8e44 that caused test failures * lisp/simple.el (line-move-finish): * lisp/window.el (scroll-command--goto-goal-column): Revert back to using truncate-partial-width-windows instead of truncated-partial-width-window-p. This change caused test failures in lisp/ls-lisp-tests.log and lisp/emacs-lisp/edebug-tests.log. --- lisp/simple.el | 2 +- lisp/window.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index ceb29b1e30a..daacf697ff3 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -7973,7 +7973,7 @@ If NOERROR, don't signal an error if we can't move that many lines." ;; Move to the desired column. (if (and line-move-visual - (not (or truncate-lines (truncated-partial-width-window-p)))) + (not (or truncate-lines truncate-partial-width-windows))) ;; Under line-move-visual, goal-column should be ;; interpreted in units of the frame's canonical character ;; width, which is exactly what vertical-motion does. diff --git a/lisp/window.el b/lisp/window.el index db69379e692..ec2b0a69302 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -10137,7 +10137,7 @@ semipermanent goal column for this command." (when goal-column ;; Move to the desired column. (if (and line-move-visual - (not (or truncate-lines (truncated-partial-width-window-p)))) + (not (or truncate-lines truncate-partial-width-windows))) ;; Under line-move-visual, goal-column should be ;; interpreted in units of the frame's canonical character ;; width, which is exactly what vertical-motion does. From 4803fba487d41f0817feab48b5095ef4b4940ff6 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 28 Aug 2022 22:38:51 +0300 Subject: [PATCH 009/915] 'C-x v v' on a diff buffer commits it as a patch (bug#52349) * lisp/vc/diff-mode.el (diff-vc-deduce-fileset): New function. * lisp/vc/log-edit.el (log-edit-diff-patch): New function. * lisp/vc/vc-dispatcher.el (vc-log-edit): Set log-edit-diff-function to log-edit-diff-patch when vc-patch-string is non-nil. (vc-start-logentry): New optional arg 'patch-string'. Set buffer-local 'vc-patch-string' to 'patch-string'. (vc-dispatcher-browsing): Add (derived-mode-p 'diff-mode). * lisp/vc/vc-git.el (vc-git-checkin-patch): New function. (vc-git-checkin): When vc-git-patch-string is non-nil, use `git apply --cached` to add the patch to the index, then commit the staged changes. * lisp/vc/vc.el: New backend function 'checkin-patch'. (vc-deduce-fileset-1): Call diff-vc-deduce-fileset in diff-mode. (vc-next-action): For model 'patch' call vc-checkin with the diff buffer string. (vc-checkin): New optional arg 'patch-string'. Call backend function 'checkin-patch' when 'patch-string' is non-nil. Call vc-start-logentry with 'patch-string'. (vc-diff-patch-string): New function. --- etc/NEWS | 6 ++++++ lisp/vc/diff-mode.el | 9 +++++++++ lisp/vc/log-edit.el | 6 ++++++ lisp/vc/vc-dispatcher.el | 18 +++++++++++++----- lisp/vc/vc-git.el | 23 +++++++++++++++++++--- lisp/vc/vc.el | 41 ++++++++++++++++++++++++++++++++++++---- 6 files changed, 91 insertions(+), 12 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index f337381dd44..b27f0760d12 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1580,6 +1580,12 @@ info node. This command only works for the Emacs and Emacs Lisp manuals. This command marks files based on a regexp. If given a prefix argument, unmark instead. +*** 'C-x v v' on a diff buffer commits it as a patch. +You can create a diff buffer by e.g. 'C-x v D' ('vc-root-diff'), +then remove unnecessary hunks, and commit only part of your changes +by typing 'C-x v v' in that diff buffer. Currently this works only +with Git. + --- *** 'C-x v v' on an unregistered file will now use the most specific backend. Previously, if you had an SVN-covered "~/" directory, and a Git-covered diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el index 6b30de3cb37..a01943437c1 100644 --- a/lisp/vc/diff-mode.el +++ b/lisp/vc/diff-mode.el @@ -2928,6 +2928,15 @@ hunk text is not found in the source file." (forward-line 1))) (nreverse props))) +;;;###autoload +(defun diff-vc-deduce-fileset () + (let ((backend (vc-responsible-backend default-directory)) + files) + (save-excursion + (goto-char (point-min)) + (while (progn (diff-file-next) (not (eobp))) + (push (diff-find-file-name nil t) files))) + (list backend (nreverse files) nil nil 'patch))) (defun diff--filter-substring (str) (when diff-font-lock-prettify diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index e958673fea8..4a94553b214 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -664,6 +664,12 @@ comment history, see `log-edit-comment-ring', and hides `log-edit-files-buf'." (indent-rigidly (point) (point-max) (- log-edit-common-indent common))))) +(defvar vc-patch-string) + +(autoload 'vc-diff-patch-string "vc") +(defun log-edit-diff-patch () + (vc-diff-patch-string vc-patch-string)) + (defun log-edit-show-diff () "Show the diff for the files to be committed." (interactive) diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index e2a490092b5..df5bf1cfa69 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -624,6 +624,8 @@ NOT-URGENT means it is ok to continue if the user says not to save." (declare-function log-edit-empty-buffer-p "log-edit" ()) +(defvar vc-patch-string) + (defun vc-log-edit (fileset mode backend) "Set up `log-edit' for use on FILE." (setq default-directory @@ -653,15 +655,17 @@ NOT-URGENT means it is ok to continue if the user says not to save." (mapcar (lambda (file) (file-relative-name file root)) fileset)))) - (log-edit-diff-function . vc-diff) + (log-edit-diff-function + . ,(if vc-patch-string 'log-edit-diff-patch 'vc-diff)) (log-edit-vc-backend . ,backend) - (vc-log-fileset . ,fileset)) + (vc-log-fileset . ,fileset) + (vc-patch-string . ,vc-patch-string)) nil mode) (set-buffer-modified-p nil) (setq buffer-file-name nil)) -(defun vc-start-logentry (files comment initial-contents msg logbuf mode action &optional after-hook backend) +(defun vc-start-logentry (files comment initial-contents msg logbuf mode action &optional after-hook backend patch-string) "Accept a comment for an operation on FILES. If COMMENT is nil, pop up a LOGBUF buffer, emit MSG, and set the action on close to ACTION. If COMMENT is a string and @@ -673,7 +677,8 @@ empty comment. Remember the file's buffer in `vc-parent-buffer' \(current one if no file). Puts the log-entry buffer in major mode MODE, defaulting to `log-edit-mode' if MODE is nil. AFTER-HOOK specifies the local value for `vc-log-after-operation-hook'. -BACKEND, if non-nil, specifies a VC backend for the Log Edit buffer." +BACKEND, if non-nil, specifies a VC backend for the Log Edit buffer. +PATCH-STRING is a patch to check in." (let ((parent (if (vc-dispatcher-browsing) ;; If we are called from a directory browser, the parent buffer is @@ -688,6 +693,8 @@ BACKEND, if non-nil, specifies a VC backend for the Log Edit buffer." (setq-local vc-parent-buffer parent) (setq-local vc-parent-buffer-name (concat " from " (buffer-name vc-parent-buffer))) + (when patch-string + (setq-local vc-patch-string patch-string)) (vc-log-edit files mode backend) (make-local-variable 'vc-log-after-operation-hook) (when after-hook @@ -753,7 +760,8 @@ the buffer contents as a comment." (defun vc-dispatcher-browsing () "Are we in a directory browser buffer?" (or (derived-mode-p 'vc-dir-mode) - (derived-mode-p 'dired-mode))) + (derived-mode-p 'dired-mode) + (derived-mode-p 'diff-mode))) ;; These are unused. ;; (defun vc-dispatcher-in-fileset-p (fileset) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 46a486a46c3..7395253745e 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -53,7 +53,8 @@ ;; - responsible-p (file) OK ;; - receive-file (file rev) NOT NEEDED ;; - unregister (file) OK -;; * checkin (files rev comment) OK +;; * checkin (files comment rev) OK +;; - checkin-patch (patch-string comment) OK ;; * find-revision (file rev buffer) OK ;; * checkout (file &optional rev) OK ;; * revert (file &optional contents-done) OK @@ -914,6 +915,12 @@ If toggling on, also insert its message into the buffer." "Major mode for editing Git log messages. It is based on `log-edit-mode', and has Git-specific extensions.") +(defvar vc-git-patch-string nil) + +(defun vc-git-checkin-patch (patch-string comment) + (let ((vc-git-patch-string patch-string)) + (vc-git-checkin nil comment))) + (defun vc-git-checkin (files comment &optional _rev) (let* ((file1 (or (car files) default-directory)) (root (vc-git-root file1)) @@ -936,12 +943,21 @@ It is based on `log-edit-mode', and has Git-specific extensions.") (if (eq system-type 'windows-nt) (let ((default-directory (file-name-directory file1))) (make-nearby-temp-file "git-msg"))))) + (when vc-git-patch-string + (unless (zerop (vc-git-command nil t nil "diff" "--cached" "--quiet")) + (user-error "Index not empty")) + (let ((patch-file (make-temp-file "git-patch"))) + (with-temp-file patch-file + (insert vc-git-patch-string)) + (unwind-protect + (vc-git-command nil 0 patch-file "apply" "--cached") + (delete-file patch-file)))) (cl-flet ((boolean-arg-fn (argument) (lambda (value) (when (equal value "yes") (list argument))))) ;; When operating on the whole tree, better pass "-a" than ".", since "." ;; fails when we're committing a merge. - (apply #'vc-git-command nil 0 (if only files) + (apply #'vc-git-command nil 0 (if (and only (not vc-git-patch-string)) files) (nconc (if msg-file (list "commit" "-F" (file-local-name msg-file)) (list "commit" "-m")) @@ -959,7 +975,8 @@ It is based on `log-edit-mode', and has Git-specific extensions.") (write-region (car args) nil msg-file)) (setq args (cdr args))) args) - (if only (list "--only" "--") '("-a"))))) + (unless vc-git-patch-string + (if only (list "--only" "--") '("-a")))))) (if (and msg-file (file-exists-p msg-file)) (delete-file msg-file)))) (defun vc-git-find-revision (file rev buffer) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 85a96a29fa3..88139fe13d8 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -247,6 +247,11 @@ ;; revision argument is only supported with some older VCSes, like ;; RCS and CVS, and is otherwise silently ignored. ;; +;; - checkin-patch (patch-string comment) +;; +;; Commit a single patch PATCH-STRING to this backend, bypassing +;; the changes in filesets. COMMENT is used as a check-in comment. +;; ;; * find-revision (file rev buffer) ;; ;; Fetch revision REV of file FILE and put it into BUFFER. @@ -1102,6 +1107,8 @@ BEWARE: this function may change the current buffer." (vc-dir-deduce-fileset state-model-only-files)) ((derived-mode-p 'dired-mode) (dired-vc-deduce-fileset state-model-only-files not-state-changing)) + ((derived-mode-p 'diff-mode) + (diff-vc-deduce-fileset)) ((setq backend (vc-backend buffer-file-name)) (if state-model-only-files (list backend (list buffer-file-name) @@ -1114,7 +1121,8 @@ BEWARE: this function may change the current buffer." (or (buffer-file-name vc-parent-buffer) (with-current-buffer vc-parent-buffer (or (derived-mode-p 'vc-dir-mode) - (derived-mode-p 'dired-mode))))) + (derived-mode-p 'dired-mode) + (derived-mode-p 'diff-mode))))) (progn ;FIXME: Why not `with-current-buffer'? --Stef. (set-buffer vc-parent-buffer) (vc-deduce-fileset-1 not-state-changing allow-unregistered state-model-only-files))) @@ -1230,6 +1238,8 @@ with, using the most specific one." (error "Fileset files are missing, so cannot be operated on")) ((eq state 'ignored) (error "Fileset files are ignored by the version-control system")) + ((eq model 'patch) + (vc-checkin files backend nil nil nil (buffer-string))) ((or (null state) (eq state 'unregistered)) (cond (verbose (let ((backend (vc-read-backend "Backend to register to: "))) @@ -1615,13 +1625,14 @@ Type \\[vc-next-action] to check in changes.") ".\n") (message "Please explain why you stole the lock. Type C-c C-c when done."))) -(defun vc-checkin (files backend &optional comment initial-contents rev) +(defun vc-checkin (files backend &optional comment initial-contents rev patch-string) "Check in FILES. COMMENT is a comment string; if omitted, a buffer is popped up to accept a comment. If INITIAL-CONTENTS is non-nil, then COMMENT is used as the initial contents of the log entry buffer. The optional argument REV may be a string specifying the new revision level (only supported for some older VCSes, like RCS and CVS). +The optional argument PATCH-STRING is a string to check in as a patch. Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." (run-hooks 'vc-before-checkin-hook) @@ -1643,7 +1654,9 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." ;; vc-checkin-switches, but 'the' local buffer is ;; not a well-defined concept for filesets. (progn - (vc-call-backend backend 'checkin files comment rev) + (if patch-string + (vc-call-backend backend 'checkin-patch patch-string comment) + (vc-call-backend backend 'checkin files comment rev)) (mapc #'vc-delete-automatic-version-backups files)) `((vc-state . up-to-date) (vc-checkout-time . ,(file-attribute-modification-time @@ -1651,7 +1664,8 @@ Runs the normal hooks `vc-before-checkin-hook' and `vc-checkin-hook'." (vc-working-revision . nil))) (message "Checking in %s...done" (vc-delistify files))) 'vc-checkin-hook - backend)) + backend + patch-string)) ;;; Additional entry points for examining version histories @@ -1779,6 +1793,25 @@ objects, and finally killing buffer ORIGINAL." (defvar vc-diff-added-files nil "If non-nil, diff added files by comparing them to /dev/null.") +(defvar vc-patch-string nil) + +(defun vc-diff-patch-string (patch-string) + "Report diffs to be committed from the patch. +Like `vc-diff-internal' but uses PATCH-STRING to display +in the output buffer." + (let ((buffer "*vc-diff*")) + (vc-setup-buffer buffer) + (let ((buffer-undo-list t) + (inhibit-read-only t)) + (insert patch-string)) + (setq buffer-read-only t) + (diff-mode) + (setq-local diff-vc-backend (vc-responsible-backend default-directory)) + (setq-local revert-buffer-function (lambda (_ _) (vc-diff-patch-string))) + (setq-local vc-patch-string patch-string) + (pop-to-buffer (current-buffer)) + (vc-run-delayed (vc-diff-finish (current-buffer) nil)))) + (defun vc-diff-internal (async vc-fileset rev1 rev2 &optional verbose buffer) "Report diffs between two revisions of a fileset. Output goes to the buffer BUFFER, which defaults to *vc-diff*. From 78698e9211ce642fb0ddeb63ce7d26339863d557 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Sun, 28 Aug 2022 22:44:52 +0300 Subject: [PATCH 010/915] 'C-c C-d' on vc-log buffer shows the diff from 'vc-log-fileset' (bug#52349) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * lisp/vc/log-edit.el (log-edit-diff-fileset): New function. * lisp/vc/vc-dispatcher.el (vc-log-edit): Set log-edit-diff-function to log-edit-diff-fileset instead of vc-diff. * lisp/vc/vc.el (vc-diff): New optional arg ‘fileset’. If non-nil, use instead of vc-deduce-fileset. --- lisp/vc/log-edit.el | 7 +++++++ lisp/vc/vc-dispatcher.el | 2 +- lisp/vc/vc.el | 7 ++++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index 4a94553b214..52906163024 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el @@ -670,6 +670,13 @@ comment history, see `log-edit-comment-ring', and hides `log-edit-files-buf'." (defun log-edit-diff-patch () (vc-diff-patch-string vc-patch-string)) +(defvar vc-log-fileset) + +(defun log-edit-diff-fileset () + "Display diffs for the files to be committed." + (interactive) + (vc-diff nil nil (list log-edit-vc-backend vc-log-fileset))) + (defun log-edit-show-diff () "Show the diff for the files to be committed." (interactive) diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index df5bf1cfa69..36a6f27891b 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -656,7 +656,7 @@ NOT-URGENT means it is ok to continue if the user says not to save." (lambda (file) (file-relative-name file root)) fileset)))) (log-edit-diff-function - . ,(if vc-patch-string 'log-edit-diff-patch 'vc-diff)) + . ,(if vc-patch-string 'log-edit-diff-patch 'log-edit-diff-fileset)) (log-edit-vc-backend . ,backend) (vc-log-fileset . ,fileset) (vc-patch-string . ,vc-patch-string)) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 88139fe13d8..d93be951a3c 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -2001,19 +2001,20 @@ state of each file in the fileset." (when buffer-file-name (vc-buffer-sync not-urgent)))) ;;;###autoload -(defun vc-diff (&optional historic not-urgent) +(defun vc-diff (&optional historic not-urgent fileset) "Display diffs between file revisions. Normally this compares the currently selected fileset with their working revisions. With a prefix argument HISTORIC, it reads two revision designators specifying which revisions to compare. The optional argument NOT-URGENT non-nil means it is ok to say no to -saving the buffer." +saving the buffer. The optional argument FILESET can override the +deduced fileset." (interactive (list current-prefix-arg t)) (if historic (call-interactively 'vc-version-diff) (vc-maybe-buffer-sync not-urgent) - (let ((fileset (vc-deduce-fileset t))) + (let ((fileset (or fileset (vc-deduce-fileset t)))) (vc-buffer-sync-fileset fileset not-urgent) (vc-diff-internal t fileset nil nil (called-interactively-p 'interactive))))) From 18d5eadf2c3460ce85655211f9870a4035c202c0 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 29 Aug 2022 17:23:18 +0800 Subject: [PATCH 011/915] Unify floating point handling when reading XI motion events * src/xterm.c (handle_one_xevent): Always round values as recommended, instead of just truncating them. Also fixes weird "jitter" during drag-and-drop on some clients. --- src/xterm.c | 37 ++++++++++++++++++++++--------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 7a0a21b1369..e0a8e13b24e 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -21333,26 +21333,26 @@ handle_one_xevent (struct x_display_info *dpyinfo, /* Also remember the mouse glyph and set mouse_moved. */ if (f != dpyinfo->last_mouse_glyph_frame - || xev->event_x < r->x - || xev->event_x >= r->x + r->width - || xev->event_y < r->y - || xev->event_y >= r->y + r->height) + || lrint (xev->event_x) < r->x + || lrint (xev->event_x) >= r->x + r->width + || lrint (xev->event_y) < r->y + || lrint (xev->event_y) >= r->y + r->height) { f->mouse_moved = true; f->last_mouse_device = (source ? source->name : Qnil); dpyinfo->last_mouse_scroll_bar = NULL; - remember_mouse_glyph (f, xev->event_x, - xev->event_y, r); + remember_mouse_glyph (f, lrint (xev->event_x), + lrint (xev->event_y), r); dpyinfo->last_mouse_glyph_frame = f; } } if (xev->root == dpyinfo->root_window) target = x_dnd_get_target_window (dpyinfo, - xev->root_x, - xev->root_y, + lrint (xev->root_x), + lrint (xev->root_y), &target_proto, &motif_style, &toplevel, @@ -21490,14 +21490,16 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (x_dnd_last_window_is_frame && target != None) x_dnd_note_self_position (dpyinfo, target, - xev->root_x, xev->root_y); + lrint (xev->root_x), + lrint (xev->root_y)); else if (x_dnd_last_protocol_version != -1 && target != None) { dnd_state = xi_convert_event_state (xev); x_dnd_send_position (x_dnd_frame, target, x_dnd_last_protocol_version, - xev->root_x, xev->root_y, + lrint (xev->root_x), + lrint (xev->root_y), x_dnd_selection_timestamp, x_dnd_wanted_action, 0, dnd_state); @@ -21705,7 +21707,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, #endif x_dnd_note_self_wheel (dpyinfo, x_dnd_last_seen_window, - xev->root_x, xev->root_y, + lrint (xev->root_x), + lrint (xev->root_y), xev->detail, dnd_state, xev->time); } @@ -21713,7 +21716,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, x_dnd_send_position (x_dnd_frame, x_dnd_last_seen_window, x_dnd_last_protocol_version, - xev->root_x, xev->root_y, + lrint (xev->root_x), + lrint (xev->root_y), xev->time, x_dnd_wanted_action, xev->detail, dnd_state); @@ -21756,7 +21760,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, { x_dnd_waiting_for_finish = false; x_dnd_note_self_drop (dpyinfo, x_dnd_last_seen_window, - xev->root_x, xev->root_y, xev->time); + lrint (xev->root_x), + lrint (xev->root_y), xev->time); } else if (x_dnd_last_seen_window != None && x_dnd_last_protocol_version != -1) @@ -21831,12 +21836,14 @@ handle_one_xevent (struct x_display_info *dpyinfo, x_dnd_send_unsupported_drop (dpyinfo, (x_dnd_last_seen_toplevel != None ? x_dnd_last_seen_toplevel : x_dnd_last_seen_window), - xev->root_x, xev->root_y, xev->time); + lrint (xev->root_x), + lrint (xev->root_y), xev->time); } else if (x_dnd_last_seen_toplevel != None) x_dnd_send_unsupported_drop (dpyinfo, x_dnd_last_seen_toplevel, - xev->root_x, xev->root_y, + lrint (xev->root_x), + lrint (xev->root_y), xev->time); x_dnd_last_protocol_version = -1; From 19ec23e82cbbc59a9900f524cdb292dce46821b4 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 29 Aug 2022 12:05:02 +0200 Subject: [PATCH 012/915] Do not connect unreachable remote hosts in recentf * lisp/recentf.el (recentf-expand-file-name): Protect against stalled remote hosts. (Bug#57336) --- lisp/recentf.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/recentf.el b/lisp/recentf.el index b80ee3dd7d8..32badb1a370 100644 --- a/lisp/recentf.el +++ b/lisp/recentf.el @@ -411,7 +411,8 @@ returned nil." "Convert file NAME to absolute, and canonicalize it. NAME is first passed to the function `expand-file-name', then to `recentf-filename-handlers' to post process it." - (recentf-apply-filename-handlers (expand-file-name name))) + (let ((non-essential t)) + (recentf-apply-filename-handlers (expand-file-name name)))) (defun recentf-include-p (filename) "Return non-nil if FILENAME should be included in the recent list. From 5cae71834bd55e0bf90689b12b801206ee8c9da9 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 29 Aug 2022 09:03:34 -0400 Subject: [PATCH 013/915] * src/keyboard.c (safe_run_hooks*): Simplify and generalize (safe_run_hooks_1, safe_run_hook_funcall): Simplify and generalize to arbitrary `nargs`. (safe_run_hooks_error): Remove unneeded assertion. --- src/keyboard.c | 52 +++++++++++++++++--------------------------------- 1 file changed, 17 insertions(+), 35 deletions(-) diff --git a/src/keyboard.c b/src/keyboard.c index 1d7125a0a3e..77280d08c5b 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1827,21 +1827,15 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified) } } -/* Subroutine for safe_run_hooks: run the hook, which is ARGS[1]. */ +/* Subroutine for safe_run_hooks: run the hook's function. + ARGS[0] holds the name of the hook, which we don't need here (we only use + it in the failure case of the internal_condition_case_n). */ static Lisp_Object safe_run_hooks_1 (ptrdiff_t nargs, Lisp_Object *args) { - eassert (nargs >= 2 && nargs <= 4); - switch (nargs) - { - case 2: - return call0 (args[1]); - case 3: - return call1 (args[1], args[2]); - default: - return call2 (args[1], args[2], args[3]); - } + eassert (nargs >= 2); + return Ffuncall (nargs - 1, args + 1); } /* Subroutine for safe_run_hooks: handle an error by clearing out the function @@ -1850,7 +1844,7 @@ safe_run_hooks_1 (ptrdiff_t nargs, Lisp_Object *args) static Lisp_Object safe_run_hooks_error (Lisp_Object error, ptrdiff_t nargs, Lisp_Object *args) { - eassert (nargs >= 2 && nargs <= 4); + eassert (nargs >= 2); AUTO_STRING (format, "Error in %s (%S): %S"); Lisp_Object hook = args[0]; Lisp_Object fun = args[1]; @@ -1886,27 +1880,13 @@ safe_run_hooks_error (Lisp_Object error, ptrdiff_t nargs, Lisp_Object *args) static Lisp_Object safe_run_hook_funcall (ptrdiff_t nargs, Lisp_Object *args) { - eassert (nargs >= 2 && nargs <= 4); - /* Yes, run_hook_with_args works with args in the other order. */ - switch (nargs) - { - case 2: - internal_condition_case_n (safe_run_hooks_1, - 2, ((Lisp_Object []) {args[1], args[0]}), - Qt, safe_run_hooks_error); - break; - case 3: - internal_condition_case_n (safe_run_hooks_1, - 3, ((Lisp_Object []) {args[1], args[0], args[2]}), - Qt, safe_run_hooks_error); - break; - default: - internal_condition_case_n (safe_run_hooks_1, - 4, ((Lisp_Object []) - {args[1], args[0], args[2], args[3]}), - Qt, safe_run_hooks_error); - break; - } + eassert (nargs >= 2); + /* We need to swap args[0] and args[1] here or in `safe_run_hooks_1`. + It's more convenient to do it here. */ + Lisp_Object fun = args[0], hook = args[1]; + args[0] = hook, args[1] = fun; + internal_condition_case_n (safe_run_hooks_1, nargs, args, + Qt, safe_run_hooks_error); return Qnil; } @@ -1920,7 +1900,8 @@ safe_run_hooks (Lisp_Object hook) specpdl_ref count = SPECPDL_INDEX (); specbind (Qinhibit_quit, Qt); - run_hook_with_args (2, ((Lisp_Object []) {hook, hook}), safe_run_hook_funcall); + run_hook_with_args (2, ((Lisp_Object []) {hook, hook}), + safe_run_hook_funcall); unbind_to (count, Qnil); } @@ -1936,7 +1917,8 @@ safe_run_hooks_maybe_narrowed (Lisp_Object hook, struct window *w) make_fixnum (get_narrowed_zv (w, PT)), true); - run_hook_with_args (2, ((Lisp_Object []) {hook, hook}), safe_run_hook_funcall); + run_hook_with_args (2, ((Lisp_Object []) {hook, hook}), + safe_run_hook_funcall); unbind_to (count, Qnil); } From 6f57cb6d8141e35fee39ea31f08d4ce5cf6c51e5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 29 Aug 2022 16:52:07 +0300 Subject: [PATCH 014/915] Fix point adjustment in recreated *Messages* buffers * lisp/startup.el (normal-top-level): Move setting of 'window-point-insertion-type' from here... * lisp/simple.el (messages-buffer-mode): ...to here. This is so any *Messages* buffers we create instead of the original one, if it's killed, will have the same type of the window-point marker. (Bug#57466) --- lisp/simple.el | 4 +++- lisp/startup.el | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index daacf697ff3..2512397b240 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -10431,7 +10431,9 @@ and setting it to nil." map)) (define-derived-mode messages-buffer-mode special-mode "Messages" - "Major mode used in the \"*Messages*\" buffer.") + "Major mode used in the \"*Messages*\" buffer." + ;; Make it easy to do like "tail -f". + (setq-local window-point-insertion-type t)) (defun messages-buffer () "Return the \"*Messages*\" buffer. diff --git a/lisp/startup.el b/lisp/startup.el index b0fbf7a34cd..50a8f491d8e 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -718,8 +718,6 @@ It is the default value of the variable `top-level'." (let ((dir default-directory)) (with-current-buffer "*Messages*" (messages-buffer-mode) - ;; Make it easy to do like "tail -f". - (setq-local window-point-insertion-type t) ;; Give *Messages* the same default-directory as *scratch*, ;; just to keep things predictable. (setq default-directory (or dir (expand-file-name "~/"))))) From 4d52fe6b968b63e9c9025121147d4930ca65a05f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 29 Aug 2022 17:02:46 +0300 Subject: [PATCH 015/915] * lisp/find-file.el (ff-other-file-alist): Doc fix. (Bug#57325) --- lisp/find-file.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/find-file.el b/lisp/find-file.el index 614ff420f25..e9aba883ae1 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el @@ -204,7 +204,12 @@ The list of extensions should contain the most used extensions before the others, since the search algorithm searches sequentially through each directory specified in `ff-search-directories'. If a file is not found, a new one is created with the first matching extension (`.cc' yields `.hh'). -This alist should be set by the major mode." +This alist should be set by the major mode. + +Note: if an element of the alist names a FUNCTION as its cdr, that +function must return a non-nil list of file-name extensions. It cannot +return nil, nor can it signal in any way a failure to find a suitable +list of extensions." :type '(choice (repeat (list regexp (choice (repeat string) function))) symbol)) From a5a92e577cba1af6a7947bf1f7c020a1b5adb39e Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 29 Aug 2022 17:09:02 +0300 Subject: [PATCH 016/915] ; * src/window.c (syms_of_window) : Doc fix. --- src/window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/window.c b/src/window.c index 35ec2a1f908..ed30544ff83 100644 --- a/src/window.c +++ b/src/window.c @@ -8309,7 +8309,8 @@ on their symbols to be controlled by this variable. */); Vscroll_preserve_screen_position = Qnil; DEFVAR_LISP ("window-point-insertion-type", Vwindow_point_insertion_type, - doc: /* Type of marker to use for `window-point'. */); + doc: /* Insertion type of marker to use for `window-point'. +See `marker-insertion-type' for the meaning of the possible values. */); Vwindow_point_insertion_type = Qnil; DEFSYM (Qwindow_point_insertion_type, "window-point-insertion-type"); From 46a49b748eaf5553a6eb45215b14baebc090b33b Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 29 Aug 2022 17:15:17 +0200 Subject: [PATCH 017/915] Work around `&' dired command when using the fish shell * lisp/dired-aux.el (dired-shell-stuff-it): Add a space before &wait; this apparently makes the `&' command work with the fish shell (bug#57472). --- lisp/dired-aux.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/dired-aux.el b/lisp/dired-aux.el index 06f0b86fc43..0e8062af528 100644 --- a/lisp/dired-aux.el +++ b/lisp/dired-aux.el @@ -987,7 +987,7 @@ Also see the `dired-confirm-shell-command' variable." ;; Add 'wait' to force those POSIX shells to wait until ;; all commands finish. (or (and parallel-in-background (not w32-shell) - "&wait") + " &wait") ""))) (t (let ((files (mapconcat #'shell-quote-argument @@ -999,7 +999,7 @@ Also see the `dired-confirm-shell-command' variable." ;; Be consistent in how we treat inputs to commands -- do ;; the same here as in the `on-each' case. (if (and in-background (not w32-shell)) - "&wait" + " &wait" ""))))) (or (and in-background "&") "")))) From df62a3f85ac71bde3b045c19867f142d8e1ead67 Mon Sep 17 00:00:00 2001 From: Jake Moss Date: Mon, 29 Aug 2022 17:23:46 +0200 Subject: [PATCH 018/915] Show gdb-mi disassembly over tramp * lisp/progmodes/gdb-mi.el (gdb-invalidate-disassembly): Show gdb-mi disassembly over tramp (bug#57464). Copyright-paperwork-exempt: yes --- lisp/progmodes/gdb-mi.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index bab80719dbd..6e8032b7eae 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el @@ -4033,11 +4033,12 @@ DOC is an optional documentation string." (file (gdb-mi--field frame 'fullname)) (line (gdb-mi--field frame 'line))) (if file - (format "-data-disassemble -f %s -l %s -n -1 -- 0" file line) - ;; If we're unable to get a file name / line for $PC, simply - ;; follow $PC, disassembling the next 10 (x ~15 (on IA) == - ;; 150 bytes) instructions. - "-data-disassemble -s $pc -e \"$pc + 150\" -- 0")) + (format "-data-disassemble -f %s -l %s -n -1 -- 0" + (file-local-name file) line) + ;; If we're unable to get a file name / line for $PC, simply + ;; follow $PC, disassembling the next 10 (x ~15 (on IA) == + ;; 150 bytes) instructions. + "-data-disassemble -s $pc -e \"$pc + 150\" -- 0")) gdb-disassembly-handler ;; We update disassembly only after we have actual frame information ;; about all threads, so no there's `update' signal in this list From c0bb1aac102f8727484763370b154f635a6a1fd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Mon, 29 Aug 2022 17:44:31 +0200 Subject: [PATCH 019/915] Fix reader memory leak upon error (bug#56623) Reported by Tom Gillespie; error found by Greg Hendershott. * src/lread.c (read_stack_reset): New. (read0): Reset read stack when unwinding from an error. --- src/lread.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lread.c b/src/lread.c index ccccd79cd7c..15bbf46f78f 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3686,6 +3686,12 @@ read_stack_push (struct read_stack_entry e) rdstack.stack[rdstack.sp++] = e; } +static void +read_stack_reset (intmax_t sp) +{ + eassert (sp <= rdstack.sp); + rdstack.sp = sp; +} /* Read a Lisp object. If LOCATE_SYMS is true, symbols are read with position. */ @@ -3699,6 +3705,7 @@ read0 (Lisp_Object readcharfun, bool locate_syms) specpdl_ref count = SPECPDL_INDEX (); ptrdiff_t base_sp = rdstack.sp; + record_unwind_protect_intmax (read_stack_reset, base_sp); bool uninterned_symbol; bool skip_shorthand; From 9f692bcd84e2b6e450e154361e1058186e6481a8 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 29 Aug 2022 19:26:39 +0200 Subject: [PATCH 020/915] Improve point-at-{bol,eol} obsoletion message * lisp/subr.el (point-at-eol, point-at-bol): Mention 'pos-eol' and 'pos-bol' in obsoletion message. --- lisp/subr.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 36f5e2fee49..2ffc594997c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1913,8 +1913,10 @@ be a list of the form returned by `event-start' and `event-end'." (defalias 'mkdir #'make-directory) ;; These were the XEmacs names, now obsolete: -(define-obsolete-function-alias 'point-at-eol #'line-end-position "29.1") -(define-obsolete-function-alias 'point-at-bol #'line-beginning-position "29.1") +(defalias 'point-at-eol #'line-end-position) +(make-obsolete 'point-at-eol "use `line-end-position' or `pos-eol' instead." "29.1") +(defalias 'point-at-bol #'line-beginning-position) +(make-obsolete 'point-at-bol "use `line-beginning-position' or `pos-bol' instead." "29.1") (define-obsolete-function-alias 'user-original-login-name #'user-login-name "28.1") ;; These are in obsolete/autoload.el, but are commonly used by From 2d9a39172734ab024126fb08496b5272d1b68e47 Mon Sep 17 00:00:00 2001 From: Gregory Heytings Date: Mon, 29 Aug 2022 16:06:37 +0000 Subject: [PATCH 021/915] Recommend using fbterm in the Linux console. * doc/misc/efaq.texi (Emacs in a Linux console): New node. (Common requests): Entry for the new node. * etc/PROBLEMS (Linux console problems...): Mention the new FAQ node. --- doc/misc/efaq.texi | 85 ++++++++++++++++++++++++++++++++++++++++++++++ etc/PROBLEMS | 7 ++++ 2 files changed, 92 insertions(+) diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 373efe9ad5f..2da37a1d215 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -1603,6 +1603,7 @@ is better to write ``Emacs and XEmacs.'' * Filling paragraphs with a single space:: * Escape sequences in shell output:: * Fullscreen mode on MS-Windows:: +* Emacs in a Linux console:: @end menu @node Setting up a customization file @@ -3020,6 +3021,90 @@ To compute the correct values for width and height, first maximize the Emacs frame and then evaluate @code{(frame-height)} and @code{(frame-width)} with @kbd{M-:}. +@node Emacs in a Linux console +@section How can I alleviate the limitations of the Linux console? +@cindex Console, Linux console, TTY, fbterm + +If possible, we recommend running Emacs inside @command{fbterm}, when +in a Linux console. This brings the Linux console on par with most +terminal emulators under X. To do this, install @command{fbterm}, for +example with the package manager of your GNU/Linux distribution, and +execute the command + +@example +$ fbterm +@end example + +This will create a sample configuration file @file{~/.fbtermrc} in +your home directory. Edit that file and change the options +@code{font-names} and @code{font-size} if necessary. For the former, +you can choose one or more of the lines in the output of the following +command, separated by commas: + +@example +$ fc-list :spacing=mono family | sed 's/ /\\ /g' +@end example + +You can now start Emacs inside @command{fbterm} with the command + +@example +$ fbterm -- emacs +@end example + +You may want to add an alias for that command in your shell +configuration file. For example, if you use Bash, you can add the +following line to your @file{~/.bashrc} file: + +@example +alias emacs="fbterm -- emacs" +@end example + +@noindent +or, if you use Emacs both in the Linux console and under X: + +@example +[[ "$(tty)" =~ "/dev/tty" ]] && alias emacs="fbterm -- emacs" +@end example + +The @command{fbterm} terminal emulator may define a number of key +bindings for its own use, some of which conflict with those that Emacs +uses. Execute the following two commands as root to ensure that +@command{fbterm} does not define these key bindings: + +@example +# chmod a-s `which fbterm` +# setcap cap_sys_tty_config=-ep `which fbterm` +@end example + +If you use Emacs as root, the above is not enough however, because the +root user has all privileges. You can use the following command to +start Emacs inside @command{fbterm} as root while ensuring that +@command{fbterm} does not define any key bindings for its own use: + +@example +# capsh --drop=cap_sys_tty_config -- -c "fbterm -- emacs" +@end example + +Again you may want to add a shortcut for that command in the shell +configuration file of the root user. In this case however, it is not +possible to use an alias, because the command line arguments passed to +Emacs need to be inserted in the string at the end of the command. A +wrapper script or a function can be used to do that. For example, if +you use Bash, you can add the following function in the root user +@file{~/.bashrc} file: + +@example +function emacs () +@{ + CMD="fbterm -- emacs " + for ARG in "$@@" + do + CMD="$CMD '$ARG' " + done + capsh --drop=cap_sys_tty_config -- -c "$CMD" +@} +@end example + @c ------------------------------------------------------------ @node Bugs and problems @chapter Bugs and problems diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 2a82995c994..9e0b0148ba3 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -2108,6 +2108,13 @@ term/xterm.el) for more details. *** Linux console problems with double-width characters +If possible, we recommend running Emacs inside fbterm, when in a Linux +console (see the node "Emacs in a Linux console" in the Emacs FAQ). +Most Unicode characters should then be displayed correctly. + +If that is not possible, the following may be useful to alleviate the +problem of displaying Unicode characters in a raw console. + The Linux console declares UTF-8 encoding, but supports only a limited number of Unicode characters, and can cause Emacs produce corrupted or garbled display with some unusual characters and sequences. Emacs 28 From f9250c5ebc1730bf3bed4382549433f52f7ef9ca Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Mon, 22 Aug 2022 09:53:24 -0700 Subject: [PATCH 022/915] Handle 'eshell-pipe-broken' when evaluating Lisp forms in Eshell * lisp/eshell/esh-cmd.el (eshell-exec-lisp): Handle 'eshell-pipe-broken'. * lisp/eshell/esh-io.el (eshell-output-object-to-target): Only signal 'eshell-pipe-broken' if the process being written to has finished. * test/lisp/eshell/esh-proc-tests.el (esh-proc-test/pipeline-connection-type/middle) (esh-proc-test/pipeline-connection-type/last): Remove ':unstable'. Ref: https://lists.gnu.org/archive/html/emacs-devel/2022-08/msg00524.html --- lisp/eshell/esh-cmd.el | 9 +++++++++ lisp/eshell/esh-io.el | 12 +++++++++--- test/lisp/eshell/esh-proc-tests.el | 4 ---- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el index 2f77f3f4974..a43ad77213d 100644 --- a/lisp/eshell/esh-cmd.el +++ b/lisp/eshell/esh-cmd.el @@ -1347,6 +1347,15 @@ case." (apply func-or-form args))))) (and result (funcall printer result)) result) + (eshell-pipe-broken + ;; If FUNC-OR-FORM tried and failed to write some output to a + ;; process, it will raise an `eshell-pipe-broken' signal (this is + ;; analogous to SIGPIPE on POSIX systems). In this case, set the + ;; command status to some non-zero value to indicate an error; to + ;; match GNU/Linux, we use 141, which the numeric value of + ;; SIGPIPE on GNU/Linux (13) with the high bit (2^7) set. + (setq eshell-last-command-status 141) + nil) (error (setq eshell-last-command-status 1) (let ((msg (error-message-string err))) diff --git a/lisp/eshell/esh-io.el b/lisp/eshell/esh-io.el index e5977c95807..d54be55c130 100644 --- a/lisp/eshell/esh-io.el +++ b/lisp/eshell/esh-io.el @@ -498,10 +498,16 @@ Returns what was actually sent, or nil if nothing was sent." ((eshell-processp target) (unless (stringp object) (setq object (eshell-stringify object))) - (condition-case nil + (condition-case err (process-send-string target object) - ;; If `process-send-string' raises an error, treat it as a broken pipe. - (error (signal 'eshell-pipe-broken (list target))))) + (error + ;; If `process-send-string' raises an error and the process has + ;; finished, treat it as a broken pipe. Otherwise, just + ;; re-throw the signal. + (if (memq (process-status target) + '(run stop open closed)) + (signal (car err) (cdr err)) + (signal 'eshell-pipe-broken (list target)))))) ((consp target) (apply (car target) object (cdr target)))) diff --git a/test/lisp/eshell/esh-proc-tests.el b/test/lisp/eshell/esh-proc-tests.el index 62e784e8f62..2369bb5cc00 100644 --- a/test/lisp/eshell/esh-proc-tests.el +++ b/test/lisp/eshell/esh-proc-tests.el @@ -74,8 +74,6 @@ (ert-deftest esh-proc-test/pipeline-connection-type/middle () "Test that all streams are pipes when a command is in the middle of a pipeline." - ;; Repeated unreproducible errors. - :tags '(:unstable) (skip-unless (and (executable-find "sh") (executable-find "cat"))) (eshell-command-result-equal @@ -84,8 +82,6 @@ pipeline." (ert-deftest esh-proc-test/pipeline-connection-type/last () "Test that only output streams are PTYs when a command ends a pipeline." - ;; Repeated unreproducible errors. - :tags '(:unstable) (skip-unless (executable-find "sh")) (eshell-command-result-equal (concat "echo | " esh-proc-test--detect-pty-cmd) From a998591522416c2aebee8daf4ca35a5b4b7177bb Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 30 Aug 2022 10:28:34 +0300 Subject: [PATCH 023/915] * lisp/char-fold.el (describe-char-fold-equivalences): New command. (char-fold--no-regexp): New internal variable. (char-fold--make-table): Use it to skip translation to regexp. Suggested by Robert Pluim . https://lists.gnu.org/archive/html/emacs-devel/2022-07/msg00864.html --- etc/NEWS | 3 +++ lisp/char-fold.el | 66 +++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 64 insertions(+), 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index b27f0760d12..a40954a8376 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1518,6 +1518,9 @@ with 'C-s C-s', but also after typing a character. Non-nil means that the default definitions of equivalent characters are overridden. +*** New command 'describe-char-fold-equivalences'. +It displays character equivalences used by `char-fold-to-regexp'. + +++ *** New command 'isearch-emoji-by-name'. It is bound to 'C-x 8 e RET' during an incremental search. The diff --git a/lisp/char-fold.el b/lisp/char-fold.el index 05ae52cae0d..e4c7c3c41e5 100644 --- a/lisp/char-fold.el +++ b/lisp/char-fold.el @@ -48,6 +48,7 @@ (eval-and-compile + (defvar char-fold--no-regexp nil) (defun char-fold--make-table () (let* ((equiv (make-char-table 'char-fold-table)) (equiv-multi (make-char-table 'char-fold-table)) @@ -201,11 +202,14 @@ symmetric))) ;; Convert the lists of characters we compiled into regexps. - (map-char-table - (lambda (char decomp-list) - (let ((re (regexp-opt (cons (char-to-string char) decomp-list)))) - (aset equiv char re))) - equiv) + (unless char-fold--no-regexp + ;; Non-nil `char-fold--no-regexp' unoptimized for regexp + ;; is used by `describe-char-fold-equivalences'. + (map-char-table + (lambda (char decomp-list) + (let ((re (regexp-opt (cons (char-to-string char) decomp-list)))) + (aset equiv char re))) + equiv)) equiv))) (defconst char-fold-table @@ -421,6 +425,58 @@ BOUND NOERROR COUNT are passed to `re-search-backward'." (interactive "sSearch: ") (re-search-backward (char-fold-to-regexp string) bound noerror count)) + +(defun describe-char-fold-equivalences (char &optional lax) + "Display characters equivalent to CHAR. +Prompt for CHAR. With no input, i.e. when CHAR is nil, by default +describe all available character equivalences of `char-fold-to-regexp'. +Interactively, a prefix arg means also include partially matching +ligatures." + (interactive (list (ignore-errors + (read-char-by-name + "Character (Unicode name or hex, default all): ")) + current-prefix-arg)) + (require 'help-fns) + (let ((help-buffer-under-preparation t)) + (help-setup-xref (list #'describe-char-fold-equivalences) + (called-interactively-p 'interactive)) + (let* ((equivalences nil) + (char-fold--no-regexp t) + (table (char-fold--make-table)) + (extra (char-table-extra-slot table 0))) + (if (not char) + (map-char-table + (lambda (char list) + (when lax + (setq list (append list (mapcar (lambda (entry) + (cdr entry)) + (aref extra char))))) + (setq equivalences (cons (cons char list) + equivalences))) + table) + (setq equivalences (aref table char)) + (when lax + (setq equivalences (append equivalences + (mapcar (lambda (entry) + (cdr entry)) + (aref extra char))))) + (setq equivalences (cons (char-to-string char) equivalences))) + (with-help-window (help-buffer) + (with-current-buffer standard-output + (if char + (insert (mapconcat + (lambda (c) + (format "%s: \?\\N{%s}\n" + c + (or (get-char-code-property (string-to-char c) 'name) + (get-char-code-property (string-to-char c) 'old-name)))) + equivalences)) + (insert "A list of char-fold equivalences for `char-fold-to-regexp':\n\n") + (setq-local bidi-paragraph-direction 'left-to-right) + (dolist (equiv (nreverse equivalences)) + (insert (format "%c: %s\n" (car equiv) + (string-join (cdr equiv) " ")))))))))) + (provide 'char-fold) ;;; char-fold.el ends here From 57ba65e047de2495500ba375070a896913cce267 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 30 Aug 2022 10:53:11 +0200 Subject: [PATCH 024/915] Fix char-fold compilation warning * lisp/char-fold.el (require): Get string-join definition. --- lisp/char-fold.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/char-fold.el b/lisp/char-fold.el index e4c7c3c41e5..ce395ddaab0 100644 --- a/lisp/char-fold.el +++ b/lisp/char-fold.el @@ -24,6 +24,8 @@ ;;; Code: +(eval-when-compile (require 'subr-x)) + (eval-and-compile (put 'char-fold-table 'char-table-extra-slots 1) (defconst char-fold--default-override nil) From 8954fcb93bb271f5147b19671d1bf87d88d8047a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Tue, 30 Aug 2022 11:20:42 +0200 Subject: [PATCH 025/915] ; * src/lread.c (read0): Fix specpdl off-by-one bug in last change. --- src/lread.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lread.c b/src/lread.c index 15bbf46f78f..bb376064811 100644 --- a/src/lread.c +++ b/src/lread.c @@ -3702,11 +3702,13 @@ read0 (Lisp_Object readcharfun, bool locate_syms) char *read_buffer = stackbuf; ptrdiff_t read_buffer_size = sizeof stackbuf; char *heapbuf = NULL; - specpdl_ref count = SPECPDL_INDEX (); + specpdl_ref base_pdl = SPECPDL_INDEX (); ptrdiff_t base_sp = rdstack.sp; record_unwind_protect_intmax (read_stack_reset, base_sp); + specpdl_ref count = SPECPDL_INDEX (); + bool uninterned_symbol; bool skip_shorthand; @@ -4354,7 +4356,7 @@ read0 (Lisp_Object readcharfun, bool locate_syms) } } - return unbind_to (count, obj); + return unbind_to (base_pdl, obj); } From db6e574567350f8cf2eec698ea82e62dcd9d27a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerd=20M=C3=B6llmann?= Date: Tue, 30 Aug 2022 12:54:29 +0200 Subject: [PATCH 026/915] ; Ignore test/gmo.h in .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0ecbcd061fb..eb77b2388f4 100644 --- a/.gitignore +++ b/.gitignore @@ -330,3 +330,4 @@ manual/ # Ignore a directory used by dap-mode. .vscode +/test/gmp.h From 0bf5463f8147ea9143d286d5a9df7c8421a1ac4b Mon Sep 17 00:00:00 2001 From: Po Lu Date: Tue, 30 Aug 2022 19:27:39 +0800 Subject: [PATCH 027/915] Fix junk data being returned with incremental selection transfers * src/xselect.c (receive_incremental_selection): New arg REAL_BYTES_RET. Set it to the actual size instead of using the size of the array after it was grown by xpalloc. (x_get_window_property_as_lisp_data): Adjust call to receive_incremental_selection. --- src/xselect.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/src/xselect.c b/src/xselect.c index bab0400540e..74d762f3055 100644 --- a/src/xselect.c +++ b/src/xselect.c @@ -1567,7 +1567,8 @@ receive_incremental_selection (struct x_display_info *dpyinfo, unsigned char **data_ret, ptrdiff_t *size_bytes_ret, Atom *type_ret, int *format_ret, - unsigned long *size_ret) + unsigned long *size_ret, + ptrdiff_t *real_bytes_ret) { ptrdiff_t offset = 0; struct prop_location *wait_object; @@ -1622,7 +1623,8 @@ receive_incremental_selection (struct x_display_info *dpyinfo, if (tmp_size_bytes == 0) /* we're done */ { - TRACE0 ("Done reading incrementally"); + TRACE1 ("Done reading incrementally; total bytes: %"pD"d", + *size_bytes_ret); if (! waiting_for_other_props_on_window (display, window)) XSelectInput (display, window, STANDARD_EVENT_SET); @@ -1652,6 +1654,19 @@ receive_incremental_selection (struct x_display_info *dpyinfo, memcpy ((*data_ret) + offset, tmp_data, tmp_size_bytes); offset += tmp_size_bytes; + /* *size_bytes_ret is not really the size of the data inside the + buffer; it is the size of the buffer allocated by xpalloc. + + This matters when the cardinal specified in the INCR property + (a _lower bound_ on the size of the selection data) is + smaller than the actual selection contents, which can happen + when programs are streaming selection data from a file + descriptor. In that case, we used to return junk if xpalloc + decided to grow the buffer by more than the provided + increment; to avoid that, store the actual size of the + selection data in *real_bytes_ret. */ + *real_bytes_ret += tmp_size_bytes; + /* Use xfree, not XFree, because x_get_window_property calls xmalloc itself. */ xfree (tmp_data); @@ -1674,10 +1689,14 @@ x_get_window_property_as_lisp_data (struct x_display_info *dpyinfo, int actual_format; unsigned long actual_size; unsigned char *data = 0; - ptrdiff_t bytes = 0; + ptrdiff_t bytes = 0, array_bytes; Lisp_Object val; Display *display = dpyinfo->display; + /* array_bytes is only used as an argument to xpalloc. The actual + size of the data inside the buffer is inside bytes. */ + array_bytes = 0; + TRACE0 ("Reading selection data"); x_get_window_property (display, window, property, &data, &bytes, @@ -1718,10 +1737,15 @@ x_get_window_property_as_lisp_data (struct x_display_info *dpyinfo, calls xmalloc itself. */ xfree (data); unblock_input (); + + /* Clear bytes again. Previously, receive_incremental_selection + would set this to min_size_bytes, but that is now done to + array_bytes instead. */ + bytes = 0; receive_incremental_selection (dpyinfo, window, property, target_type, - min_size_bytes, &data, &bytes, + min_size_bytes, &data, &array_bytes, &actual_type, &actual_format, - &actual_size); + &actual_size, &bytes); } if (!for_multiple) From 0cbcaf5119d36093882f0c414c4c586186ef77b2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 30 Aug 2022 15:42:34 +0300 Subject: [PATCH 028/915] ; Yet another doc fix for 'ff-other-file-alist' (bug#57325) --- lisp/find-file.el | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/lisp/find-file.el b/lisp/find-file.el index e9aba883ae1..aaabec11e83 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el @@ -193,17 +193,26 @@ The value could be an alist or a symbol whose value is an alist. Each element of the alist has the form (REGEXP (EXTENSION...)) -or - (REGEXP FUNCTION) where REGEXP is the regular expression matching a file's extension, -EXTENSIONs is the list of literal file-name extensions to search for, -and FUNCTION is a function of one argument, the current file's name, -that returns the list of extensions to search for. -The list of extensions should contain the most used extensions before the -others, since the search algorithm searches sequentially through each -directory specified in `ff-search-directories'. If a file is not found, -a new one is created with the first matching extension (`.cc' yields `.hh'). +and EXTENSIONs is the list of literal file-name extensions to search +for. The list of extensions should contain the most used extensions +before the others, since the search algorithm searches sequentially +through each directory specified in `ff-search-directories'. + +Alist elements can also be of the form + + (REGEXP FUNCTION) + +where FUNCTION is a function of one argument, the current file's name, +that returns the list of possible names of the corresponding files, with +or without leading directories. Note the difference: FUNCTION returns +the list of file names, not their extensions. This is for the case when +REGEXP is not enough to determine the file name of the other file. + +If a file is not found, a new one is created with the first +matching extension or name (e.g., `.cc' yields `.hh'). + This alist should be set by the major mode. Note: if an element of the alist names a FUNCTION as its cdr, that From 3e5716dba3ea203a4dc8be794a6b2dee13d5ecc4 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 30 Aug 2022 16:12:37 +0300 Subject: [PATCH 029/915] ; * etc/NEWS: Clarify wording of "C-x v v" entry. --- etc/NEWS | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index a40954a8376..8d251448d35 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1583,11 +1583,16 @@ info node. This command only works for the Emacs and Emacs Lisp manuals. This command marks files based on a regexp. If given a prefix argument, unmark instead. -*** 'C-x v v' on a diff buffer commits it as a patch. -You can create a diff buffer by e.g. 'C-x v D' ('vc-root-diff'), -then remove unnecessary hunks, and commit only part of your changes -by typing 'C-x v v' in that diff buffer. Currently this works only -with Git. +--- +*** 'C-x v v' in a diffs buffer allows to commit only some of the changes. +This command is intended to allow you to commit only some of the +changes you have in your working tree. Begin by creating a buffer +with the changes against the last commit, e.g. with 'C-x v D' +('vc-root-diff'). Then edit the diffs to remove the hunks you don't +want to commit. Finally, type 'C-x v v' in that diff buffer to commit +only part of your changes, those whose hunks were left in the buffer. + +Currently this feature works only with the Git as 'vc-backend'. --- *** 'C-x v v' on an unregistered file will now use the most specific backend. From 5cf7b1ada96c2e209580d086d15b1bbe5b345657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Tue, 30 Aug 2022 11:57:29 +0200 Subject: [PATCH 030/915] ; * src/lread.c (invalid_radix_integer): Use a local buffer. --- src/lread.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/lread.c b/src/lread.c index bb376064811..d64a4fad3af 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2905,20 +2905,18 @@ digit_to_number (int character, int base) return digit < base ? digit : -1; } -/* Size of the fixed-size buffer used during reading. - It should be at least big enough for `invalid_radix_integer' but - can usefully be much bigger than that. */ -enum { stackbufsize = 1024 }; - static void -invalid_radix_integer (EMACS_INT radix, char stackbuf[VLA_ELEMS (stackbufsize)], - Lisp_Object readcharfun) +invalid_radix_integer (EMACS_INT radix, Lisp_Object readcharfun) { - int n = snprintf (stackbuf, stackbufsize, "integer, radix %"pI"d", radix); - eassert (n < stackbufsize); - invalid_syntax (stackbuf, readcharfun); + char buf[64]; + int n = snprintf (buf, sizeof buf, "integer, radix %"pI"d", radix); + eassert (n < sizeof buf); + invalid_syntax (buf, readcharfun); } +/* Size of the fixed-size buffer used during reading. */ +enum { stackbufsize = 1024 }; + /* Read an integer in radix RADIX using READCHARFUN to read characters. RADIX must be in the interval [2..36]. Use STACKBUF for temporary storage as needed. Value is the integer read. @@ -2976,7 +2974,7 @@ read_integer (Lisp_Object readcharfun, int radix, UNREAD (c); if (valid != 1) - invalid_radix_integer (radix, stackbuf, readcharfun); + invalid_radix_integer (radix, readcharfun); *p = '\0'; return unbind_to (count, string_to_number (read_buffer, radix, NULL)); @@ -3989,7 +3987,7 @@ read0 (Lisp_Object readcharfun, bool locate_syms) { /* #NrDIGITS -- radix-N number */ if (n < 0 || n > 36) - invalid_radix_integer (n, stackbuf, readcharfun); + invalid_radix_integer (n, readcharfun); obj = read_integer (readcharfun, n, stackbuf); break; } From e1e60e51bf324aaa2137075827c4d08a331a7bef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Tue, 30 Aug 2022 16:44:51 +0200 Subject: [PATCH 031/915] Accept bignum arguments in `take` and `ntake` * src/fns.c (Ftake, Fntake): Accept any integer as first argument, for completeness. * test/src/fns-tests.el (fns--take-ntake): Add test cases. --- src/fns.c | 20 ++++++++++++++++++-- test/src/fns-tests.el | 10 +++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/src/fns.c b/src/fns.c index 7e78bba3a04..07102256fed 100644 --- a/src/fns.c +++ b/src/fns.c @@ -1563,7 +1563,15 @@ If N is zero or negative, return nil. If N is greater or equal to the length of LIST, return LIST (or a copy). */) (Lisp_Object n, Lisp_Object list) { - CHECK_FIXNUM (n); + if (BIGNUMP (n)) + { + if (mpz_sgn (*xbignum_val (n)) < 0) + return Qnil; + CHECK_LIST (list); + return list; + } + if (!FIXNUMP (n)) + wrong_type_argument (Qintegerp, n); EMACS_INT m = XFIXNUM (n); if (m <= 0) return Qnil; @@ -1594,7 +1602,15 @@ If N is greater or equal to the length of LIST, return LIST unmodified. Otherwise, return LIST after truncating it. */) (Lisp_Object n, Lisp_Object list) { - CHECK_FIXNUM (n); + if (BIGNUMP (n)) + { + if (mpz_sgn (*xbignum_val (n)) < 0) + return Qnil; + CHECK_LIST (list); + return list; + } + if (!FIXNUMP (n)) + wrong_type_argument (Qintegerp, n); EMACS_INT m = XFIXNUM (n); if (m <= 0) return Qnil; diff --git a/test/src/fns-tests.el b/test/src/fns-tests.el index a84cce3ad4e..4ef428af03e 100644 --- a/test/src/fns-tests.el +++ b/test/src/fns-tests.el @@ -1412,6 +1412,14 @@ (should (equal (take 5 list) '(a b c b c))) (should (equal (take 10 list) '(a b c b c b c b c b))) - (should (equal (ntake 10 list) '(a b))))) + (should (equal (ntake 10 list) '(a b)))) + + ;; Bignum N argument. + (let ((list (list 'a 'b 'c))) + (should (equal (take (+ most-positive-fixnum 1) list) '(a b c))) + (should (equal (take (- most-negative-fixnum 1) list) nil)) + (should (equal (ntake (+ most-positive-fixnum 1) list) '(a b c))) + (should (equal (ntake (- most-negative-fixnum 1) list) nil)) + (should (equal list '(a b c))))) ;;; fns-tests.el ends here From bbc23ca8ab42d7a45bcbadd5ffd911868eb6f99d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 30 Aug 2022 19:09:00 +0300 Subject: [PATCH 032/915] One more fix for find-file.el * lisp/find-file.el (ff-get-file-name): Use 'expand-file-name' instead of 'concat', which doesn't DTRT with absolute file names. (ff-other-file-alist): Yet another doc fix. (Bug#57325) --- lisp/find-file.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/find-file.el b/lisp/find-file.el index aaabec11e83..646779fc919 100644 --- a/lisp/find-file.el +++ b/lisp/find-file.el @@ -216,9 +216,9 @@ matching extension or name (e.g., `.cc' yields `.hh'). This alist should be set by the major mode. Note: if an element of the alist names a FUNCTION as its cdr, that -function must return a non-nil list of file-name extensions. It cannot +function must return a non-nil list of file-names. It cannot return nil, nor can it signal in any way a failure to find a suitable -list of extensions." +list of file names." :type '(choice (repeat (list regexp (choice (repeat string) function))) symbol)) @@ -629,7 +629,7 @@ name of the first file found." (while (and suffixes (not found)) (setq filename (concat fname-stub this-suffix)) - (setq file (concat dir "/" filename)) + (setq file (expand-file-name filename dir)) (if (not ff-quiet-mode) (message "Finding %s..." file)) From 7804536e4e6dd7fa57d38b9b6c6835ae316bff50 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Tue, 30 Aug 2022 20:09:20 +0300 Subject: [PATCH 033/915] Fix 744ed0ceeed7472a160fea7154939cf641205577 from bug#57082 (bug#57176) * lisp/outline.el (outline-minor-mode-highlight-buffer): Handle 'append'. (outline-minor-mode): Call outline--fix-up-all-buttons when font-lock is used. * lisp/textmodes/emacs-news-mode.el (emacs-news--mode-common): Fix regexp. --- lisp/outline.el | 21 +++++++++++---------- lisp/textmodes/emacs-news-mode.el | 6 ++++-- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/lisp/outline.el b/lisp/outline.el index 3250b62f1e7..857ac9562fd 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -427,15 +427,14 @@ outline font-lock faces to those of major mode." (goto-char (point-min)) (let ((regexp (concat "^\\(?:" outline-regexp "\\).*$"))) (while (re-search-forward regexp nil t) - (let ((overlay (make-overlay (match-beginning 0) - (match-end 0)))) + (let ((overlay (make-overlay (match-beginning 0) (match-end 0)))) (overlay-put overlay 'outline-overlay t) - (when (or (eq outline-minor-mode-highlight 'override) + ;; FIXME: Is it possible to override all underlying face attributes? + (when (or (memq outline-minor-mode-highlight '(append override)) (and (eq outline-minor-mode-highlight t) - (goto-char (match-beginning 0)) - (not (get-text-property (point) 'face)))) + (not (get-text-property (match-beginning 0) 'face)))) (overlay-put overlay 'face (outline-font-lock-face))) - (when (and (outline--use-buttons-p) (outline-on-heading-p)) + (when (outline--use-buttons-p) (outline--insert-open-button))) (goto-char (match-end 0)))))) @@ -452,10 +451,12 @@ See the command `outline-mode' for more information on this mode." (if outline-minor-mode (progn (when outline-minor-mode-highlight - (when (and global-font-lock-mode (font-lock-specified-p major-mode)) - (font-lock-add-keywords nil outline-font-lock-keywords t) - (font-lock-flush)) - (outline-minor-mode-highlight-buffer)) + (if (and global-font-lock-mode (font-lock-specified-p major-mode)) + (progn + (font-lock-add-keywords nil outline-font-lock-keywords t) + (font-lock-flush) + (outline--fix-up-all-buttons)) + (outline-minor-mode-highlight-buffer))) ;; Turn off this mode if we change major modes. (add-hook 'change-major-mode-hook (lambda () (outline-minor-mode -1)) diff --git a/lisp/textmodes/emacs-news-mode.el b/lisp/textmodes/emacs-news-mode.el index 022e17c9343..6bf96deaccb 100644 --- a/lisp/textmodes/emacs-news-mode.el +++ b/lisp/textmodes/emacs-news-mode.el @@ -73,9 +73,11 @@ (defun emacs-news--mode-common () (setq-local font-lock-defaults '(emacs-news-mode-font-lock-keywords t)) - (setq-local outline-regexp "\\(:? +\\)?\\(\\*+\\) " + ;; This `outline-regexp' matches leading spaces inserted + ;; by the current implementation of `outline-minor-mode-use-buttons'. + (setq-local outline-regexp "\\(?: +\\)?\\(\\*+\\) " + outline-level (lambda () (length (match-string 1))) outline-minor-mode-cycle t - outline-level (lambda () (length (match-string 2))) outline-minor-mode-highlight 'append) (outline-minor-mode) (emacs-etc--hide-local-variables)) From e1c4ed9a3e70d4ed7162a77103d034deef428452 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 30 Aug 2022 20:20:40 +0300 Subject: [PATCH 034/915] ; Improve doc string of 'describe-char-fold-equivalences' * lisp/char-fold.el (describe-char-fold-equivalences): Autoload it. Doc fix. --- lisp/char-fold.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lisp/char-fold.el b/lisp/char-fold.el index ce395ddaab0..4e3aa058fcb 100644 --- a/lisp/char-fold.el +++ b/lisp/char-fold.el @@ -428,12 +428,15 @@ BOUND NOERROR COUNT are passed to `re-search-backward'." (re-search-backward (char-fold-to-regexp string) bound noerror count)) +;;;###autoload (defun describe-char-fold-equivalences (char &optional lax) - "Display characters equivalent to CHAR. -Prompt for CHAR. With no input, i.e. when CHAR is nil, by default + "Display characters equivalent to CHAR under character-folding. +Prompt for CHAR (using `read-char-by-name', which see for how can +you specify the character). With no input, i.e. when CHAR is nil, describe all available character equivalences of `char-fold-to-regexp'. -Interactively, a prefix arg means also include partially matching -ligatures." +Optional argument LAX (interactively, the prefix argument), if +non-nil, means also include partially matching ligatures and +non-canonical equivalences." (interactive (list (ignore-errors (read-char-by-name "Character (Unicode name or hex, default all): ")) From 292703d64b95156881a5a4d0ba59902a84d4734c Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 30 Aug 2022 19:35:14 +0200 Subject: [PATCH 035/915] ; * lisp/doc-view.el (doc-view): Fix punctuation. --- lisp/doc-view.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/doc-view.el b/lisp/doc-view.el index 29da3b42977..aa0f9fd3838 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -153,7 +153,7 @@ "In-buffer document viewer. The viewer handles PDF, PostScript, DVI, DJVU, ODF, EPUB, CBZ, FB2, XPS and OXPS files, if the appropriate converter programs -are available (see Info node `(emacs)Document View')" +are available (see Info node `(emacs)Document View')." :link '(function-link doc-view) :version "22.2" :group 'applications From 1feec84b0f9f100547d428315c74a542228667e4 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Tue, 30 Aug 2022 21:31:17 +0200 Subject: [PATCH 036/915] ; Minor doc fix in Viper * lisp/emulation/viper-macs.el (viper-repeat-from-history-key): Minor doc fix. --- lisp/emulation/viper-macs.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lisp/emulation/viper-macs.el b/lisp/emulation/viper-macs.el index 06130afa7da..9c2aae1fe9f 100644 --- a/lisp/emulation/viper-macs.el +++ b/lisp/emulation/viper-macs.el @@ -66,9 +66,8 @@ The previous command is accessible, as usual, via `.'. The command before this can be invoked as ` 1', and the command before that, and the command before that one is accessible as ` 2'. -The notation for these keys is borrowed from XEmacs. Basically, -a key is a symbol, e.g., `a', `\\1', `f2', etc., or a list, e.g., -`(meta control f1)'." +Basically, a key is a symbol, e.g., `a', `\\1', `f2', etc., or a +list, e.g., `(meta control f1)'." :type 'sexp :group 'viper) From 8807a4f53204674a796cb2db73716e09736b548e Mon Sep 17 00:00:00 2001 From: Gregory Heytings Date: Tue, 30 Aug 2022 21:03:01 +0000 Subject: [PATCH 037/915] Enable 256 colors in fbterm. * lisp/term/fbterm.el: New file. * doc/misc/efaq.texi (Emacs in a Linux console): Document the TERM environment variable with which the new file is used. --- doc/misc/efaq.texi | 20 ++++++++++++++++---- lisp/term/fbterm.el | 27 +++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 lisp/term/fbterm.el diff --git a/doc/misc/efaq.texi b/doc/misc/efaq.texi index 2da37a1d215..32fdcb80586 100644 --- a/doc/misc/efaq.texi +++ b/doc/misc/efaq.texi @@ -3047,23 +3047,35 @@ $ fc-list :spacing=mono family | sed 's/ /\\ /g' You can now start Emacs inside @command{fbterm} with the command +@example +$ fbterm -- env TERM=fbterm emacs +@end example + +In some versions of @command{fbterm}, setting @env{TERM} to +@samp{fbterm} can be omitted. To check whether it is needed, start +Emacs inside @command{fbterm} with the command + @example $ fbterm -- emacs @end example +@noindent +and type @kbd{M-x list-colors-display}. If only 8 colors are +displayed, it is necessary; if 256 colors are displayed, it isn't. + You may want to add an alias for that command in your shell configuration file. For example, if you use Bash, you can add the following line to your @file{~/.bashrc} file: @example -alias emacs="fbterm -- emacs" +alias emacs="fbterm -- env TERM=fbterm emacs" @end example @noindent or, if you use Emacs both in the Linux console and under X: @example -[[ "$(tty)" =~ "/dev/tty" ]] && alias emacs="fbterm -- emacs" +[[ "$(tty)" =~ "/dev/tty" ]] && alias emacs="fbterm -- env TERM=fbterm emacs" @end example The @command{fbterm} terminal emulator may define a number of key @@ -3082,7 +3094,7 @@ start Emacs inside @command{fbterm} as root while ensuring that @command{fbterm} does not define any key bindings for its own use: @example -# capsh --drop=cap_sys_tty_config -- -c "fbterm -- emacs" +# capsh --drop=cap_sys_tty_config -- -c "fbterm -- env TERM=fbterm emacs" @end example Again you may want to add a shortcut for that command in the shell @@ -3096,7 +3108,7 @@ you use Bash, you can add the following function in the root user @example function emacs () @{ - CMD="fbterm -- emacs " + CMD="fbterm -- env TERM=fbterm emacs " for ARG in "$@@" do CMD="$CMD '$ARG' " diff --git a/lisp/term/fbterm.el b/lisp/term/fbterm.el new file mode 100644 index 00000000000..ad7150c1a1f --- /dev/null +++ b/lisp/term/fbterm.el @@ -0,0 +1,27 @@ +;;; fbterm.el -*- lexical-binding:t -*- + +;; Copyright (C) 2022 Free Software Foundation, Inc. + +;; Note that, in some versions of fbterm, the TERM environment +;; variable is set to "linux". When that's the case, the code below +;; will not be executed, and only 8 colors will be available. It is +;; therefore necessary, with these versions of fbterm, to set that +;; environment variable to "fbterm" to enable its 256 color mode +;; extension. See also the node "Emacs in a Linux console" of the +;; Emacs FAQ. + +(require 'term/xterm) + +(defun terminal-init-fbterm () + "Terminal initialization function for fbterm." + + ;; fbterm can't display underlines, even though its terminfo data + ;; says it can. + (tty-no-underline) + + ;; fbterm supports xterm's 256 color mode extension. + (xterm-register-default-colors xterm-standard-colors)) + +(provide 'term/fbterm) + +;;; fbterm.el ends here From a28ede3a61a70cf83dfcba6c9d314fbb051a3a94 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Tue, 30 Aug 2022 17:55:03 -0400 Subject: [PATCH 038/915] t-mouse.el: Make sure we apply the setting to new terminals * lisp/t-mouse.el (gpm-mouse-tty-setup): New function. (gpm-mouse-mode): Use it as well as `tty-setup-hook`. * lisp/term/linux.el (terminal-init-linux): Remove gpm-specific code, not neded any more. --- lisp/t-mouse.el | 7 ++++++- lisp/term/linux.el | 2 -- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lisp/t-mouse.el b/lisp/t-mouse.el index cdfc30c8793..7a4e7f330ea 100644 --- a/lisp/t-mouse.el +++ b/lisp/t-mouse.el @@ -62,6 +62,9 @@ (gpm-mouse-stop)) (set-terminal-parameter nil 'gpm-mouse-active nil)) +(defun gpm-mouse-tty-setup () + (if gpm-mouse-mode (gpm-mouse-enable) (gpm-mouse-disable))) + ;;;###autoload (define-minor-mode gpm-mouse-mode "Toggle mouse support in GNU/Linux consoles (GPM Mouse mode). @@ -80,7 +83,9 @@ GPM. This is due to limitations in GPM and the Linux kernel." (terminal-parameter terminal 'gpm-mouse-active)))) ;; Simulate selecting a terminal by selecting one of its frames ;-( (with-selected-frame (car (frames-on-display-list terminal)) - (if gpm-mouse-mode (gpm-mouse-enable) (gpm-mouse-disable)))))) + (gpm-mouse-tty-setup)))) + (when gpm-mouse-mode + (add-hook 'tty-setup-hook #'gpm-mouse-tty-setup))) (provide 't-mouse) diff --git a/lisp/term/linux.el b/lisp/term/linux.el index ab5a6d8698f..60bf91fcf52 100644 --- a/lisp/term/linux.el +++ b/lisp/term/linux.el @@ -15,8 +15,6 @@ ;; Compositions confuse cursor movement. (setq-default auto-composition-mode "linux") - (ignore-errors (when gpm-mouse-mode (require 't-mouse) (gpm-mouse-enable))) - ;; Don't translate ESC TAB to backtab as directed ;; by ncurses-6.3. (define-key input-decode-map "\e\t" nil) From 5bedef8f87d2103e21342a06c4c1c9d7efe06621 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 31 Aug 2022 09:44:13 +0800 Subject: [PATCH 039/915] Fix bug#57476 * src/xterm.c (handle_one_xevent): Don't reset valuators on certain crossing events, for the benefit of xfwm4. (bug#57476) --- src/xterm.c | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index e0a8e13b24e..3c05bc7807d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -20771,8 +20771,20 @@ handle_one_xevent (struct x_display_info *dpyinfo, any = x_any_window_to_frame (dpyinfo, enter->event); #ifdef HAVE_XINPUT2_1 - xi_reset_scroll_valuators_for_device_id (dpyinfo, enter->deviceid, - true); + /* xfwm4 selects for button events on the frame window, + resulting in passive grabs being generated along with + the delivery of emulated button events; this then + interferes with scrolling, since device valuators + will constantly be reset as the crossing events + related to those grabs arrive. The only way to + remedy this is to never reset scroll valuators on a + grab-related crossing event. (bug#57476) */ + if (enter->mode != XINotifyUngrab + && enter->mode != XINotifyGrab + && enter->mode != XINotifyPassiveGrab + && enter->mode != XINotifyPassiveUngrab) + xi_reset_scroll_valuators_for_device_id (dpyinfo, enter->deviceid, + true); #endif { @@ -20888,7 +20900,20 @@ handle_one_xevent (struct x_display_info *dpyinfo, moves out of a frame (and not into one of its children, which we know about). */ #ifdef HAVE_XINPUT2_1 - if (leave->detail != XINotifyInferior && any) + if (leave->detail != XINotifyInferior && any + /* xfwm4 selects for button events on the frame + window, resulting in passive grabs being + generated along with the delivery of emulated + button events; this then interferes with + scrolling, since device valuators will constantly + be reset as the crossing events related to those + grabs arrive. The only way to remedy this is to + never reset scroll valuators on a grab-related + crossing event. (bug#57476) */ + && leave->mode != XINotifyUngrab + && leave->mode != XINotifyGrab + && leave->mode != XINotifyPassiveUngrab + && leave->mode != XINotifyPassiveGrab) xi_reset_scroll_valuators_for_device_id (dpyinfo, leave->deviceid, false); #endif From 136495f178ccd36b23ffc347fe2b6680fd689e34 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Wed, 31 Aug 2022 10:17:20 +0800 Subject: [PATCH 040/915] Gently nudge Xt into always setting size hints * src/widget.c (update_wm_hints): Force a resource to change every time this function is called. (bug#57475) (EmacsFrameInitialize): Initialize new field. * src/widgetprv.h (EmacsFramePart): New field `size_switch'. * src/xterm.c (x_wm_set_size_hint): Don't change flags if flags is 0. --- src/widget.c | 16 ++++++++++------ src/widgetprv.h | 2 ++ src/xterm.c | 7 +++++-- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/src/widget.c b/src/widget.c index b125b4caeed..5a75cdaca8e 100644 --- a/src/widget.c +++ b/src/widget.c @@ -292,18 +292,20 @@ update_wm_hints (Widget wmshell, EmacsFrame ew) base_height = (wmshell->core.height - ew->core.height + (rounded_height - (char_height * ch))); - /* This is kind of sleazy, but I can't see how else to tell it to - make it mark the WM_SIZE_HINTS size as user specified. - */ -/* ((WMShellWidget) wmshell)->wm.size_hints.flags |= USSize;*/ + /* Ensure that Xt actually sets window manager hint flags specified + by the caller by making sure XtNminWidth (a relatively harmless + resource) always changes each time this function is invoked. */ + ew->emacs_frame.size_switch = !ew->emacs_frame.size_switch; XtVaSetValues (wmshell, XtNbaseWidth, (XtArgVal) base_width, XtNbaseHeight, (XtArgVal) base_height, XtNwidthInc, (XtArgVal) (frame_resize_pixelwise ? 1 : cw), XtNheightInc, (XtArgVal) (frame_resize_pixelwise ? 1 : ch), - XtNminWidth, (XtArgVal) base_width, - XtNminHeight, (XtArgVal) base_height, + XtNminWidth, (XtArgVal) (base_width + + ew->emacs_frame.size_switch), + XtNminHeight, (XtArgVal) (base_height + + ew->emacs_frame.size_switch), NULL); } @@ -355,6 +357,8 @@ EmacsFrameInitialize (Widget request, Widget new, exit (1); } + ew->emacs_frame.size_switch = 1; + update_from_various_frame_slots (ew); set_frame_size (ew); } diff --git a/src/widgetprv.h b/src/widgetprv.h index 960f814e16f..fe960326b03 100644 --- a/src/widgetprv.h +++ b/src/widgetprv.h @@ -49,6 +49,8 @@ typedef struct { Boolean visual_bell; /* flash instead of beep */ int bell_volume; /* how loud is beep */ + int size_switch; /* hack to make setting size + hints work correctly */ /* private state */ diff --git a/src/xterm.c b/src/xterm.c index 3c05bc7807d..e8c56d68ea8 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -27484,8 +27484,11 @@ x_wm_set_size_hint (struct frame *f, long flags, bool user_position) eassert (XtIsWMShell (f->output_data.x->widget)); shell = (WMShellWidget) f->output_data.x->widget; - shell->wm.size_hints.flags &= ~(PPosition | USPosition); - shell->wm.size_hints.flags |= flags & (PPosition | USPosition); + if (flags) + { + shell->wm.size_hints.flags &= ~(PPosition | USPosition); + shell->wm.size_hints.flags |= flags & (PPosition | USPosition); + } if (user_position) { From bdcc61247a540699851eb73ea9d4ef3d0a06a92a Mon Sep 17 00:00:00 2001 From: ookami Date: Wed, 31 Aug 2022 12:10:42 +0200 Subject: [PATCH 041/915] Fix semantic-find-file-noselect binding of recentf-exclude * lisp/cedet/semantic/fw.el (semantic-find-file-noselect): recentf-exclude should be a list (bug#57489). Copyright-paperwork-exempt: yes --- lisp/cedet/semantic/fw.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/cedet/semantic/fw.el b/lisp/cedet/semantic/fw.el index 113323cb339..9917c4c5be6 100644 --- a/lisp/cedet/semantic/fw.el +++ b/lisp/cedet/semantic/fw.el @@ -339,7 +339,7 @@ calling this one." "Call `find-file-noselect' with various features turned off. Use this when referencing a file that will be soon deleted. FILE, NOWARN, RAWFILE, and WILDCARDS are passed into `find-file-noselect'." - (let* ((recentf-exclude #'always) + (let* ((recentf-exclude '(always)) ;; This is a brave statement. Don't waste time loading in ;; lots of modes. Especially decoration mode can waste a lot ;; of time for a buffer we intend to kill. From e90d0ea6a9c08e789283e29a7e2505491c8ff80c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 31 Aug 2022 19:15:16 +0300 Subject: [PATCH 042/915] ; Fix the lispref manual about seq.el * doc/lispref/sequences.texi (Sequence Functions): seq.el is preloaded, so no need to load it manually. (Bug#57505) --- doc/lispref/sequences.texi | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/lispref/sequences.texi b/doc/lispref/sequences.texi index 39230d0adc4..1f6f80521c0 100644 --- a/doc/lispref/sequences.texi +++ b/doc/lispref/sequences.texi @@ -446,8 +446,7 @@ useful example of @code{sort}. @cindex seq library @cindex sequences, generalized The @file{seq.el} library provides the following additional sequence -manipulation macros and functions, prefixed with @code{seq-}. To use -them, you must first load the @file{seq} library. +manipulation macros and functions, prefixed with @code{seq-}. All functions defined in this library are free of side-effects; i.e., they do not modify any sequence (list, vector, or string) that From dbfe57472e4b56c8e9b72b1714492bfb0c005213 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Wed, 31 Aug 2022 18:08:49 +0200 Subject: [PATCH 043/915] Fix describe-char-fold-equivalences for composed characters * lisp/char-fold.el (describe-char-fold-equivalences): Map `get-char-code-property' across all the component codepoints of the equivalent character rather than just the first one. --- lisp/char-fold.el | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/lisp/char-fold.el b/lisp/char-fold.el index 4e3aa058fcb..b2002826f73 100644 --- a/lisp/char-fold.el +++ b/lisp/char-fold.el @@ -469,13 +469,18 @@ non-canonical equivalences." (with-help-window (help-buffer) (with-current-buffer standard-output (if char - (insert (mapconcat - (lambda (c) - (format "%s: \?\\N{%s}\n" - c - (or (get-char-code-property (string-to-char c) 'name) - (get-char-code-property (string-to-char c) 'old-name)))) - equivalences)) + (insert + (mapconcat + (lambda (c) + (format "%s: %s\n" + c + (mapconcat + (lambda (ch) + (format "?\\N{%s}" + (or (get-char-code-property ch 'name) + (get-char-code-property ch 'old-name)))) + c))) + equivalences)) (insert "A list of char-fold equivalences for `char-fold-to-regexp':\n\n") (setq-local bidi-paragraph-direction 'left-to-right) (dolist (equiv (nreverse equivalences)) From 71b7ad0cf7dc85b786ba225ff84f842459ba4581 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Wed, 31 Aug 2022 18:46:06 +0000 Subject: [PATCH 044/915] C++ Mode: Fontify functions correctly with commas in template expressions This fixes bug #57318. Also apply an optimization which marks generic expressions as already analyzed, thus avoiding repeating this analysis when not needed. This optimization prevents the fix slowing down scrolling when the C++ source has lots of template structures. * lisp/progmodes/cc-engine.el (top-level) Near the beginning of the file, add a comment describing the new text property c-<>-c-types-set. (c-update-brace-stack): Bind c-restricted-<>-arglists to nil rather than t around the call to c-forward-<>-arglist. (c-forward-<>-arglist-recur): Allow the abbreviated analysis of a generic expression also when the opening < is marked with a c-<>-c-types-set text property. Set this property at the same time as the c-type properties are set on the commas inside the template structure. * lisp/progmodes/cc-fonts.el (c-font-lock-complex-decl-prepare): Clear the c-<>-c-types-set text property, along with c-type, from the region being fontified. --- lisp/progmodes/cc-engine.el | 14 ++++++++++---- lisp/progmodes/cc-fonts.el | 21 ++++++++++----------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index b2d1f15d398..94225d6e3e9 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -142,6 +142,11 @@ ;; Put on the brace which introduces a brace list and on the commas ;; which separate the elements within it. ;; +;; 'c-<>-c-types-set +;; This property is set on an opening angle bracket, and indicates that +;; any "," separators within the template/generic expression have been +;; marked with a 'c-type property value 'c-<>-arg-sep (see above). +;; ;; 'c-awk-NL-prop ;; Used in AWK mode to mark the various kinds of newlines. See ;; cc-awk.el. @@ -6137,7 +6142,7 @@ comment at the start of cc-engine.el for more info." (forward-char)))) (backward-char) (if (let ((c-parse-and-markup-<>-arglists t) - (c-restricted-<>-arglists t)) + c-restricted-<>-arglists) (c-forward-<>-arglist nil)) ; Should always work. (when (> (point) to) (setq bound-<> (point))) @@ -8505,9 +8510,9 @@ multi-line strings (but not C++, for example)." arg-start-pos) ;; If the '<' has paren open syntax then we've marked it as an angle ;; bracket arglist before, so skip to the end. - (if (and (not c-parse-and-markup-<>-arglists) - syntax-table-prop-on-<) - + (if (and syntax-table-prop-on-< + (or (not c-parse-and-markup-<>-arglists) + (c-get-char-property (point) 'c-<>-c-types-set))) (progn (forward-char) (if (and (c-go-up-list-forward) @@ -8604,6 +8609,7 @@ multi-line strings (but not C++, for example)." (c-unmark-<->-as-paren (point))))) (c-mark-<-as-paren start) (c-mark->-as-paren (1- (point))) + (c-put-char-property start 'c-<>-c-types-set t) (c-truncate-lit-pos-cache start)) (setq res t) nil)) ; Exit the loop. diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index 12bb3d37513..f34f7f177db 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -934,17 +934,16 @@ casts and declarations are fontified. Used on level 2 and higher." (save-excursion (let ((pos (point))) (c-backward-syntactic-ws (max (- (point) 500) (point-min))) - (c-clear-char-properties - (if (and (not (bobp)) - (memq (c-get-char-property (1- (point)) 'c-type) - '(c-decl-arg-start - c-decl-end - c-decl-id-start - c-decl-type-start - c-not-decl))) - (1- (point)) - pos) - limit 'c-type))) + (when (and (not (bobp)) + (memq (c-get-char-property (1- (point)) 'c-type) + '(c-decl-arg-start + c-decl-end + c-decl-id-start + c-decl-type-start + c-not-decl))) + (setq pos (1- (point)))) + (c-clear-char-properties pos limit 'c-type) + (c-clear-char-properties pos limit 'c-<>-c-types-set))) ;; Update `c-state-cache' to the beginning of the region. This will ;; make `c-beginning-of-syntax' go faster when it's used later on, From 612ff133b7720de3a551b433eb8705a6a2bbc037 Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Wed, 31 Aug 2022 09:47:43 -0700 Subject: [PATCH 045/915] Don't fail Eshell ERT tests when an internal signal gets raised * test/lisp/eshell/esh-proc-tests.el (esh-proc-test/pipeline-connection-type/middle) (esh-proc-test/pipeline-connection-type/last): Set 'debug-on-error' to nil. Ref: https://lists.gnu.org/archive/html/emacs-devel/2022-08/msg01452.html --- test/lisp/eshell/esh-proc-tests.el | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/test/lisp/eshell/esh-proc-tests.el b/test/lisp/eshell/esh-proc-tests.el index 2369bb5cc00..b9f4470be6b 100644 --- a/test/lisp/eshell/esh-proc-tests.el +++ b/test/lisp/eshell/esh-proc-tests.el @@ -76,17 +76,23 @@ pipeline." (skip-unless (and (executable-find "sh") (executable-find "cat"))) - (eshell-command-result-equal - (concat "echo | " esh-proc-test--detect-pty-cmd " | cat") - nil)) + ;; An `eshell-pipe-broken' signal might occur internally; let Eshell + ;; handle it! + (let ((debug-on-error nil)) + (eshell-command-result-equal + (concat "echo hi | " esh-proc-test--detect-pty-cmd " | cat") + nil))) (ert-deftest esh-proc-test/pipeline-connection-type/last () "Test that only output streams are PTYs when a command ends a pipeline." (skip-unless (executable-find "sh")) - (eshell-command-result-equal - (concat "echo | " esh-proc-test--detect-pty-cmd) - (unless (eq system-type 'windows-nt) - "stdout\nstderr\n"))) + ;; An `eshell-pipe-broken' signal might occur internally; let Eshell + ;; handle it! + (let ((debug-on-error nil)) + (eshell-command-result-equal + (concat "echo hi | " esh-proc-test--detect-pty-cmd) + (unless (eq system-type 'windows-nt) + "stdout\nstderr\n")))) (ert-deftest esh-proc-test/kill-pipeline () "Test that killing a pipeline of processes only emits a single From 2862891387bdb77d8eb514c94587e3b976b03995 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 1 Sep 2022 05:07:06 +0200 Subject: [PATCH 046/915] ; Auto-commit of loaddefs files. --- lisp/ldefs-boot.el | 84 ++++++++++++++++++++++++++++++++++++---------- 1 file changed, 67 insertions(+), 17 deletions(-) diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 07dfc23a092..b870494477c 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -4004,6 +4004,16 @@ FROM is for internal use. It specifies an index in the STRING from which to start. (fn STRING &optional LAX FROM)") +(autoload 'describe-char-fold-equivalences "char-fold" "\ +Display characters equivalent to CHAR under character-folding. +Prompt for CHAR (using `read-char-by-name', which see for how can +you specify the character). With no input, i.e. when CHAR is nil, +describe all available character equivalences of `char-fold-to-regexp'. +Optional argument LAX (interactively, the prefix argument), if +non-nil, means also include partially matching ligatures and +non-canonical equivalences. + +(fn CHAR &optional LAX)" t) (register-definition-prefixes "char-fold" '("char-fold-")) @@ -5020,6 +5030,8 @@ evaluate `compilation-shell-minor-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. +\\{compilation-shell-minor-mode-map} + (fn &optional ARG)" t) (autoload 'compilation-minor-mode "compile" "\ Toggle Compilation minor mode. @@ -5043,6 +5055,8 @@ evaluate `compilation-minor-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. +\\{compilation-minor-mode-map} + (fn &optional ARG)" t) (autoload 'compilation-next-error-function "compile" "\ Advance to the next error message and visit the file where the error was. @@ -7242,6 +7256,7 @@ The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG)" t) +(autoload 'diff-vc-deduce-fileset "diff-mode") (register-definition-prefixes "diff-mode" '("diff-")) @@ -8389,7 +8404,7 @@ A second call of this function without changing point inserts the next match. A call with prefix PREFIX reads the symbol to insert from the minibuffer with completion. -(fn PREFIX)" '("P")) +(fn PREFIX)" t) (autoload 'ebrowse-tags-loop-continue "ebrowse" "\ Repeat last operation on files in tree. FIRST-TIME non-nil means this is not a repetition, but the first time. @@ -9172,8 +9187,7 @@ the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, -evaluate `(buffer-local-value \\='electric-pair-mode -(current-buffer))'. +evaluate `electric-pair-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. @@ -9937,7 +9951,7 @@ When present, ID should be an opaque object used to identify the connection unequivocally. This is rarely needed and not available interactively. -(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) ID)" '((erc-select-read-args))) +(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) ID)" t) (defalias 'erc-select #'erc) (autoload 'erc-tls "erc" "\ ERC is a powerful, modular, and extensible IRC client. @@ -9984,7 +9998,7 @@ symbol composed of letters from the Latin alphabet.) This option is generally unneeded, however. See info node `(erc) Connecting' for use cases. Not available interactively. -(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) CLIENT-CERTIFICATE ID)" '((let ((erc-default-port erc-default-port-tls)) (erc-select-read-args)))) +(fn &key (SERVER (erc-compute-server)) (PORT (erc-compute-port)) (NICK (erc-compute-nick)) (USER (erc-compute-user)) PASSWORD (FULL-NAME (erc-compute-full-name)) CLIENT-CERTIFICATE ID)" t) (autoload 'erc-handle-irc-url "erc" "\ Use ERC to IRC on HOST:PORT in CHANNEL as USER with PASSWORD. If ERC is already connected to HOST:PORT, simply /join CHANNEL. @@ -10200,7 +10214,9 @@ it has to be wrapped in `(eval (quote ...))'. If NAME is already defined as a test and Emacs is running in batch mode, an error is signalled. -(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil 'macro) +(fn NAME () [DOCSTRING] [:expected-result RESULT-TYPE] [:tags \\='(TAG...)] BODY...)" nil t) +(function-put 'ert-deftest 'doc-string-elt 3) +(function-put 'ert-deftest 'lisp-indent-function 2) (autoload 'ert-run-tests-batch "ert" "\ Run the tests specified by SELECTOR, printing results to the terminal. @@ -12271,6 +12287,8 @@ evaluate `flymake-mode'. The mode's hook is called both when the mode is enabled and when it is disabled. +\\{flymake-mode-map} + (fn &optional ARG)" t) (autoload 'flymake-mode-on "flymake" "\ Turn Flymake mode on.") @@ -14186,7 +14204,9 @@ include it when specifying `grep-command'. In interactive usage, the actual value of this variable is set up by `grep-compute-defaults'; to change the default value, use -\\[customize] or call the function `grep-apply-setting'.") +\\[customize] or call the function `grep-apply-setting'. + +Also see `grep-command-position'.") (custom-autoload 'grep-command "grep" nil) (defvar grep-find-command nil "\ The default find command for \\[grep-find]. @@ -15394,7 +15414,9 @@ it is disabled. (defvar hs-special-modes-alist (mapcar 'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil) (mhtml-mode "{\\|<[^/>]*?" "}\\|]*[^/]>" " + +

+Updated: + +$Date: %s $ + +

+ +" + copyright-years + ;; e.g. "2022/09/13 09:13:13" + (format-time-string "%Y/%M/%y %H:%m:%S")))) + ;; Actually export. + (org-html-export-to-html) + ;; Kill the .org buffer. + (kill-buffer (current-buffer)) + ;; Move file into place. + (let ((old (expand-file-name html-file dir)) + (new (expand-file-name html-file (expand-file-name "etc" root)))) + (delete-file new) + (copy-file old new) + (find-file new)))) + (delete-directory dir t)))) + ;; Stuff to check new `defcustom's got :version tags. ;; Adapted from check-declare.el. From b525f201ba9f4f8862059a49947874a2bfa0d2f1 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Wed, 14 Sep 2022 20:21:54 +0200 Subject: [PATCH 364/915] Allow specifying the color to use in image-elide * lisp/image/image-crop.el (image-crop-elide-command): Adjust to allow specifying the color. (image-elide): Prompt for a color. (image-crop--crop-image-update): Pass the color along. --- lisp/image/image-crop.el | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/lisp/image/image-crop.el b/lisp/image/image-crop.el index a88b8ed842e..64db226d50e 100644 --- a/lisp/image/image-crop.el +++ b/lisp/image/image-crop.el @@ -48,7 +48,8 @@ The following `format-spec' elements are allowed: :version "29.1") (defcustom image-crop-elide-command '("convert" "-draw" "rectangle %l,%t %r,%b" - "-" "%f:-") + "-fill" "%c" + "-" "%f:-") "Command to make a rectangle inside an image. The following `format-spec' elements are allowed: @@ -56,12 +57,13 @@ The following `format-spec' elements are allowed: %t: Top. %r: Right. %b: Bottom. +%c: Color. %f: Result file type." :type '(repeat string) :version "29.1") (defcustom image-crop-crop-command '("convert" "+repage" "-crop" "%wx%h+%l+%t" - "-" "%f:-") + "-" "%f:-") "Command to crop an image. The following `format-spec' elements are allowed: @@ -97,12 +99,17 @@ original buffer text, and the second parameter is the cropped image data.") ;;;###autoload -(defun image-elide (&optional square) +(defun image-elide (color &optional square) "Elide a square from the image under point. If SQUARE (interactively, the prefix), elide a square instead of a -rectangle from the image." - (interactive "P") - (image-crop square t)) +rectangle from the image. + +Interatively, the user will be prompted for the color to use, and +defaults to black." + (interactive (list (read-color "Use color: ") + current-prefix-arg)) + (image-crop square (if (string-empty-p color) + "black" color))) ;;;###autoload (defun image-crop (&optional square elide) @@ -111,7 +118,8 @@ If SQUARE (interactively, the prefix), crop a square instead of a rectangle from the image. If ELIDE, remove a rectangle from the image instead of cropping -the image. +the image. In that case ELIDE, should be the name of a color to +use. After cropping an image, it can be saved by `M-x image-save' or \\\\[image-save] when point is over the image." @@ -217,6 +225,7 @@ After cropping an image, it can be saved by `M-x image-save' or (?t . ,top) (?r . ,(+ left width)) (?b . ,(+ top height)) + (?c . ,elide) (?f . ,(cadr (split-string type "/"))))) (image-crop--process image-crop-crop-command `((?l . ,left) From 7e6923017163561d1b8cedf15aac42e01e493aee Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 14 Sep 2022 21:37:50 +0300 Subject: [PATCH 365/915] ; * lisp/image/image-crop.el (image-elide, image-crop): Doc fixes. --- lisp/image/image-crop.el | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lisp/image/image-crop.el b/lisp/image/image-crop.el index 64db226d50e..7716efcd543 100644 --- a/lisp/image/image-crop.el +++ b/lisp/image/image-crop.el @@ -100,12 +100,11 @@ image data.") ;;;###autoload (defun image-elide (color &optional square) - "Elide a square from the image under point. -If SQUARE (interactively, the prefix), elide a square instead of a -rectangle from the image. + "Elide a rectangle from the image under point, filling it with COLOR. +If SQUARE is non-nil (interactively, prefix arg), elide a square +instead of a rectangle from the image. -Interatively, the user will be prompted for the color to use, and -defaults to black." +Interactively, prompt for COLOR to use, defaulting to black." (interactive (list (read-color "Use color: ") current-prefix-arg)) (image-crop square (if (string-empty-p color) @@ -114,14 +113,14 @@ defaults to black." ;;;###autoload (defun image-crop (&optional square elide) "Crop the image under point. -If SQUARE (interactively, the prefix), crop a square instead of a -rectangle from the image. +If SQUARE is non-nil (interactively, prefix arg), crop a square +instead of a rectangle from the image. -If ELIDE, remove a rectangle from the image instead of cropping -the image. In that case ELIDE, should be the name of a color to -use. +If ELIDE is non-nil, remove a rectangle/square from the image +instead of cropping the image. In that case ELIDE should be +the name of a color to fill the rectangle. -After cropping an image, it can be saved by `M-x image-save' or +After cropping an image, you can save it by `M-x image-save' or \\\\[image-save] when point is over the image." (interactive "P") (unless (image-type-available-p 'svg) From 05971d2b8d47e69e9585d0d6066b8a607555aa48 Mon Sep 17 00:00:00 2001 From: Augusto Stoffel Date: Wed, 14 Sep 2022 20:11:28 +0200 Subject: [PATCH 366/915] ; * src/emacs.c (usage_message): Remove stray tabs. --- src/emacs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emacs.c b/src/emacs.c index 3c768412818..91bf0a9b59e 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -299,7 +299,7 @@ Initialization options:\n\ -x to be used in #!/usr/bin/emacs -x\n\ and has approximately the same meaning\n\ as -Q --script\n\ ---terminal, -t DEVICE use DEVICE for terminal I/O\n \ +--terminal, -t DEVICE use DEVICE for terminal I/O\n\ --user, -u USER load ~USER/.emacs instead of your own\n\ \n\ ", From a9941269683fe50673d0aa81feefb7a9d3d8a6b9 Mon Sep 17 00:00:00 2001 From: Augusto Stoffel Date: Thu, 8 Sep 2022 11:09:42 +0200 Subject: [PATCH 367/915] pcomplete: Generate completions from --help messages * lisp/pcomplete.el (pcomplete-from-help): New function (and hash table) to get pcomplete candidates from help messages. (pcomplete-here-using-help): Helper function to define pcomplete for simple commands (pcomplete-completions-at-point): Provide annotation-function and company-docsig properties. * lisp/pcmpl-git.el: New file, provides pcomplete for Git. * lisp/pcmpl-gnu.el: Add pcomplete for awk, gpg and gdb, emacs and emacsclient. * lisp/pcmpl-linux.el: Add pcomplete for systemctl and journalctl. * lisp/pcmpl-rpm.el: Add pcomplete for dnf. * lisp/pcmpl-unix.el: Add pcomplete for sudo and most commands found in GNU Coreutils. * lisp/pcmpl-x.el: Add pcomplete for tex, pdftex, latex, pdflatex, rigrep and rclone. * test/lisp/pcomplete-tests.el (pcomplete-test-parse-gpg-help, pcomplete-test-parse-git-help): Tests for the new functions. --- lisp/pcmpl-git.el | 110 ++++++++ lisp/pcmpl-gnu.el | 36 ++- lisp/pcmpl-linux.el | 68 +++++ lisp/pcmpl-rpm.el | 43 ++- lisp/pcmpl-unix.el | 490 +++++++++++++++++++++++++++++++++-- lisp/pcmpl-x.el | 43 +++ lisp/pcomplete.el | 138 ++++++++++ test/lisp/pcomplete-tests.el | 100 +++++++ 8 files changed, 1004 insertions(+), 24 deletions(-) create mode 100644 lisp/pcmpl-git.el create mode 100644 test/lisp/pcomplete-tests.el diff --git a/lisp/pcmpl-git.el b/lisp/pcmpl-git.el new file mode 100644 index 00000000000..3584fa06732 --- /dev/null +++ b/lisp/pcmpl-git.el @@ -0,0 +1,110 @@ +;;; pcmpl-git.el --- Completions for Git -*- lexical-binding: t -*- + +;; Copyright (C) 2022 Free Software Foundation, Inc. + +;; Package: pcomplete + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;; This library provides completion rules for the Git program. + +;;; Code: + +(require 'pcomplete) +(require 'vc-git) + +(defun pcmpl-git--expand-flags (args) + "In the list of ARGS, expand arguments of the form --[no-]flag." + (mapcan (lambda (arg) (if (string-search "[no-]" arg) + (list (string-replace "[no-]" "" arg) + (string-replace "[no-]" "no-" arg)) + (list arg))) + args)) + +(defun pcmpl-git--tracked-file-predicate (&rest args) + "Return a predicate function determining the Git status of a file. +Files listed by `git ls-files ARGS' satisfy the predicate." + (when-let ((files (mapcar #'expand-file-name + (ignore-errors + (apply #'process-lines + vc-git-program "ls-files" args))))) + (lambda (file) + (setq file (expand-file-name file)) + (if (string-suffix-p "/" file) + (seq-some (lambda (f) (string-prefix-p file f)) + files) + (member file files))))) + +(defun pcmpl-git--remote-refs (remote) + "List the locally known Git revisions from REMOTE." + (delq nil + (mapcar + (let ((re (concat "\\`" (regexp-quote remote) "/\\(.*\\)"))) + (lambda (s) (when (string-match re s) (match-string 1 s)))) + (vc-git-revision-table nil)))) + +;;;###autoload +(defun pcomplete/git () + "Completion for the `git' command." + (let ((subcommands (pcomplete-from-help `(,vc-git-program "help" "-a") + :margin "^\\( +\\)[a-z]" + :argument "[[:alnum:]-]+"))) + (while (not (member (pcomplete-arg 1) subcommands)) + (if (string-prefix-p "-" (pcomplete-arg)) + (pcomplete-here (pcomplete-from-help `(,vc-git-program "help") + :margin "\\(\\[\\)-" + :separator " | " + :description "\\`")) + (pcomplete-here (completion-table-merge + subcommands + (when (string-prefix-p "-" (pcomplete-arg 1)) + (pcomplete-entries)))))) + (let ((subcmd (pcomplete-arg 1))) + (while (pcase subcmd + ((guard (string-prefix-p "-" (pcomplete-arg))) + (pcomplete-here + (pcmpl-git--expand-flags + (pcomplete-from-help `(,vc-git-program "help" ,subcmd) + :argument + "-+\\(?:\\[no-\\]\\)?[a-z-]+=?")))) + ;; Complete modified tracked files + ((or "add" "commit" "restore") + (pcomplete-here + (pcomplete-entries + nil (pcmpl-git--tracked-file-predicate "-m")))) + ;; Complete all tracked files + ((or "mv" "rm" "grep" "status") + (pcomplete-here + (pcomplete-entries nil (pcmpl-git--tracked-file-predicate)))) + ;; Complete revisions + ((or "branch" "merge" "rebase" "switch") + (pcomplete-here (vc-git-revision-table nil))) + ;; Complete revisions and tracked files + ;; TODO: diff and log accept revision ranges + ((or "checkout" "reset" "show" "diff" "log") + (pcomplete-here + (completion-table-in-turn + (vc-git-revision-table nil) + (pcomplete-entries nil (pcmpl-git--tracked-file-predicate))))) + ;; Complete remotes and their revisions + ((or "fetch" "pull" "push") + (pcomplete-here (process-lines vc-git-program "remote")) + (pcomplete-here (pcmpl-git--remote-refs (pcomplete-arg 1))))))))) + +(provide 'pcmpl-git) +;;; pcmpl-git.el ends here diff --git a/lisp/pcmpl-gnu.el b/lisp/pcmpl-gnu.el index 3c9bf1ec9d2..cdfde5640a7 100644 --- a/lisp/pcmpl-gnu.el +++ b/lisp/pcmpl-gnu.el @@ -394,6 +394,40 @@ Return the new list." (while (pcomplete-here (pcomplete-dirs) nil #'identity)))) ;;;###autoload -(defalias 'pcomplete/gdb 'pcomplete/xargs) +(defun pcomplete/awk () + "Completion for the `awk' command." + (pcomplete-here-using-help "awk --help" + :margin "\t" + :separator " +" + :description "\0" + :metavar "[=a-z]+")) + +;;;###autoload +(defun pcomplete/gpg () + "Completion for the `gpg` command." + (pcomplete-here-using-help "gpg --help" :narrow-end "^ -se")) + +;;;###autoload +(defun pcomplete/gdb () + "Completion for the `gdb' command." + (while + (cond + ((string= "--args" (pcomplete-arg 1)) + (funcall pcomplete-command-completion-function) + (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1)) + pcomplete-default-completion-function))) + ((string-prefix-p "-" (pcomplete-arg 0)) + (pcomplete-here (pcomplete-from-help "gdb --help"))) + (t (pcomplete-here (pcomplete-entries)))))) + +;;;###autoload +(defun pcomplete/emacs () + "Completion for the `emacs' command." + (pcomplete-here-using-help "emacs --help" :margin "^\\(\\)-")) + +;;;###autoload +(defun pcomplete/emacsclient () + "Completion for the `emacsclient' command." + (pcomplete-here-using-help "emacsclient --help" :margin "^\\(\\)-")) ;;; pcmpl-gnu.el ends here diff --git a/lisp/pcmpl-linux.el b/lisp/pcmpl-linux.el index 7c072f3d40c..023c655a2a8 100644 --- a/lisp/pcmpl-linux.el +++ b/lisp/pcmpl-linux.el @@ -30,6 +30,7 @@ (provide 'pcmpl-linux) (require 'pcomplete) +(eval-when-compile (require 'rx)) ;; Functions: @@ -111,4 +112,71 @@ Test is done using `equal'." (pcomplete-uniquify-list points) (cons "swap" (pcmpl-linux-mounted-directories)))))) +;;; systemd + +(defun pcmpl-linux--systemd-units (&rest args) + "Run `systemd list-units ARGS' and return the output as a list." + (with-temp-buffer + (apply #'call-process + "systemctl" nil '(t nil) nil + "list-units" "--full" "--legend=no" "--plain" args) + (goto-char (point-min)) + (let (result) + (while (re-search-forward (rx bol (group (+ (not space))) + (+ space) (+ (not space)) + (+ space) (group (+ (not space))) + (+ space) (+ (not space)) + (+ space) (group (* nonl))) + nil t) + (push (match-string 1) result) + (put-text-property 0 1 'pcomplete-annotation + (concat " " (match-string 2)) + (car result)) + (put-text-property 0 1 'pcomplete-description + (match-string 3) + (car result))) + (nreverse result)))) + +;;;###autoload +(defun pcomplete/systemctl () + "Completion for the `systemctl' command." + (let ((subcmds (pcomplete-from-help + "systemctl --help" + :margin (rx bol " " (group) alpha) + :argument (rx (+ (any alpha ?-))) + :metavar (rx (group (+ " " (>= 2 (any upper "[]|.")))))))) + (while (not (member (pcomplete-arg 1) subcmds)) + (if (string-prefix-p "-" (pcomplete-arg 0)) + (pcomplete-here (pcomplete-from-help "systemctl --help" + :metavar "[^ ]+" + :separator " \\(\\)-")) + (pcomplete-here subcmds))) + (let ((subcmd (pcomplete-arg 1)) + (context (if (member "--user" pcomplete-args) "--user" "--system"))) + (while (pcase subcmd + ((guard (string-prefix-p "-" (pcomplete-arg 0))) + (pcomplete-here + (pcomplete-from-help "systemctl --help"))) + ;; TODO: suggest only relevant units to each subcommand + ("start" + (pcomplete-here + (pcmpl-linux--systemd-units context "--state" "inactive,failed"))) + ((or "restart" "stop") + (pcomplete-here + (pcmpl-linux--systemd-units context "--state" "active"))) + (_ (pcomplete-here + (completion-table-in-turn + (pcmpl-linux--systemd-units context "--all") + (pcomplete-entries))))))))) + +;;;###autoload +(defun pcomplete/journalctl () + "Completion for the `journalctl' command." + (while (if (string-prefix-p "-" (pcomplete-arg 0)) + (pcomplete-here (pcomplete-from-help "journalctl --help" + :metavar "[^ ]+" + :separator " \\(\\)-")) + (pcomplete-here (mapcar (lambda (s) (concat s "=")) + (process-lines "journalctl" "--fields")))))) + ;;; pcmpl-linux.el ends here diff --git a/lisp/pcmpl-rpm.el b/lisp/pcmpl-rpm.el index f7925d9d9ec..ebb6b72600c 100644 --- a/lisp/pcmpl-rpm.el +++ b/lisp/pcmpl-rpm.el @@ -21,7 +21,8 @@ ;;; Commentary: -;; These functions provide completion rules for the `rpm' command. +;; These functions provide completion rules for the `rpm' command and +;; related tools. ;;; Code: @@ -378,6 +379,46 @@ (t (error "You must select a mode: -q, -i, -U, --verify, etc")))))) +;;; DNF + +(defvar pcmpl-rpm-dnf-cache-file "/var/cache/dnf/packages.db" + "Location of the DNF cache.") + +(defun pcmpl-rpm--dnf-packages (status) + (when (and (file-exists-p pcmpl-rpm-dnf-cache-file) + (executable-find "sqlite3")) + (with-temp-message + "Getting list of packages..." + (process-lines "sqlite3" "-batch" "-init" "/dev/null" + pcmpl-rpm-dnf-cache-file + (pcase-exhaustive status + ('available "select pkg from available") + ('installed "select pkg from installed") + ('not-installed "\ +select pkg from available where pkg not in (select pkg from installed)")))))) + +;;;###autoload +(defun pcomplete/dnf () + "Completion for the `dnf' command." + (let ((subcmds (pcomplete-from-help "dnf help" + :margin "^\\(\\)[a-z-]+ " + :argument "[a-z-]+"))) + (while (not (member (pcomplete-arg 1) subcmds)) + (pcomplete-here (completion-table-merge + subcmds + (pcomplete-from-help "dnf help")))) + (let ((subcmd (pcomplete-arg 1))) + (while (pcase subcmd + ((guard (pcomplete-match "\\`-" 0)) + (pcomplete-here + (pcomplete-from-help `("dnf" "help" ,subcmd)))) + ((or "downgrade" "reinstall" "remove") + (pcomplete-here (pcmpl-rpm--dnf-packages 'installed))) + ((or "install" "mark" "reinstall" "upgrade") + (pcomplete-here (pcmpl-rpm--dnf-packages 'not-installed))) + ((or "builddep" "changelog" "info" "list" "repoquery" "updateinfo") + (pcomplete-here (pcmpl-rpm--dnf-packages 'available)))))))) + (provide 'pcmpl-rpm) ;;; pcmpl-rpm.el ends here diff --git a/lisp/pcmpl-unix.el b/lisp/pcmpl-unix.el index 8774f091c83..0c32f814d0e 100644 --- a/lisp/pcmpl-unix.el +++ b/lisp/pcmpl-unix.el @@ -25,7 +25,7 @@ (require 'pcomplete) -;; User Variables: +;;; User Variables (defcustom pcmpl-unix-group-file "/etc/group" "If non-nil, a string naming the group file on your system." @@ -56,7 +56,7 @@ being via `pcmpl-ssh-known-hosts-file'." :group 'pcmpl-unix :version "24.1") -;; Functions: +;;; Shell builtins and core utilities ;;;###autoload (defun pcomplete/cd () @@ -69,34 +69,38 @@ being via `pcmpl-ssh-known-hosts-file'." ;;;###autoload (defun pcomplete/rmdir () "Completion for `rmdir'." - (while (pcomplete-here (pcomplete-dirs)))) + (while (if (string-prefix-p "-" (pcomplete-arg)) + (pcomplete-here (pcomplete-from-help "rmdir --help")) + (pcomplete-here (pcomplete-dirs))))) ;;;###autoload (defun pcomplete/rm () - "Completion for `rm'." - (let ((pcomplete-help "(fileutils)rm invocation")) - (pcomplete-opt "dfirRv") - (while (pcomplete-here (pcomplete-all-entries) nil - #'expand-file-name)))) + "Completion for the `rm' command." + (pcomplete-here-using-help "rm --help")) ;;;###autoload (defun pcomplete/xargs () "Completion for `xargs'." (while (string-prefix-p "-" (pcomplete-arg 0)) - (pcomplete-here (funcall pcomplete-default-completion-function))) + (pcomplete-here (pcomplete-from-help "xargs --help")) + (when (pcomplete-match "\\`-[adEIiLnPs]\\'") (pcomplete-here))) (funcall pcomplete-command-completion-function) (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1)) pcomplete-default-completion-function))) -;; FIXME: Add completion of sudo-specific arguments. -(defalias 'pcomplete/sudo #'pcomplete/xargs) - ;;;###autoload -(defalias 'pcomplete/time 'pcomplete/xargs) +(defun pcomplete/time () + "Completion for the `time' command." + (pcomplete-opt "p") + (funcall pcomplete-command-completion-function) + (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1)) + pcomplete-default-completion-function))) ;;;###autoload (defun pcomplete/which () "Completion for `which'." + (while (string-prefix-p "-" (pcomplete-arg 0)) + (pcomplete-here (pcomplete-from-help "which --help"))) (while (pcomplete-here (funcall pcomplete-command-completion-function)))) (defun pcmpl-unix-read-passwd-file (file) @@ -128,25 +132,455 @@ documentation), this function returns nil." (if pcmpl-unix-passwd-file (pcmpl-unix-read-passwd-file pcmpl-unix-passwd-file))) +;;;###autoload +(defun pcomplete/cat () + "Completion for the `cat' command." + (pcomplete-here-using-help "cat --help")) + +;;;###autoload +(defun pcomplete/tac () + "Completion for the `tac' command." + (pcomplete-here-using-help "tac --help")) + +;;;###autoload +(defun pcomplete/nl () + "Completion for the `nl' command." + (pcomplete-here-using-help "nl --help")) + +;;;###autoload +(defun pcomplete/od () + "Completion for the `od' command." + (pcomplete-here-using-help "od --help")) + +;;;###autoload +(defun pcomplete/base32 () + "Completion for the `base32' and `base64' commands." + (pcomplete-here-using-help "base32 --help")) +;;;###autoload +(defalias 'pcomplete/base64 'pcomplete/base32) + +;;;###autoload +(defun pcomplete/basenc () + "Completion for the `basenc' command." + (pcomplete-here-using-help "basenc --help")) + +;;;###autoload +(defun pcomplete/fmt () + "Completion for the `fmt' command." + (pcomplete-here-using-help "fmt --help")) + +;;;###autoload +(defun pcomplete/pr () + "Completion for the `pr' command." + (pcomplete-here-using-help "pr --help")) + +;;;###autoload +(defun pcomplete/fold () + "Completion for the `fold' command." + (pcomplete-here-using-help "fold --help")) + +;;;###autoload +(defun pcomplete/head () + "Completion for the `head' command." + (pcomplete-here-using-help "head --help")) + +;;;###autoload +(defun pcomplete/tail () + "Completion for the `tail' command." + (pcomplete-here-using-help "tail --help")) + +;;;###autoload +(defun pcomplete/split () + "Completion for the `split' command." + (pcomplete-here-using-help "split --help")) + +;;;###autoload +(defun pcomplete/csplit () + "Completion for the `csplit' command." + (pcomplete-here-using-help "csplit --help")) + +;;;###autoload +(defun pcomplete/wc () + "Completion for the `wc' command." + (pcomplete-here-using-help "wc --help")) + +;;;###autoload +(defun pcomplete/sum () + "Completion for the `sum' command." + (pcomplete-here-using-help "sum --help")) + +;;;###autoload +(defun pcomplete/cksum () + "Completion for the `cksum' command." + (pcomplete-here-using-help "cksum --help")) + +;;;###autoload +(defun pcomplete/b2sum () + "Completion for the `b2sum' command." + (pcomplete-here-using-help "b2sum --help")) + +;;;###autoload +(defun pcomplete/md5sum () + "Completion for checksum commands." + (pcomplete-here-using-help "md5sum --help")) +;;;###autoload(defalias 'pcomplete/sha1sum 'pcomplete/md5sum) +;;;###autoload(defalias 'pcomplete/sha224sum 'pcomplete/md5sum) +;;;###autoload(defalias 'pcomplete/sha256sum 'pcomplete/md5sum) +;;;###autoload(defalias 'pcomplete/sha384sum 'pcomplete/md5sum) +;;;###autoload(defalias 'pcomplete/sha521sum 'pcomplete/md5sum) + +;;;###autoload +(defun pcomplete/sort () + "Completion for the `sort' command." + (pcomplete-here-using-help "sort --help")) + +;;;###autoload +(defun pcomplete/shuf () + "Completion for the `shuf' command." + (pcomplete-here-using-help "shuf --help")) + +;;;###autoload +(defun pcomplete/uniq () + "Completion for the `uniq' command." + (pcomplete-here-using-help "uniq --help")) + +;;;###autoload +(defun pcomplete/comm () + "Completion for the `comm' command." + (pcomplete-here-using-help "comm --help")) + +;;;###autoload +(defun pcomplete/ptx () + "Completion for the `ptx' command." + (pcomplete-here-using-help "ptx --help")) + +;;;###autoload +(defun pcomplete/tsort () + "Completion for the `tsort' command." + (pcomplete-here-using-help "tsort --help")) + +;;;###autoload +(defun pcomplete/cut () + "Completion for the `cut' command." + (pcomplete-here-using-help "cut --help")) + +;;;###autoload +(defun pcomplete/paste () + "Completion for the `paste' command." + (pcomplete-here-using-help "paste --help")) + +;;;###autoload +(defun pcomplete/join () + "Completion for the `join' command." + (pcomplete-here-using-help "join --help")) + +;;;###autoload +(defun pcomplete/tr () + "Completion for the `tr' command." + (pcomplete-here-using-help "tr --help")) + +;;;###autoload +(defun pcomplete/expand () + "Completion for the `expand' command." + (pcomplete-here-using-help "expand --help")) + +;;;###autoload +(defun pcomplete/unexpand () + "Completion for the `unexpand' command." + (pcomplete-here-using-help "unexpand --help")) + +;;;###autoload +(defun pcomplete/ls () + "Completion for the `ls' command." + (pcomplete-here-using-help "ls --help")) +;;;###autoload(defalias 'pcomplete/dir 'pcomplete/ls) +;;;###autoload(defalias 'pcomplete/vdir 'pcomplete/ls) + +;;;###autoload +(defun pcomplete/cp () + "Completion for the `cp' command." + (pcomplete-here-using-help "cp --help")) + +;;;###autoload +(defun pcomplete/dd () + "Completion for the `dd' command." + (let ((operands (pcomplete-from-help "dd --help" + :argument "[a-z]+=" + :narrow-start "\n\n" + :narrow-end "\n\n"))) + (while + (cond ((pcomplete-match "\\`[io]f=\\(.*\\)" 0) + (pcomplete-here (pcomplete-entries) + (pcomplete-match-string 1 0))) + (t (pcomplete-here operands)))))) + +;;;###autoload +(defun pcomplete/install () + "Completion for the `install' command." + (pcomplete-here-using-help "install --help")) + +;;;###autoload +(defun pcomplete/mv () + "Completion for the `mv' command." + (pcomplete-here-using-help "mv --help")) + +;;;###autoload +(defun pcomplete/shred () + "Completion for the `shred' command." + (pcomplete-here-using-help "shred --help")) + +;;;###autoload +(defun pcomplete/ln () + "Completion for the `ln' command." + (pcomplete-here-using-help "ln --help")) + +;;;###autoload +(defun pcomplete/mkdir () + "Completion for the `mkdir' command." + (pcomplete-here-using-help "mkdir --help")) + +;;;###autoload +(defun pcomplete/mkfifo () + "Completion for the `mkfifo' command." + (pcomplete-here-using-help "mkfifo --help")) + +;;;###autoload +(defun pcomplete/mknod () + "Completion for the `mknod' command." + (pcomplete-here-using-help "mknod --help")) + +;;;###autoload +(defun pcomplete/readlink () + "Completion for the `readlink' command." + (pcomplete-here-using-help "readlink --help")) + ;;;###autoload (defun pcomplete/chown () "Completion for the `chown' command." - (unless (pcomplete-match "\\`-") - (if (pcomplete-match "\\`[^.]*\\'" 0) - (pcomplete-here* (pcmpl-unix-user-names)) - (if (pcomplete-match "\\.\\([^.]*\\)\\'" 0) - (pcomplete-here* (pcmpl-unix-group-names) - (pcomplete-match-string 1 0)) - (pcomplete-here*)))) + (while (pcomplete-match "\\`-" 0) + (pcomplete-here (pcomplete-from-help "chown --help"))) + (if (pcomplete-match "\\`[^.]*\\'" 0) + (pcomplete-here* (pcmpl-unix-user-names)) + (if (pcomplete-match "\\.\\([^.]*\\)\\'" 0) + (pcomplete-here* (pcmpl-unix-group-names) + (pcomplete-match-string 1 0)) + (pcomplete-here*))) (while (pcomplete-here (pcomplete-entries)))) ;;;###autoload (defun pcomplete/chgrp () "Completion for the `chgrp' command." - (unless (pcomplete-match "\\`-") - (pcomplete-here* (pcmpl-unix-group-names))) + (while (pcomplete-match "\\`-" 0) + (pcomplete-here (pcomplete-from-help "chgrp --help"))) + (pcomplete-here* (pcmpl-unix-group-names)) (while (pcomplete-here (pcomplete-entries)))) +;;;###autoload +(defun pcomplete/chmod () + "Completion for the `chmod' command." + (pcomplete-here-using-help "chmod --help")) + +;;;###autoload +(defun pcomplete/touch () + "Completion for the `touch' command." + (pcomplete-here-using-help "touch --help")) + +;;;###autoload +(defun pcomplete/df () + "Completion for the `df' command." + (pcomplete-here-using-help "df --help")) + +;;;###autoload +(defun pcomplete/du () + "Completion for the `du' command." + (pcomplete-here-using-help "du --help")) + +;;;###autoload +(defun pcomplete/stat () + "Completion for the `stat' command." + (pcomplete-here-using-help "stat --help")) + +;;;###autoload +(defun pcomplete/sync () + "Completion for the `sync' command." + (pcomplete-here-using-help "sync --help")) + +;;;###autoload +(defun pcomplete/truncate () + "Completion for the `truncate' command." + (pcomplete-here-using-help "truncate --help")) + +;;;###autoload +(defun pcomplete/echo () + "Completion for the `echo' command." + (pcomplete-here-using-help '("echo" "--help"))) + +;;;###autoload +(defun pcomplete/test () + "Completion for the `test' command." + (pcomplete-here-using-help '("[" "--help") + :margin "^ +\\([A-Z]+1 \\)?")) +;;;###autoload(defalias (intern "pcomplete/[") 'pcomplete/test) + +;;;###autoload +(defun pcomplete/tee () + "Completion for the `tee' command." + (pcomplete-here-using-help "tee --help")) + +;;;###autoload +(defun pcomplete/basename () + "Completion for the `basename' command." + (pcomplete-here-using-help "basename --help")) + +;;;###autoload +(defun pcomplete/dirname () + "Completion for the `dirname' command." + (pcomplete-here-using-help "dirname --help")) + +;;;###autoload +(defun pcomplete/pathchk () + "Completion for the `pathchk' command." + (pcomplete-here-using-help "pathchk --help")) + +;;;###autoload +(defun pcomplete/mktemp () + "Completion for the `mktemp' command." + (pcomplete-here-using-help "mktemp --help")) + +;;;###autoload +(defun pcomplete/realpath () + "Completion for the `realpath' command." + (pcomplete-here-using-help "realpath --help")) + +;;;###autoload +(defun pcomplete/id () + "Completion for the `id' command." + (while (string-prefix-p "-" (pcomplete-arg 0)) + (pcomplete-here (pcomplete-from-help "id --help"))) + (while (pcomplete-here (pcmpl-unix-user-names)))) + +;;;###autoload +(defun pcomplete/groups () + "Completion for the `groups' command." + (while (pcomplete-here (pcmpl-unix-user-names)))) + +;;;###autoload +(defun pcomplete/who () + "Completion for the `who' command." + (pcomplete-here-using-help "who --help")) + +;;;###autoload +(defun pcomplete/date () + "Completion for the `date' command." + (pcomplete-here-using-help "date --help")) + +;;;###autoload +(defun pcomplete/nproc () + "Completion for the `nproc' command." + (pcomplete-here-using-help "nproc --help")) + +;;;###autoload +(defun pcomplete/uname () + "Completion for the `uname' command." + (pcomplete-here-using-help "uname --help")) + +;;;###autoload +(defun pcomplete/hostname () + "Completion for the `hostname' command." + (pcomplete-here-using-help "hostname --help")) + +;;;###autoload +(defun pcomplete/uptime () + "Completion for the `uptime' command." + (pcomplete-here-using-help "uptime --help")) + +;;;###autoload +(defun pcomplete/chcon () + "Completion for the `chcon' command." + (pcomplete-here-using-help "chcon --help")) + +;;;###autoload +(defun pcomplete/runcon () + "Completion for the `runcon' command." + (while (string-prefix-p "-" (pcomplete-arg 0)) + (pcomplete-here (pcomplete-from-help "runcon --help")) + (when (pcomplete-match "\\`-[turl]\\'" 0) (pcomplete-here))) + (funcall pcomplete-command-completion-function) + (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1)) + pcomplete-default-completion-function))) + +;;;###autoload +(defun pcomplete/chroot () + "Completion for the `chroot' command." + (while (string-prefix-p "-" (pcomplete-arg 0)) + (pcomplete-here (pcomplete-from-help "chroot --help"))) + (pcomplete-here (pcomplete-dirs)) + (funcall pcomplete-command-completion-function) + (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1)) + pcomplete-default-completion-function))) + +;;;###autoload +(defun pcomplete/env () + "Completion for the `env' command." + (while (string-prefix-p "-" (pcomplete-arg 0)) + (pcomplete-here (pcomplete-from-help "env --help")) + (when (pcomplete-match "\\`-[uCS]\\'") (pcomplete-here))) + (while (pcomplete-match "=" 0) (pcomplete-here)) ; FIXME: Complete env vars + (funcall pcomplete-command-completion-function) + (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1)) + pcomplete-default-completion-function))) + +;;;###autoload +(defun pcomplete/nice () + "Completion for the `nice' command." + (while (string-prefix-p "-" (pcomplete-arg 0)) + (pcomplete-here (pcomplete-from-help "nice --help")) + (pcomplete-here)) + (funcall pcomplete-command-completion-function) + (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1)) + pcomplete-default-completion-function))) + +;;;###autoload +(defun pcomplete/nohup () + "Completion for the `nohup' command." + (while (string-prefix-p "-" (pcomplete-arg 0)) + (pcomplete-here (pcomplete-from-help "nohup --help"))) + (funcall pcomplete-command-completion-function) + (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1)) + pcomplete-default-completion-function))) + +;;;###autoload +(defun pcomplete/stdbuf () + "Completion for the `stdbuf' command." + (while (string-prefix-p "-" (pcomplete-arg 0)) + (pcomplete-here (pcomplete-from-help "stdbuf --help")) + (when (pcomplete-match "\\`-[ioe]\\'") (pcomplete-here))) + (funcall pcomplete-command-completion-function) + (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1)) + pcomplete-default-completion-function))) + +;;;###autoload +(defun pcomplete/timeout () + "Completion for the `timeout' command." + (while (string-prefix-p "-" (pcomplete-arg 0)) + (pcomplete-here (pcomplete-from-help "timeout --help")) + (when (pcomplete-match "\\`-[ks]\\'") (pcomplete-here))) + (pcomplete-here) ; eat DURATION argument + (funcall pcomplete-command-completion-function) + (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1)) + pcomplete-default-completion-function))) + +;;;###autoload +(defun pcomplete/numfmt () + "Completion for the `numfmt' command." + (pcomplete-here-using-help "numfmt --help")) + +;;;###autoload +(defun pcomplete/seq () + "Completion for the `seq' command." + (pcomplete-here-using-help "seq --help")) + +;;; Network commands ;; ssh support by Phil Hagelberg. ;; https://www.emacswiki.org/cgi-bin/wiki/pcmpl-ssh.el @@ -239,6 +673,18 @@ Includes files as well as host names followed by a colon." (pcomplete-opt "xl(pcmpl-unix-user-names)") (pcmpl-unix-complete-hostname)) +;;; Miscellaneous + +;;;###autoload +(defun pcomplete/sudo () + "Completion for the `sudo' command." + (while (string-prefix-p "-" (pcomplete-arg 0)) + (pcomplete-here (pcomplete-from-help "sudo --help")) + (when (pcomplete-match "\\`-[CDghpRtTUu]\\'") (pcomplete-here))) + (funcall pcomplete-command-completion-function) + (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1)) + pcomplete-default-completion-function))) + (provide 'pcmpl-unix) ;;; pcmpl-unix.el ends here diff --git a/lisp/pcmpl-x.el b/lisp/pcmpl-x.el index 261a3d4e27b..1ede867c5fb 100644 --- a/lisp/pcmpl-x.el +++ b/lisp/pcmpl-x.el @@ -28,6 +28,22 @@ (eval-when-compile (require 'cl-lib)) (require 'pcomplete) +;;; TeX + +;;;###autoload +(defun pcomplete/tex () + "Completion for the `tex' command." + (pcomplete-here-using-help "tex --help" + :margin "^\\(?:\\[-no\\]\\)?\\(\\)-")) +;;;###autoload(defalias 'pcomplete/pdftex 'pcomplete/tex) +;;;###autoload(defalias 'pcomplete/latex 'pcomplete/tex) +;;;###autoload(defalias 'pcomplete/pdflatex 'pcomplete/tex) + +;;;###autoload +(defun pcomplete/luatex () + "Completion for the `luatex' command." + (pcomplete-here-using-help "luatex --help")) +;;;###autoload(defalias 'pcomplete/lualatex 'pcomplete/luatex) ;;;; tlmgr - https://www.tug.org/texlive/tlmgr.html @@ -142,6 +158,12 @@ (unless (pcomplete-match "^--" 0) (pcomplete-here* (pcomplete-dirs-or-entries))))))) +;;; Grep-like tools + +;;;###autoload +(defun pcomplete/rg () + "Completion for the `rg' command." + (pcomplete-here-using-help "rg --help")) ;;;; ack - https://betterthangrep.com @@ -288,6 +310,8 @@ long options." (pcmpl-x-ag-options)))) (pcomplete-here* (pcomplete-dirs-or-entries))))) +;;; Borland + ;;;###autoload (defun pcomplete/bcc32 () "Completion function for Borland's C++ compiler." @@ -321,5 +345,24 @@ long options." ;;;###autoload (defalias 'pcomplete/bcc 'pcomplete/bcc32) +;;; Network tools + +;;;###autoload +(defun pcomplete/rclone () + "Completion for the `rclone' command." + (let ((subcmds (pcomplete-from-help "rclone help" + :margin "^ " + :argument "[a-z]+" + :narrow-start "\n\n"))) + (while (not (member (pcomplete-arg 1) subcmds)) + (pcomplete-here (completion-table-merge + subcmds + (pcomplete-from-help "rclone help flags")))) + (let ((subcmd (pcomplete-arg 1))) + (while (if (pcomplete-match "\\`-" 0) + (pcomplete-here (pcomplete-from-help + `("rclone" ,subcmd "--help"))) + (pcomplete-here (pcomplete-entries))))))) + (provide 'pcmpl-x) ;;; pcmpl-x.el ends here diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 0e3d1df7814..6fe29d9dcfb 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el @@ -119,6 +119,9 @@ ;;; Code: (require 'comint) +(eval-when-compile + (require 'cl-lib) + (require 'rx)) (defgroup pcomplete nil "Programmable completion." @@ -481,6 +484,14 @@ Same as `pcomplete' but using the standard completion UI." (when completion-ignore-case (setq table (completion-table-case-fold table))) (list beg (point) table + :annotation-function + (lambda (cand) + (when (stringp cand) + (get-text-property 0 'pcomplete-annotation cand))) + :company-docsig + (lambda (cand) + (when (stringp cand) + (get-text-property 0 'pcomplete-help cand))) :predicate pred :exit-function ;; If completion is finished, add a terminating space. @@ -1325,6 +1336,133 @@ If specific documentation can't be given, be generic." (pcomplete-read-hosts pcomplete-hosts-file 'pcomplete--host-name-cache 'pcomplete--host-name-cache-timestamp))) +;;; Parsing help messages + +(defvar pcomplete-from-help (make-hash-table :test #'equal) + "Memoization table for function `pcomplete-from-help'.") + +(cl-defun pcomplete-from-help (command + &rest args + &key + (margin (rx bol (+ " "))) + (argument (rx "-" (+ (any "-" alnum)) (? "="))) + (metavar (rx (? " ") + (or (+ (any alnum "_-")) + (seq "[" (+? nonl) "]") + (seq "<" (+? nonl) ">") + (seq "{" (+? nonl) "}")))) + (separator (rx ", " symbol-start)) + (description (rx (* nonl) + (* "\n" (>= 9 " ") (* nonl)))) + narrow-start + narrow-end) + "Parse output of COMMAND into a list of completion candidates. + +COMMAND can be a string to be executed in a shell or a list of +strings (program name and arguments). It should print a help +message. + +A list of arguments is collected after each match of MARGIN. +Each argument should match ARGUMENT, possibly followed by a match +of METAVAR. If a match of SEPARATOR follows, then more +argument-metavar pairs are collected. Finally, a match of +DESCRIPTION is collected. + +Keyword ARGS: + +MARGIN: regular expression after which argument descriptions are + to be found. Parsing continues at the end of the first match + group or, failing that, the entire match. + +ARGUMENT: regular expression matching an argument name. The + first match group (failing that, the entire match) is collected + as the argument name. Parsing continues at the end of the + second matching group (failing that, the first group or entire + match). + +METAVAR: regular expression matching an argument parameter name. + The first match group (failing that, the entire match) is + collected as the parameter name and used as completion + annotation. Parsing continues at the end of the second + matching group (failing that, the first group or entire match). + +SEPARATOR: regular expression matching the separator between + arguments. Parsing continues at the end of the first match + group (failing that, the entire match). + +DESCRIPTION: regular expression matching the description of an + argument. The first match group (failing that, the entire + match) is collected as the parameter name and used as + completion help. Parsing continues at the end of the first + matching group (failing that, the entire match). + +NARROW-START, NARROW-END: if non-nil, parsing of the help message + is narrowed to the region between the end of the first match + group (failing that, the entire match) of these regular + expressions." + (with-memoization (gethash (cons command args) pcomplete-from-help) + (with-temp-buffer + (let ((case-fold-search nil) + (default-directory (expand-file-name "~/")) + (command (if (stringp command) + (list shell-file-name + shell-command-switch + command) + command)) + i result) + (apply #'call-process (car command) nil t nil (cdr command)) + (goto-char (point-min)) + (narrow-to-region (or (and narrow-start + (re-search-forward narrow-start nil t) + (or (match-beginning 1) (match-beginning 0))) + (point-min)) + (or (and narrow-end + (re-search-forward narrow-end nil t) + (or (match-beginning 1) (match-beginning 0))) + (point-max))) + (goto-char (point-min)) + (while (re-search-forward margin nil t) + (goto-char (or (match-end 1) (match-end 0))) + (setq i 0) + (while (and (or (zerop i) + (and (looking-at separator) + (goto-char (or (match-end 1) + (match-end 0))))) + (looking-at argument)) + (setq i (1+ i)) + (goto-char (seq-some #'match-end '(2 1 0))) + (push (or (match-string 1) (match-string 0)) result) + (when (looking-at metavar) + (goto-char (seq-some #'match-end '(2 1 0))) + (put-text-property 0 1 + 'pcomplete-annotation + (or (match-string 1) (match-string 0)) + (car result)))) + (when (looking-at description) + (goto-char (seq-some #'match-end '(2 1 0))) + (let ((help (string-clean-whitespace + (or (match-string 1) (match-string 0)))) + (items (take i result))) + (while items + (put-text-property 0 1 'pcomplete-help help + (pop items)))))) + (nreverse result))))) + +(defun pcomplete-here-using-help (command &rest args) + "Perform completion for a simple command. +Offer switches and directory entries as completion candidates. +The switches are obtained by calling `pcomplete-from-help' with +COMMAND and ARGS as arguments." + (while (cond + ((string= "--" (pcomplete-arg 1)) + (while (pcomplete-here (pcomplete-entries)))) + ((pcomplete-match "\\`--[^=]+=\\(.*\\)" 0) + (pcomplete-here (pcomplete-entries) + (pcomplete-match-string 1 0))) + ((string-prefix-p "-" (pcomplete-arg 0)) + (pcomplete-here (apply #'pcomplete-from-help command args))) + (t (pcomplete-here (pcomplete-entries)))))) + (provide 'pcomplete) ;;; pcomplete.el ends here diff --git a/test/lisp/pcomplete-tests.el b/test/lisp/pcomplete-tests.el new file mode 100644 index 00000000000..00a82502f30 --- /dev/null +++ b/test/lisp/pcomplete-tests.el @@ -0,0 +1,100 @@ +;;; pcomplete-tests.el --- Tests for pcomplete.el -*- lexical-binding: t -*- + +;; Copyright (C) 2022 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;;; Code: + +(require 'ert) +(require 'pcomplete) + +(ert-deftest pcomplete-test-parse-gpg-help () + (cl-letf ((pcomplete-from-help (make-hash-table :test #'equal)) + ((symbol-function 'call-process) + (lambda (&rest _) (insert "\ +gpg (GnuPG) 2.3.7 + +Commands: + + -s, --sign make a signature + --clear-sign make a clear text signature + -b, --detach-sign make a detached signature + --tofu-policy VALUE set the TOFU policy for a key + +Options to specify keys: + -r, --recipient USER-ID encrypt for USER-ID + -u, --local-user USER-ID use USER-ID to sign or decrypt + +(See the man page for a complete listing of all commands and options) + +Examples: + + -se -r Bob [file] sign and encrypt for user Bob + --clear-sign [file] make a clear text signature +")))) + (should + (equal-including-properties + (pcomplete-from-help "gpg --help" :narrow-end "^ -se") + '(#("-s" 0 1 (pcomplete-help "make a signature")) + #("--sign" 0 1 (pcomplete-help "make a signature")) + #("--clear-sign" 0 1 (pcomplete-help "make a clear text signature")) + #("-b" 0 1 (pcomplete-help "make a detached signature")) + #("--detach-sign" 0 1 (pcomplete-help "make a detached signature")) + #("--tofu-policy" 0 1 + (pcomplete-help "set the TOFU policy for a key" pcomplete-annotation " VALUE")) + #("-r" 0 1 (pcomplete-help "encrypt for USER-ID")) + #("--recipient" 0 1 + (pcomplete-help "encrypt for USER-ID" pcomplete-annotation " USER-ID")) + #("-u" 0 1 + (pcomplete-help "use USER-ID to sign or decrypt")) + #("--local-user" 0 1 + (pcomplete-help "use USER-ID to sign or decrypt" pcomplete-annotation " USER-ID"))))))) + +(ert-deftest pcomplete-test-parse-git-help () + (cl-letf ((pcomplete-from-help (make-hash-table :test #'equal)) + ((symbol-function 'call-process) + (lambda (&rest _) (insert "\ +usage: git [-v | --version] [-h | --help] [-C ] [-c =] + [--exec-path[=]] [--html-path] [--man-path] [--info-path] + [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare] + [--git-dir=] [--work-tree=] [--namespace=] + [--super-prefix=] [--config-env==] + [] +")))) + (should + (equal-including-properties + (pcomplete-from-help "git help" + :margin "\\(\\[\\)-" + :separator " | " + :description "\\`") + '("-v" "--version" "-h" "--help" + #("-C" 0 1 (pcomplete-annotation " ")) + #("-c" 0 1 (pcomplete-annotation " ")) + #("--exec-path" 0 1 (pcomplete-annotation "[=]")) + "--html-path" "--man-path" "--info-path" + "-p" "--paginate" "-P" "--no-pager" + "--no-replace-objects" "--bare" + #("--git-dir=" 0 1 (pcomplete-annotation "")) + #("--work-tree=" 0 1 (pcomplete-annotation "")) + #("--namespace=" 0 1 (pcomplete-annotation "")) + #("--super-prefix=" 0 1 (pcomplete-annotation "")) + #("--config-env=" 0 1 (pcomplete-annotation ""))))))) + +(provide 'pcomplete-tests) +;;; pcomplete-tests.el ends here From 5798c4aa2a7b3e7337234e8122d8243ecf54b402 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 15 Sep 2022 00:53:00 +0200 Subject: [PATCH 368/915] Support fbsetbg in wallpaper.el * lisp/image/wallpaper.el (wallpaper--default-commands) (wallpaper-command): Add "fbsetbg". --- lisp/image/wallpaper.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index 6d57691ff0c..2ebe5be0330 100644 --- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -61,6 +61,7 @@ ("gm" "display" "-size" "%wx%h" "-window" "root" "%f") ("display" "-resize" "%wx%h" "-window" "root" "%f") ("feh" "--bg-max" "%f") + ("fbsetbg" "-a" "%f") ("xwallpaper" "--zoom" "%f") ("hsetroot" "-full" "%f") ("xloadimage" "-onroot" "-fullscreen" "%f") @@ -152,6 +153,7 @@ native API will be used instead (see `haiku-set-wallpaper')." (const :tag "gm (X Window System)" "gm") (const :tag "display (X Window System)" "display") (const :tag "feh (X Window System)" "feh") + (const :tag "fbsetbg (X Window System)" "fbsetbg") (const :tag "xwallpaper (X Window System)" "xwallpaper") (const :tag "hsetroot (X Window System)" "hsetroot") (const :tag "xloadimage (X Window System)" "xloadimage") From 8c73ed0ec3328d4108e3084fc0dabdae8bb782a7 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 15 Sep 2022 00:53:12 +0200 Subject: [PATCH 369/915] Add image-transform-reset-to-original to manual * doc/emacs/files.texi (Image Mode): Add 'image-transform-reset-to-original'. Suggested by Juri Linkov . --- doc/emacs/files.texi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi index 744b848335e..1717c5c25bc 100644 --- a/doc/emacs/files.texi +++ b/doc/emacs/files.texi @@ -2273,6 +2273,7 @@ behavior by using the options @code{image-auto-resize} and @findex image-transform-set-percent @findex image-transform-set-scale @findex image-transform-reset-to-initial +@findex image-transform-reset-to-original To resize the image manually you can use the command @code{image-transform-fit-to-window} bound to @kbd{s w} that fits the image to both the window height and width. To scale the image to a @@ -2281,7 +2282,8 @@ percentage of its original size, use the command image specifying a scale factor, use the command @code{image-transform-set-scale} bound to @kbd{s s}. To reset all transformations to the initial state, use -@code{image-transform-reset-to-initial} bound to @kbd{s 0}. +@code{image-transform-reset-to-initial} bound to @kbd{s 0}, or +@code{image-transform-reset-to-original} bound to @kbd{s o}. @findex image-next-file @findex image-previous-file From 30ca49c8f64b73f991d94b10afcfc0e2d592fe6a Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Wed, 14 Sep 2022 09:49:27 -0700 Subject: [PATCH 370/915] Use '^' key for detach command bindings * lisp/tab-bar.el (tab-prefix-map): Move tear-off-window to C-x w ^ f. Bind tab-window-detach to C-x w ^ t. * lisp/window.el (window-prefix-map): Bind tab-detach to C-x t ^ f. --- lisp/tab-bar.el | 1 + lisp/window.el | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index cf5ae09a247..abefd996a8a 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -2411,6 +2411,7 @@ When `switch-to-buffer-obey-display-actions' is non-nil, (keymap-set tab-prefix-map "M" #'tab-move-to) (keymap-set tab-prefix-map "G" #'tab-group) (keymap-set tab-prefix-map "r" #'tab-rename) +(keymap-set tab-prefix-map "^ f" #'tab-detach) (keymap-set tab-prefix-map "RET" #'tab-switch) (keymap-set tab-prefix-map "b" #'switch-to-buffer-other-tab) (keymap-set tab-prefix-map "f" #'find-file-other-tab) diff --git a/lisp/window.el b/lisp/window.el index d5f42dd10b4..905803b19e6 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -10593,7 +10593,8 @@ displaying that processes's buffer." "2" #'split-root-window-below "3" #'split-root-window-right "s" #'window-toggle-side-windows - "f" #'tear-off-window + "^ f" #'tear-off-window + "^ t" #'tab-window-detach "-" #'fit-window-to-buffer "0" #'delete-windows-on) (define-key ctl-x-map "w" window-prefix-map) From b8e9239b47391c6628d94a4e2e91320c5366d27b Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Tue, 13 Sep 2022 16:14:00 -0700 Subject: [PATCH 371/915] Allow using a symbol as an index into an alist in Eshell * lisp/eshell/esh-var.el (eshell-index-value): If INDEX is a symbol, use 'assoc' for indexing. * test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-var-assoc) (esh-var-test/quoted-interp-var-assoc): Add checks for indexing via symbol (bug#57787). --- lisp/eshell/esh-var.el | 35 ++++++++++++++++--------------- test/lisp/eshell/esh-var-tests.el | 12 +++++++---- 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index a9df172e88e..36e59cd5a41 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el @@ -646,23 +646,24 @@ For example, to retrieve the second element of a user's record in "Reference VALUE using the given INDEX." (when (and (stringp index) (get-text-property 0 'number index)) (setq index (string-to-number index))) - (if (stringp index) - (cdr (assoc index value)) - (cond - ((ring-p value) - (if (> index (ring-length value)) - (error "Index exceeds length of ring") - (ring-ref value index))) - ((listp value) - (if (> index (length value)) - (error "Index exceeds length of list") - (nth index value))) - ((vectorp value) - (if (> index (length value)) - (error "Index exceeds length of vector") - (aref value index))) - (t - (error "Invalid data type for indexing"))))) + (if (integerp index) + (cond + ((ring-p value) + (if (> index (ring-length value)) + (error "Index exceeds length of ring") + (ring-ref value index))) + ((listp value) + (if (> index (length value)) + (error "Index exceeds length of list") + (nth index value))) + ((vectorp value) + (if (> index (length value)) + (error "Index exceeds length of vector") + (aref value index))) + (t + (error "Invalid data type for indexing"))) + ;; INDEX is some non-integer value, so treat VALUE as an alist. + (cdr (assoc index value)))) ;;;_* Variable name completion diff --git a/test/lisp/eshell/esh-var-tests.el b/test/lisp/eshell/esh-var-tests.el index bebc57d3592..cb5b1766bb5 100644 --- a/test/lisp/eshell/esh-var-tests.el +++ b/test/lisp/eshell/esh-var-tests.el @@ -105,9 +105,11 @@ (ert-deftest esh-var-test/interp-var-assoc () "Interpolate alist variable with index" - (let ((eshell-test-value '(("foo" . 1)))) + (let ((eshell-test-value '(("foo" . 1) (bar . 2)))) (eshell-command-result-equal "echo $eshell-test-value[foo]" - 1))) + 1) + (eshell-command-result-equal "echo $eshell-test-value[#'bar]" + 2))) (ert-deftest esh-var-test/interp-var-length-list () "Interpolate length of list variable" @@ -257,9 +259,11 @@ inside double-quotes" (ert-deftest esh-var-test/quoted-interp-var-assoc () "Interpolate alist variable with index inside double-quotes" - (let ((eshell-test-value '(("foo" . 1)))) + (let ((eshell-test-value '(("foo" . 1) (bar . 2)))) (eshell-command-result-equal "echo \"$eshell-test-value[foo]\"" - "1"))) + "1") + (eshell-command-result-equal "echo \"$eshell-test-value[#'bar]\"" + "2"))) (ert-deftest esh-var-test/quoted-interp-var-length-list () "Interpolate length of list variable inside double-quotes" From 5fe9a1a85ae6d54196031157a735352f6ab655ff Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 15 Sep 2022 09:12:13 +0300 Subject: [PATCH 372/915] ; Fix doc string of 'loaddefs-generate' * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Doc fix. (Bug#57815) --- lisp/emacs-lisp/loaddefs-gen.el | 4 +-- src/w32fns.c | 45 +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index 005a46c2d75..5819a26eb54 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -512,7 +512,7 @@ If COMPILE, don't include a \"don't compile\" cookie." (defun loaddefs-generate (dir output-file &optional excluded-files extra-data include-package-version generate-full) - "Generate loaddefs files for Lisp files in the directories DIRS. + "Generate loaddefs files for Lisp files in one or more directories given by DIR. DIR can be either a single directory or a list of directories. The autoloads will be written to OUTPUT-FILE. If any Lisp file @@ -520,7 +520,7 @@ binds `generated-autoload-file' as a file-local variable, write its autoloads into the specified file instead. The function does NOT recursively descend into subdirectories of the -directory or directories specified by DIRS. +directories specified by DIR. Optional argument EXCLUDED-FILES, if non-nil, should be a list of files, such as preloaded files, whose autoloads should not be written diff --git a/src/w32fns.c b/src/w32fns.c index 745458d0a03..57296bd4e07 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -10447,6 +10447,51 @@ w32_get_resource (const char *key, const char *name, LPDWORD lpdwtype) return (NULL); } +#ifdef WINDOWSNT + +/*********************************************************************** + Wallpaper + ***********************************************************************/ + +#if 0 + +typedef BOOL (WINAPI * SystemParametersInfoW_Proc) (UINT,UINT,PVOID,UINT); +static SystemParametersInfoW_Proc system_parameters_info_w_fn; + +DEFUN ("w32-set-wallpaper", Fw32_set_wallpaper, Sw32_set_wallpaper, 1, 1, 0, + doc: /* Set the desktop wallpaper image to IMAGE-FILE. */) + (Lisp_Object image_file) +{ + Lisp_Object encoded = ENCODE_FILE (Fexpand_file_name (image_file, Qnil)); + char *fname = SSDATA (encoded); + + if (w32_unicode_filenames) + { + } + else + { + char fname_a[MAX_PATH]; + + if (filename_to_ansi (fname, fname_a) != 0) + error ("Wallpaper file %s does not exist or cannot be accessed", fname); + + BOOL result = SystemParametersInfoA (SPI_SETDESKWALLPAPER, 0, fname_a, + SPIF_SENDCHANGE); + if (!result) + { + DWORD err = GetLastError (); + if (err) + error ("Could not set wallpaper: %s", w32_strerror (err)); + else + error ("Could not set wallpaper"); + } + } + return Qnil; +} +#endif + +#endif + /*********************************************************************** Initialization ***********************************************************************/ From 52a3ba102c0bcfda1b69e33be2a93a245a4c3a84 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 15 Sep 2022 09:14:59 +0300 Subject: [PATCH 373/915] Revert "; Fix doc string of 'loaddefs-generate'" This reverts commit 5fe9a1a85ae6d54196031157a735352f6ab655ff. It included unrelated changes. --- lisp/emacs-lisp/loaddefs-gen.el | 4 +-- src/w32fns.c | 45 --------------------------------- 2 files changed, 2 insertions(+), 47 deletions(-) diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index 5819a26eb54..005a46c2d75 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -512,7 +512,7 @@ If COMPILE, don't include a \"don't compile\" cookie." (defun loaddefs-generate (dir output-file &optional excluded-files extra-data include-package-version generate-full) - "Generate loaddefs files for Lisp files in one or more directories given by DIR. + "Generate loaddefs files for Lisp files in the directories DIRS. DIR can be either a single directory or a list of directories. The autoloads will be written to OUTPUT-FILE. If any Lisp file @@ -520,7 +520,7 @@ binds `generated-autoload-file' as a file-local variable, write its autoloads into the specified file instead. The function does NOT recursively descend into subdirectories of the -directories specified by DIR. +directory or directories specified by DIRS. Optional argument EXCLUDED-FILES, if non-nil, should be a list of files, such as preloaded files, whose autoloads should not be written diff --git a/src/w32fns.c b/src/w32fns.c index 57296bd4e07..745458d0a03 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -10447,51 +10447,6 @@ w32_get_resource (const char *key, const char *name, LPDWORD lpdwtype) return (NULL); } -#ifdef WINDOWSNT - -/*********************************************************************** - Wallpaper - ***********************************************************************/ - -#if 0 - -typedef BOOL (WINAPI * SystemParametersInfoW_Proc) (UINT,UINT,PVOID,UINT); -static SystemParametersInfoW_Proc system_parameters_info_w_fn; - -DEFUN ("w32-set-wallpaper", Fw32_set_wallpaper, Sw32_set_wallpaper, 1, 1, 0, - doc: /* Set the desktop wallpaper image to IMAGE-FILE. */) - (Lisp_Object image_file) -{ - Lisp_Object encoded = ENCODE_FILE (Fexpand_file_name (image_file, Qnil)); - char *fname = SSDATA (encoded); - - if (w32_unicode_filenames) - { - } - else - { - char fname_a[MAX_PATH]; - - if (filename_to_ansi (fname, fname_a) != 0) - error ("Wallpaper file %s does not exist or cannot be accessed", fname); - - BOOL result = SystemParametersInfoA (SPI_SETDESKWALLPAPER, 0, fname_a, - SPIF_SENDCHANGE); - if (!result) - { - DWORD err = GetLastError (); - if (err) - error ("Could not set wallpaper: %s", w32_strerror (err)); - else - error ("Could not set wallpaper"); - } - } - return Qnil; -} -#endif - -#endif - /*********************************************************************** Initialization ***********************************************************************/ From 48d8543ff134e08332bf35d96409cb8e3c2cbfb9 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 15 Sep 2022 09:16:41 +0300 Subject: [PATCH 374/915] ; Fix doc string of 'loaddefs-generate' * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Doc fix. (Bug#57815) --- lisp/emacs-lisp/loaddefs-gen.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index 005a46c2d75..5819a26eb54 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -512,7 +512,7 @@ If COMPILE, don't include a \"don't compile\" cookie." (defun loaddefs-generate (dir output-file &optional excluded-files extra-data include-package-version generate-full) - "Generate loaddefs files for Lisp files in the directories DIRS. + "Generate loaddefs files for Lisp files in one or more directories given by DIR. DIR can be either a single directory or a list of directories. The autoloads will be written to OUTPUT-FILE. If any Lisp file @@ -520,7 +520,7 @@ binds `generated-autoload-file' as a file-local variable, write its autoloads into the specified file instead. The function does NOT recursively descend into subdirectories of the -directory or directories specified by DIRS. +directories specified by DIR. Optional argument EXCLUDED-FILES, if non-nil, should be a list of files, such as preloaded files, whose autoloads should not be written From 1ccfd3bae2dffe5cf33202eb4479f4daf722b265 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 15 Sep 2022 09:17:30 +0200 Subject: [PATCH 375/915] Use substitute-command-keys in proced-help * lisp/proced.el (proced-help-string, proced-help): Use substitute-command-keys. --- lisp/proced.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/proced.el b/lisp/proced.el index c278cce9dc7..0f0937cac81 100644 --- a/lisp/proced.el +++ b/lisp/proced.el @@ -426,7 +426,14 @@ Important: the match ends just after the marker.") "Name of Proced Log buffer.") (defconst proced-help-string - "(n)ext, (p)revious, (m)ark, (u)nmark, (k)ill, (q)uit (type ? for more help)" + (concat "\\ " + "\\[next-line] next, " + "\\[previous-line] previous, " + "\\[proced-mark] mark, " + "\\[proced-unmark] unmark, " + "\\[proced-send-signal] kill, " + "\\[quit-window] quit " + "(type \\[proced-help] for more help)") "Help string for Proced.") (defconst proced-header-help-echo @@ -1978,7 +1985,7 @@ STRING is an overall summary of the failures." (proced-why) (if (eq last-command 'proced-help) (describe-mode) - (message proced-help-string))) + (message (substitute-command-keys proced-help-string)))) (defun proced-undo () "Undo in a Proced buffer. From 429e61b130232e69531f7d44b2bc610d43c8217d Mon Sep 17 00:00:00 2001 From: Po Lu Date: Thu, 15 Sep 2022 15:30:32 +0800 Subject: [PATCH 376/915] More fixes for XDND proxy support * src/xterm.c (handle_one_xevent): Check replies against toplevel, not proxy. --- src/xterm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 96d25b26434..4c3b8128175 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -17676,7 +17676,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (x_dnd_last_protocol_version != -1 && x_dnd_in_progress - && target == x_dnd_last_seen_window + && target == x_dnd_last_seen_toplevel /* The XDND documentation is not very clearly worded. But this should be the correct behavior, since "kDNDStatusSendHereFlag" in the reference @@ -20377,7 +20377,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, else if (x_dnd_last_seen_window != None && x_dnd_last_protocol_version != -1) { - x_dnd_pending_finish_target = x_dnd_last_seen_window; + x_dnd_pending_finish_target = x_dnd_last_seen_toplevel; x_dnd_waiting_for_finish_proto = x_dnd_last_protocol_version; x_dnd_waiting_for_finish @@ -21914,7 +21914,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, else if (x_dnd_last_seen_window != None && x_dnd_last_protocol_version != -1) { - x_dnd_pending_finish_target = x_dnd_last_seen_window; + x_dnd_pending_finish_target = x_dnd_last_seen_toplevel; x_dnd_waiting_for_finish_proto = x_dnd_last_protocol_version; x_dnd_waiting_for_finish From f941cc76df7476a055350b3b1b7e9e61d1ddb246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Wed, 14 Sep 2022 18:46:40 +0200 Subject: [PATCH 377/915] mapconcat fast path with `identity` function argument This makes (mapconcat #'identity SEQ) slightly faster than (apply #'concat SEQ), which used to be much faster. Notably, `string-join` benefits from this change as it uses mapconcat. * src/fns.c (Fmapconcat): Speed up execution when the function argument is `identity`. --- src/fns.c | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/fns.c b/src/fns.c index 2f4808be3d0..9dd10fe4438 100644 --- a/src/fns.c +++ b/src/fns.c @@ -2930,15 +2930,37 @@ FUNCTION must be a function of one argument, and must return a value return empty_unibyte_string; Lisp_Object *args; SAFE_ALLOCA_LISP (args, args_alloc); + if (EQ (function, Qidentity)) + { + /* Fast path when no function call is necessary. */ + if (CONSP (sequence)) + { + Lisp_Object src = sequence; + Lisp_Object *dst = args; + do + { + *dst++ = XCAR (src); + src = XCDR (src); + } + while (!NILP (src)); + goto concat; + } + else if (VECTORP (sequence)) + { + memcpy (args, XVECTOR (sequence)->contents, leni * sizeof *args); + goto concat; + } + } ptrdiff_t nmapped = mapcar1 (leni, args, function, sequence); - ptrdiff_t nargs = 2 * nmapped - 1; eassert (nmapped == leni); + concat: ; + ptrdiff_t nargs = args_alloc; if (NILP (separator) || (STRINGP (separator) && SCHARS (separator) == 0)) - nargs = nmapped; + nargs = leni; else { - for (ptrdiff_t i = nmapped - 1; i > 0; i--) + for (ptrdiff_t i = leni - 1; i > 0; i--) args[i + i] = args[i]; for (ptrdiff_t i = 1; i < nargs; i += 2) From 3ad2adc48c700a8c15459f623081c32420f0b726 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Wed, 14 Sep 2022 19:19:08 +0200 Subject: [PATCH 378/915] Simplify and shrink reader buffers A big on-stack buffer in a potentially long-running function can interact badly with the GC's conservative scanning of the C stack. It may make the scanning slower (since the stack frame is big) and risks accidental retention of objects from stack detritus (because the buffer isn't cleaned on entry). * src/lread.c (stackbufsize): Remove. (read_integer, read_string_literal, read_bool_vector): Use a local buffer instead of piggy-backing on that in read0. (read0): Reduce buffer to something suitable for most identifiers and numbers. --- src/lread.c | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/src/lread.c b/src/lread.c index d64a4fad3af..51cbf811bab 100644 --- a/src/lread.c +++ b/src/lread.c @@ -2914,20 +2914,17 @@ invalid_radix_integer (EMACS_INT radix, Lisp_Object readcharfun) invalid_syntax (buf, readcharfun); } -/* Size of the fixed-size buffer used during reading. */ -enum { stackbufsize = 1024 }; - /* Read an integer in radix RADIX using READCHARFUN to read - characters. RADIX must be in the interval [2..36]. Use STACKBUF - for temporary storage as needed. Value is the integer read. + characters. RADIX must be in the interval [2..36]. + Value is the integer read. Signal an error if encountering invalid read syntax. */ static Lisp_Object -read_integer (Lisp_Object readcharfun, int radix, - char stackbuf[VLA_ELEMS (stackbufsize)]) +read_integer (Lisp_Object readcharfun, int radix) { + char stackbuf[20]; char *read_buffer = stackbuf; - ptrdiff_t read_buffer_size = stackbufsize; + ptrdiff_t read_buffer_size = sizeof stackbuf; char *p = read_buffer; char *heapbuf = NULL; int valid = -1; /* 1 if valid, 0 if not, -1 if incomplete. */ @@ -3028,11 +3025,11 @@ read_char_literal (Lisp_Object readcharfun) /* Read a string literal (preceded by '"'). */ static Lisp_Object -read_string_literal (char stackbuf[VLA_ELEMS (stackbufsize)], - Lisp_Object readcharfun) +read_string_literal (Lisp_Object readcharfun) { + char stackbuf[1024]; char *read_buffer = stackbuf; - ptrdiff_t read_buffer_size = stackbufsize; + ptrdiff_t read_buffer_size = sizeof stackbuf; specpdl_ref count = SPECPDL_INDEX (); char *heapbuf = NULL; char *p = read_buffer; @@ -3355,8 +3352,7 @@ string_props_from_rev_list (Lisp_Object elems, Lisp_Object readcharfun) /* Read a bool vector (preceded by "#&"). */ static Lisp_Object -read_bool_vector (char stackbuf[VLA_ELEMS (stackbufsize)], - Lisp_Object readcharfun) +read_bool_vector (Lisp_Object readcharfun) { ptrdiff_t length = 0; for (;;) @@ -3374,7 +3370,7 @@ read_bool_vector (char stackbuf[VLA_ELEMS (stackbufsize)], } ptrdiff_t size_in_chars = bool_vector_bytes (length); - Lisp_Object str = read_string_literal (stackbuf, readcharfun); + Lisp_Object str = read_string_literal (readcharfun); if (STRING_MULTIBYTE (str) || !(size_in_chars == SCHARS (str) /* We used to print 1 char too many when the number of bits @@ -3696,7 +3692,7 @@ read_stack_reset (intmax_t sp) static Lisp_Object read0 (Lisp_Object readcharfun, bool locate_syms) { - char stackbuf[stackbufsize]; + char stackbuf[64]; char *read_buffer = stackbuf; ptrdiff_t read_buffer_size = sizeof stackbuf; char *heapbuf = NULL; @@ -3893,7 +3889,7 @@ read0 (Lisp_Object readcharfun, bool locate_syms) case '&': /* #&N"..." -- bool-vector */ - obj = read_bool_vector (stackbuf, readcharfun); + obj = read_bool_vector (readcharfun); break; case '!': @@ -3909,17 +3905,17 @@ read0 (Lisp_Object readcharfun, bool locate_syms) case 'x': case 'X': - obj = read_integer (readcharfun, 16, stackbuf); + obj = read_integer (readcharfun, 16); break; case 'o': case 'O': - obj = read_integer (readcharfun, 8, stackbuf); + obj = read_integer (readcharfun, 8); break; case 'b': case 'B': - obj = read_integer (readcharfun, 2, stackbuf); + obj = read_integer (readcharfun, 2); break; case '@': @@ -3988,7 +3984,7 @@ read0 (Lisp_Object readcharfun, bool locate_syms) /* #NrDIGITS -- radix-N number */ if (n < 0 || n > 36) invalid_radix_integer (n, readcharfun); - obj = read_integer (readcharfun, n, stackbuf); + obj = read_integer (readcharfun, n); break; } else if (n <= MOST_POSITIVE_FIXNUM && !NILP (Vread_circle)) @@ -4043,7 +4039,7 @@ read0 (Lisp_Object readcharfun, bool locate_syms) break; case '"': - obj = read_string_literal (stackbuf, readcharfun); + obj = read_string_literal (readcharfun); break; case '\'': From 824ae5faeec9cfa5e14e750030d55800b08ad7f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sat, 27 Aug 2022 14:20:38 +0200 Subject: [PATCH 379/915] Use `eql` or `eq` instead of `=` in some places For a switch op to be generated, comparisons must be made using `eq`, `eql` or `equal`, not `=`. * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): * lisp/files.el (file-modes-char-to-who, file-modes-char-to-right): * lisp/international/titdic-cnv.el (tit-process-header): * lisp/language/ethio-util.el (ethio-input-special-character) (ethio-fidel-to-tex-buffer): * lisp/language/lao.el (consonant): Use `eq` or `eql` instead of `=`. In these cases either `eq` or `eql` would do and the choice does not affect the resulting code. We compare numbers with `eql` and characters with `eq` as a matter of style. --- lisp/emacs-lisp/byte-opt.el | 8 +++--- lisp/files.el | 38 ++++++++++++++-------------- lisp/international/titdic-cnv.el | 10 ++++---- lisp/language/ethio-util.el | 43 ++++++++++++++++---------------- lisp/language/lao.el | 6 ++--- 5 files changed, 53 insertions(+), 52 deletions(-) diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 27b0d33d3ef..0d5f8c26eb2 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1999,20 +1999,20 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." (setq keep-going t) (setq tmp (aref byte-stack+-info (symbol-value (car lap0)))) (setq rest (cdr rest)) - (cond ((= tmp 1) + (cond ((eql tmp 1) (byte-compile-log-lap " %s discard\t-->\t" lap0) (setq lap (delq lap0 (delq lap1 lap)))) - ((= tmp 0) + ((eql tmp 0) (byte-compile-log-lap " %s discard\t-->\t discard" lap0) (setq lap (delq lap0 lap))) - ((= tmp -1) + ((eql tmp -1) (byte-compile-log-lap " %s discard\t-->\tdiscard discard" lap0) (setcar lap0 'byte-discard) (setcdr lap0 0)) - ((error "Optimizer error: too much on the stack")))) + (t (error "Optimizer error: too much on the stack")))) ;; ;; goto*-X X: --> X: ;; diff --git a/lisp/files.el b/lisp/files.el index 540bc2a6a85..0f2d3ca4b9a 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -8271,10 +8271,10 @@ CHAR is in [ugoa] and represents the category of users (Owner, Group, Others, or All) for whom to produce the mask. The bit-mask that is returned extracts from mode bits the access rights for the specified category of users." - (cond ((= char ?u) #o4700) - ((= char ?g) #o2070) - ((= char ?o) #o1007) - ((= char ?a) #o7777) + (cond ((eq char ?u) #o4700) + ((eq char ?g) #o2070) + ((eq char ?o) #o1007) + ((eq char ?a) #o7777) (t (error "%c: Bad `who' character" char)))) (defun file-modes-char-to-right (char &optional from) @@ -8282,22 +8282,22 @@ for the specified category of users." CHAR is in [rwxXstugo] and represents symbolic access permissions. If CHAR is in [Xugo], the value is taken from FROM (or 0 if omitted)." (or from (setq from 0)) - (cond ((= char ?r) #o0444) - ((= char ?w) #o0222) - ((= char ?x) #o0111) - ((= char ?s) #o6000) - ((= char ?t) #o1000) + (cond ((eq char ?r) #o0444) + ((eq char ?w) #o0222) + ((eq char ?x) #o0111) + ((eq char ?s) #o6000) + ((eq char ?t) #o1000) ;; Rights relative to the previous file modes. - ((= char ?X) (if (= (logand from #o111) 0) 0 #o0111)) - ((= char ?u) (let ((uright (logand #o4700 from))) - ;; FIXME: These divisions/shifts seem to be right - ;; for the `7' part of the #o4700 mask, but not - ;; for the `4' part. Same below for `g' and `o'. - (+ uright (/ uright #o10) (/ uright #o100)))) - ((= char ?g) (let ((gright (logand #o2070 from))) - (+ gright (/ gright #o10) (* gright #o10)))) - ((= char ?o) (let ((oright (logand #o1007 from))) - (+ oright (* oright #o10) (* oright #o100)))) + ((eq char ?X) (if (= (logand from #o111) 0) 0 #o0111)) + ((eq char ?u) (let ((uright (logand #o4700 from))) + ;; FIXME: These divisions/shifts seem to be right + ;; for the `7' part of the #o4700 mask, but not + ;; for the `4' part. Same below for `g' and `o'. + (+ uright (/ uright #o10) (/ uright #o100)))) + ((eq char ?g) (let ((gright (logand #o2070 from))) + (+ gright (/ gright #o10) (* gright #o10)))) + ((eq char ?o) (let ((oright (logand #o1007 from))) + (+ oright (* oright #o10) (* oright #o100)))) (t (error "%c: Bad right character" char)))) (defun file-modes-rights-to-number (rights who-mask &optional from) diff --git a/lisp/international/titdic-cnv.el b/lisp/international/titdic-cnv.el index 080045e7520..d2a6ee1e9d1 100644 --- a/lisp/international/titdic-cnv.el +++ b/lisp/international/titdic-cnv.el @@ -281,7 +281,7 @@ SPC, 6, 3, 4, or 7 specifying a tone (SPC:陰平, 6:陽平, 3:上聲, 4:去聲, (while (not (eobp)) (let ((ch (following-char)) (pos (point))) - (cond ((= ch ?C) ; COMMENT + (cond ((eq ch ?C) ; COMMENT (cond ((looking-at "COMMENT") (let ((pos (match-end 0)) (to (progn (end-of-line) (point)))) @@ -295,7 +295,7 @@ SPC, 6, 3, 4, or 7 specifying a tone (SPC:陰平, 6:陽平, 3:上聲, 4:去聲, (setq tit-comments (cons (buffer-substring-no-properties pos (point)) tit-comments)))))) - ((= ch ?M) ; MULTICHOICE, MOVERIGHT, MOVELEFT + ((eq ch ?M) ; MULTICHOICE, MOVERIGHT, MOVELEFT (cond ((looking-at "MULTICHOICE:[ \t]*") (goto-char (match-end 0)) (setq tit-multichoice (looking-at "YES"))) @@ -305,7 +305,7 @@ SPC, 6, 3, 4, or 7 specifying a tone (SPC:陰平, 6:陽平, 3:上聲, 4:去聲, ((looking-at "MOVELEFT:[ \t]*") (goto-char (match-end 0)) (setq tit-moveleft (tit-read-key-value))))) - ((= ch ?P) ; PROMPT + ((eq ch ?P) ; PROMPT (cond ((looking-at "PROMPT:[ \t]*") (goto-char (match-end 0)) (setq tit-prompt (tit-read-key-value)) @@ -316,7 +316,7 @@ SPC, 6, 3, 4, or 7 specifying a tone (SPC:陰平, 6:陽平, 3:上聲, 4:去聲, (if (or (eq (nth 1 split) 32) (eq (nth 2 split) 32)) (setq tit-prompt (substring tit-prompt 0 -1))))))) - ((= ch ?B) ; BACKSPACE, BEGINDICTIONARY, + ((eq ch ?B) ; BACKSPACE, BEGINDICTIONARY, ; BEGINPHRASE (cond ((looking-at "BACKSPACE:[ \t]*") (goto-char (match-end 0)) @@ -325,7 +325,7 @@ SPC, 6, 3, 4, or 7 specifying a tone (SPC:陰平, 6:陽平, 3:上聲, 4:去聲, (setq tit-dictionary t)) ((looking-at "BEGINPHRASE") (setq tit-dictionary nil)))) - ((= ch ?K) ; KEYPROMPT + ((eq ch ?K) ; KEYPROMPT (cond ((looking-at "KEYPROMPT(\\(.*\\)):[ \t]*") (let ((key-char (match-string 1))) (goto-char (match-end 0)) diff --git a/lisp/language/ethio-util.el b/lisp/language/ethio-util.el index a0159679da2..2f76acfe7cb 100644 --- a/lisp/language/ethio-util.el +++ b/lisp/language/ethio-util.el @@ -794,15 +794,15 @@ The 2nd and 3rd arguments BEGIN and END specify the region." "This function is deprecated." (interactive "*cInput number: 1. 2. 3. 4. 5.") (cond - ((= arg ?1) + ((eq arg ?1) (insert "")) - ((= arg ?2) + ((eq arg ?2) (insert "")) - ((= arg ?3) + ((eq arg ?3) (insert "")) - ((= arg ?4) + ((eq arg ?4) (insert "")) - ((= arg ?5) + ((eq arg ?5) (insert "")) (t (error "")))) @@ -816,7 +816,7 @@ The 2nd and 3rd arguments BEGIN and END specify the region." "Convert each fidel characters in the current buffer into a fidel-tex command." (interactive) (let ((buffer-read-only nil) - comp ch) + comp) ;; Special treatment for geminated characters. ;; Geminated characters la", etc. change into \geminateG{\laG}, etc. @@ -835,21 +835,22 @@ The 2nd and 3rd arguments BEGIN and END specify the region." ;; Special Ethiopic punctuation. (goto-char (point-min)) (while (re-search-forward "\\ce[».?]\\|«\\ce" nil t) - (cond - ((= (setq ch (preceding-char)) ?\») - (delete-char -1) - (insert "\\rquoteG")) - ((= ch ?.) - (delete-char -1) - (insert "\\dotG")) - ((= ch ??) - (delete-char -1) - (insert "\\qmarkG")) - (t - (forward-char -1) - (delete-char -1) - (insert "\\lquoteG") - (forward-char 1)))) + (let ((ch (preceding-char))) + (cond + ((eq ch ?\») + (delete-char -1) + (insert "\\rquoteG")) + ((eq ch ?.) + (delete-char -1) + (insert "\\dotG")) + ((eq ch ??) + (delete-char -1) + (insert "\\qmarkG")) + (t + (forward-char -1) + (delete-char -1) + (insert "\\lquoteG") + (forward-char 1))))) ;; Ethiopic characters to TeX macros (robin-invert-region (point-min) (point-max) "ethiopic-tex") diff --git a/lisp/language/lao.el b/lisp/language/lao.el index 1861eff15eb..0ad5b9f84e3 100644 --- a/lisp/language/lao.el +++ b/lisp/language/lao.el @@ -60,9 +60,9 @@ (len (length chars)) ;; Replace `c', `t', `v' to consonant, tone, and vowel. (regexp (mapconcat (lambda (c) - (cond ((= c ?c) consonant) - ((= c ?t) tone) - ((= c ?v) vowel-upper-lower) + (cond ((eq c ?c) consonant) + ((eq c ?t) tone) + ((eq c ?v) vowel-upper-lower) (t (string c)))) (cdr l) "")) ;; Element of composition-function-table. From 6d61d6018c00fd952937966a8cadfd1e7c102efa Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 15 Sep 2022 11:27:57 +0200 Subject: [PATCH 380/915] Add rudimentary font-locking to edit-abbrevs-mode * lisp/abbrev.el (abbrev-table-name): New face. (edit-abbrevs-mode-font-lock-keywords): New defvar. (edit-abbrevs-mode): Support font-locking. --- etc/NEWS | 5 +++++ lisp/abbrev.el | 20 +++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index decaff7fe6f..c88af4e90cf 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2444,6 +2444,11 @@ remote host are shown. Alternatively, the user option *** 'outlineify-sticky' command is renamed to 'allout-outlinify-sticky'. The old name is still available as an obsolete function alias. +--- +*** 'edit-abbrevs' now uses font-locking. +The new face 'abbrev-table-name' is used to display the abbrev table +name. + * New Modes and Packages in Emacs 29.1 diff --git a/lisp/abbrev.el b/lisp/abbrev.el index 718938df0cb..a4f0196a789 100644 --- a/lisp/abbrev.el +++ b/lisp/abbrev.el @@ -1,7 +1,6 @@ ;;; abbrev.el --- abbrev mode commands for Emacs -*- lexical-binding: t -*- -;; Copyright (C) 1985-1987, 1992, 2001-2022 Free Software Foundation, -;; Inc. +;; Copyright (C) 1985-2022 Free Software Foundation, Inc. ;; Maintainer: emacs-devel@gnu.org ;; Keywords: abbrev convenience @@ -1220,13 +1219,28 @@ SORTFUN is passed to `sort' to change the default ordering." (sort entries (lambda (x y) (funcall sortfun (nth 2 x) (nth 2 y))))))) +(defface abbrev-table-name + '((t :inherit font-lock-function-name-face)) + "Face used for displaying the abbrev table name in `edit-abbrev-mode'." + :version "29.1") + +(defvar edit-abbrevs-mode-font-lock-keywords + `((,(rx bol "(" + ;; lisp-mode-symbol-regexp + (regexp "\\(?:\\sw\\|\\s_\\|\\\\.\\)+") + ")" eol) + 0 'abbrev-table-name))) + ;; Keep it after define-abbrev-table, since define-derived-mode uses ;; define-abbrev-table. (define-derived-mode edit-abbrevs-mode fundamental-mode "Edit-Abbrevs" "Major mode for editing the list of abbrev definitions. This mode is for editing abbrevs in a buffer prepared by `edit-abbrevs', which see." - :interactive nil) + :interactive nil + (setq-local font-lock-defaults + '(edit-abbrevs-mode-font-lock-keywords nil nil ((?_ . "w")))) + (setq font-lock-multiline nil)) (defun abbrev--possibly-save (query &optional arg) ;; Query mode. From 09e93c4dafc6ffa3e556429757348adfa49a5a83 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 15 Sep 2022 14:51:31 +0300 Subject: [PATCH 381/915] Implement support for 'wallpaper-set' on MS-Windows * src/w32fns.c (Fw32_set_wallpaper): New primitive. (syms_of_w32fns): Defsubr it. (globals_of_w32fns): Attempt to load SystemParametersInfoW from its DLL at run time. * lisp/image/wallpaper.el (wallpaper-set): Support MS-Windows by calling 'w32-set-wallpaper'. * etc/NEWS: Update and simplify wording of the 'wallpaper-set' entry. --- etc/NEWS | 18 +++++------- lisp/image/wallpaper.el | 4 ++- src/w32fns.c | 63 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 73 insertions(+), 12 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index c88af4e90cf..cc68cd82b86 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2463,17 +2463,13 @@ to optionally rotate images which have the :rotation property. --- ** New package 'wallpaper'. -This package provides the command `wallpaper-set', which sets the -desktop background. - -On GNU/Linux and other Unix-like systems, it uses an external command -(such as "swaybg", "gm", "display" or "xloadimage"). A suitable -command should be detected automatically in most cases, but can also -be customized manually with the new user options 'wallpaper-command' -and 'wallpaper-command-args' if needed. - -On Haiku, it uses the new function `haiku-set-wallpaper', which does -not rely on any external command. +This package provides the command 'wallpaper-set', which sets the +desktop background image. Depending on the system and the desktop, +this may require an external program (such as 'swaybg', 'gm', +'display' or 'xloadimage'). If so, a suitable command should be +detected automatically in most cases, and can also be customized +manually if needed using the new user options 'wallpaper-command' and +'wallpaper-command-args'. +++ ** New package 'oclosure'. diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index 2ebe5be0330..ef2ad31eba7 100644 --- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -240,7 +240,9 @@ On Haiku, no external command is needed, so the value of (error "No such file: %s" file)) (unless (file-readable-p file) (error "File is not readable: %s" file)) - (cond ((featurep 'haiku) + (cond ((eq system-type 'windows-nt) + (w32-set-wallpaper file)) + ((featurep 'haiku) (haiku-set-wallpaper file)) (t (let* ((fmt-spec `((?f . ,(expand-file-name file)) diff --git a/src/w32fns.c b/src/w32fns.c index 745458d0a03..d9070675a28 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -10447,6 +10447,66 @@ w32_get_resource (const char *key, const char *name, LPDWORD lpdwtype) return (NULL); } +#ifdef WINDOWSNT + +/*********************************************************************** + Wallpaper + ***********************************************************************/ + +typedef BOOL (WINAPI * SystemParametersInfoW_Proc) (UINT,UINT,PVOID,UINT); +SystemParametersInfoW_Proc system_parameters_info_w_fn = NULL; + +DEFUN ("w32-set-wallpaper", Fw32_set_wallpaper, Sw32_set_wallpaper, 1, 1, 0, + doc: /* Set the desktop wallpaper image to IMAGE-FILE. */) + (Lisp_Object image_file) +{ + Lisp_Object encoded = ENCODE_FILE (Fexpand_file_name (image_file, Qnil)); + char *fname = SSDATA (encoded); + BOOL result = false; + DWORD err = 0; + + /* UNICOWS.DLL seems to have SystemParametersInfoW, but it doesn't + seem to be worth the hassle to support that on Windows 9X for the + benefit of this minor feature. Let them use on Windows 9X only + image file names that can be encoded by the system codepage. */ + if (w32_unicode_filenames && system_parameters_info_w_fn) + { + wchar_t fname_w[MAX_PATH]; + + if (filename_to_utf16 (fname, fname_w) != 0) + err = ERROR_FILE_NOT_FOUND; + else + result = SystemParametersInfoW (SPI_SETDESKWALLPAPER, 0, fname_w, + SPIF_SENDCHANGE); + } + else + { + char fname_a[MAX_PATH]; + + if (filename_to_ansi (fname, fname_a) != 0) + err = ERROR_FILE_NOT_FOUND; + else + result = SystemParametersInfoA (SPI_SETDESKWALLPAPER, 0, fname_a, + SPIF_SENDCHANGE); + } + if (!result) + { + if (err == ERROR_FILE_NOT_FOUND) + error ("Wallpaper file %s does not exist or cannot be accessed", fname); + else + { + err = GetLastError (); + if (err) + error ("Could not set desktop wallpaper: %s", w32_strerror (err)); + else + error ("Could not set desktop wallpaper (wrong image type?)"); + } + } + + return Qnil; +} +#endif + /*********************************************************************** Initialization ***********************************************************************/ @@ -10926,6 +10986,7 @@ keys when IME input is received. */); defsubr (&Sx_file_dialog); #ifdef WINDOWSNT defsubr (&Ssystem_move_file_to_trash); + defsubr (&Sw32_set_wallpaper); #endif } @@ -11179,6 +11240,8 @@ globals_of_w32fns (void) get_proc_addr (user32_lib, "EnumDisplayMonitors"); get_title_bar_info_fn = (GetTitleBarInfo_Proc) get_proc_addr (user32_lib, "GetTitleBarInfo"); + system_parameters_info_w_fn = (SystemParametersInfoW_Proc) + get_proc_addr (user32_lib, "SystemParametersInfoW"); { HMODULE imm32_lib = GetModuleHandle ("imm32.dll"); From 6bcc7a2df733f86925780aed448dd38aa933507b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 15 Sep 2022 14:59:50 +0300 Subject: [PATCH 382/915] ; Fix last change in w32fns.c. --- src/w32fns.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/w32fns.c b/src/w32fns.c index d9070675a28..5f652ae9e46 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -11240,8 +11240,10 @@ globals_of_w32fns (void) get_proc_addr (user32_lib, "EnumDisplayMonitors"); get_title_bar_info_fn = (GetTitleBarInfo_Proc) get_proc_addr (user32_lib, "GetTitleBarInfo"); +#ifndef CYGWIN system_parameters_info_w_fn = (SystemParametersInfoW_Proc) get_proc_addr (user32_lib, "SystemParametersInfoW"); +#endif { HMODULE imm32_lib = GetModuleHandle ("imm32.dll"); From 99bb6de7e17286a97caa2716b1c301bcd838d371 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 15 Sep 2022 15:44:06 +0200 Subject: [PATCH 383/915] ; Silence byte-compiler in wallpaper.el * lisp/image/wallpaper.el (w32-set-wallpaper): Declare. --- lisp/image/wallpaper.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index ef2ad31eba7..b5ce7355cd0 100644 --- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -215,6 +215,7 @@ See also `wallpaper-default-width'.") (funcall fun) (read-number (format "Wallpaper %s in pixels: " desc) default))) +(declare-function w32-set-wallpaper "w32fns.c") (declare-function haiku-set-wallpaper "term/haiku-win.el") (defun wallpaper-set (file) From 471414fe6ba8e9c9d755a83e7feddcdd5a45456a Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Thu, 15 Sep 2022 19:30:17 +0300 Subject: [PATCH 384/915] Fix outline image icon display (bug#57813) * lisp/outline.el (outline--make-button-overlay): Don't overwrite image display with string display when image exists. (outline--fix-up-all-buttons): Optimize. --- lisp/outline.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/lisp/outline.el b/lisp/outline.el index b19e0cf8119..c9d1a4ac64b 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -1003,11 +1003,11 @@ If non-nil, EVENT should be a mouse event." ;; movement commands work more logically. (when (derived-mode-p 'special-mode) (put-text-property (point) (1+ (point)) 'face (plist-get icon 'face))) - (when-let ((image (plist-get icon 'image))) - (overlay-put o 'display image)) - (overlay-put o 'display (concat (plist-get icon 'string) - (string (char-after (point))))) - (overlay-put o 'face (plist-get icon 'face))) + (if-let ((image (plist-get icon 'image))) + (overlay-put o 'display image) + (overlay-put o 'display (concat (plist-get icon 'string) + (string (char-after (point))))) + (overlay-put o 'face (plist-get icon 'face)))) o)) (defun outline--insert-open-button () @@ -1041,11 +1041,11 @@ If non-nil, EVENT should be a mouse event." "" #'outline-show-subtree)))))) (defun outline--fix-up-all-buttons (&optional from to) - (when from - (save-excursion - (goto-char from) - (setq from (line-beginning-position)))) (when (outline--use-buttons-p) + (when from + (save-excursion + (goto-char from) + (setq from (line-beginning-position)))) (outline-map-region (lambda () ;; `outline--cycle-state' will fail if we're in a totally From 2e0cde244a99b83b221dc5ecce24167bf4bc1a5d Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 15 Sep 2022 18:27:48 +0200 Subject: [PATCH 385/915] Support macOS in wallpaper.el * lisp/image/wallpaper.el (wallpaper--default-commands) (wallpaper-command): Support macOS using "osascript". (wallpaper-set): Display image name when wallpaper-debug is t. --- lisp/image/wallpaper.el | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index b5ce7355cd0..d024d6238cb 100644 --- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -31,6 +31,10 @@ ;; On Haiku, it uses the `haiku-set-wallpaper' function, which does ;; not rely on any external commands. ;; +;; On macOS, the "osascript" command is used. You might need to +;; disable the option "Change picture" in the "Desktop & Screensaver" +;; preferences for this to work (this was seen with macOS 10.13). +;; ;; Finding an external command to use is obviously a bit tricky to get ;; right, as there is no lack of platforms, window managers, desktop ;; environments and tools. However, it should be detected @@ -57,6 +61,8 @@ ("gsettings" "set" "org.gnome.desktop.background" "picture-uri" "file://%f") ;; KDE Plasma ("plasma-apply-wallpaperimage" "%f") + ;; macOS + ("osascript" "-e" "tell application \"Finder\" to set desktop picture to POSIX file \"%f\"") ;; Other / General X ("gm" "display" "-size" "%wx%h" "-window" "root" "%f") ("display" "-resize" "%wx%h" "-window" "root" "%f") @@ -157,7 +163,8 @@ native API will be used instead (see `haiku-set-wallpaper')." (const :tag "xwallpaper (X Window System)" "xwallpaper") (const :tag "hsetroot (X Window System)" "hsetroot") (const :tag "xloadimage (X Window System)" "xloadimage") - (const :tag "xsetbg (X Window System)" "xsetbg")) + (const :tag "xsetbg (X Window System)" "xsetbg") + (const :tag "osascript (macOS)" "osascript")) (const :tag "Other (specify)" string)) :set #'wallpaper--set-wallpaper-command :group 'image @@ -241,6 +248,7 @@ On Haiku, no external command is needed, so the value of (error "No such file: %s" file)) (unless (file-readable-p file) (error "File is not readable: %s" file)) + (wallpaper-debug "Using image %S:" file) (cond ((eq system-type 'windows-nt) (w32-set-wallpaper file)) ((featurep 'haiku) From 3ba47a0782f7059062ca6743b22c40a410933f13 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 15 Sep 2022 18:48:41 +0200 Subject: [PATCH 386/915] Improve error when wallpaper-command is nil * lisp/image/wallpaper.el (wallpaper-set): Improve the error message when 'wallpaper-command' is nil. --- lisp/image/wallpaper.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index d024d6238cb..fe6882a5880 100644 --- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -254,6 +254,8 @@ On Haiku, no external command is needed, so the value of ((featurep 'haiku) (haiku-set-wallpaper file)) (t + (unless wallpaper-command + (error "Couldn't find a command to set the wallpaper with")) (let* ((fmt-spec `((?f . ,(expand-file-name file)) (?h . ,(wallpaper--get-height-or-width "height" From 4907859ee039f0d707b21050c2dec7d49f571590 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 15 Sep 2022 19:12:10 +0200 Subject: [PATCH 387/915] Document MS-Windows support in wallpaper.el * lisp/image/wallpaper.el: Add MS-Windows to Commentary. (wallpaper-command, wallpaper-command-args, wallpaper-set): Document MS-Windows support. --- etc/NEWS | 4 ++-- lisp/image/wallpaper.el | 30 ++++++++++++++++-------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index cc68cd82b86..72c330f5f77 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2467,8 +2467,8 @@ This package provides the command 'wallpaper-set', which sets the desktop background image. Depending on the system and the desktop, this may require an external program (such as 'swaybg', 'gm', 'display' or 'xloadimage'). If so, a suitable command should be -detected automatically in most cases, and can also be customized -manually if needed using the new user options 'wallpaper-command' and +detected automatically in most cases. It can also be customized +manually if needed, using the new user options 'wallpaper-command' and 'wallpaper-command-args'. +++ diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index fe6882a5880..5622f9b8e8a 100644 --- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -28,19 +28,21 @@ ;; On GNU/Linux and other Unix-like systems, it uses an external ;; command to set the desktop background. ;; -;; On Haiku, it uses the `haiku-set-wallpaper' function, which does -;; not rely on any external commands. -;; -;; On macOS, the "osascript" command is used. You might need to -;; disable the option "Change picture" in the "Desktop & Screensaver" -;; preferences for this to work (this was seen with macOS 10.13). -;; ;; Finding an external command to use is obviously a bit tricky to get ;; right, as there is no lack of platforms, window managers, desktop ;; environments and tools. However, it should be detected ;; automatically in most cases. If it doesn't work in your ;; environment, customize the user options `wallpaper-command' and ;; `wallpaper-command-args'. +;; +;; On MS-Windows, it uses the `w32-set-wallpaper' function, and on +;; Haiku the `haiku-set-wallpaper' function, neither of which relies +;; on any external commands. The value of `wallpaper-command' and +;; `wallpaper-command-args' are ignored on such systems. +;; +;; On macOS, the "osascript" command is used. You might need to +;; disable the option "Change picture" in the "Desktop & Screensaver" +;; preferences for this to work (this was seen with macOS 10.13). ;;; Code: @@ -131,7 +133,7 @@ Used to set `wallpaper-command'." (wallpaper--find-command-arguments)))) (defcustom wallpaper-command (wallpaper--find-command) - "Executable used for setting the wallpaper. + "Executable used by `wallpaper-set' for setting the wallpaper. A suitable command for your environment should be detected automatically, so there is usually no need to customize this. @@ -147,8 +149,8 @@ hear about it! Please send an email to bug-gnu-emacs@gnu.org and tell us the command (and all options) that worked for you. You can also use \\[report-emacs-bug]. -The value of this variable is ignored on Haiku systems, where a -native API will be used instead (see `haiku-set-wallpaper')." +The value of this variable is ignored on MS-Windows and Haiku +systems, where a native API is used instead." :type '(choice (radio @@ -186,8 +188,8 @@ returned by `display-pixel-width'). If `wallpaper-set' is run from a TTY frame, it will prompt for a height and width for \"%h\" and \"%w\" instead. -The value of this variable is ignored on Haiku systems, where a -native API will be used instead (see `haiku-set-wallpaper')." +The value of this variable is ignored on MS-Windows and Haiku +systems, where a native API is used instead." :type '(repeat string) :group 'image :version "29.1") @@ -233,8 +235,8 @@ external command. Which command to use is automatically detected in most cases, but can be manually customized with the user options `wallpaper-command' and `wallpaper-command-args'. -On Haiku, no external command is needed, so the value of -`wallpaper-commands' is ignored." +On MS-Windows and Haiku systems, no external command is needed, +so the value of `wallpaper-commands' is ignored." (interactive (list (and (display-graphic-p) (read-file-name "Set desktop background to: " From 3c1579697ff03d3991b41ead503211cffac0998f Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 15 Sep 2022 19:21:51 +0200 Subject: [PATCH 388/915] ; Fix wallpaper-set on TTY * lisp/image/wallpaper.el (wallpaper-set): Don't check for 'display-graphic-p', to allow setting the wallpaper from a TTY. --- lisp/image/wallpaper.el | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index 5622f9b8e8a..16fc9d23ecb 100644 --- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -237,13 +237,11 @@ options `wallpaper-command' and `wallpaper-command-args'. On MS-Windows and Haiku systems, no external command is needed, so the value of `wallpaper-commands' is ignored." - (interactive (list (and - (display-graphic-p) - (read-file-name "Set desktop background to: " - default-directory nil t nil - (lambda (fn) - (or (file-directory-p fn) - (string-match (image-file-name-regexp) fn))))))) + (interactive (list (read-file-name "Set desktop background to: " + default-directory nil t nil + (lambda (fn) + (or (file-directory-p fn) + (string-match (image-file-name-regexp) fn)))))) (when (file-directory-p file) (error "Can't set wallpaper to a directory: %s" file)) (unless (file-exists-p file) From a057d41c7577c0e7089dd259fd8edf75f636c7a1 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Thu, 15 Sep 2022 19:54:22 +0000 Subject: [PATCH 389/915] CC Mode: Handle C++20 modules * lisp/progmodes/cc-engine.el (c-before-after-change-check-c++-modules): New function. (c-forward-<>-arglist): Add special handling for "import <...>". * lisp/progmodes/cc-fonts.el (c-preprocessor-face-name): Add extra "fallback" face after font-lock-reference-face, namely font-lock-constant-face. (c-cpp-matchers): Don't fontify the <> delimiters for XEmacs in #include <..>. (c-basic-matchers-before): Add c-font-lock-c++-modules to the C++ value. (c-forward-c++-module-name, c-forward-c++-module-partition-name) (c-font-lock-c++-modules): New functions. * lisp/progmodes/cc-langs.el (c-get-state-before-change-functions) (c-before-font-lock-functions): Include c-before-after-change-check-c++-modules in the C++ value of these variables. (c-module-name-re): New c-lang-const/var. (c-other-decl-kwds): Add a C++ value "export". (c-<>-sexp-kwds): Add a new component c-import-<>-kwds. (c-import-<>-kwds, c-module-kwds): New c-lang-consts. (c-module-key): New c-lang-const/var. --- lisp/progmodes/cc-engine.el | 85 ++++++++++++++---- lisp/progmodes/cc-fonts.el | 173 +++++++++++++++++++++++++++++++++++- lisp/progmodes/cc-langs.el | 35 +++++++- 3 files changed, 270 insertions(+), 23 deletions(-) diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index 94225d6e3e9..1127ffe2498 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -8155,6 +8155,40 @@ multi-line strings (but not C++, for example)." (c-clear-char-property c-neutralize-pos 'syntax-table)) (c-truncate-lit-pos-cache c-neutralize-pos))) + +(defun c-before-after-change-check-c++-modules (beg end &optional _old_len) + ;; Extend the region (c-new-BEG c-new-END) as needed to enclose complete + ;; C++20 module statements. This function is called solely from + ;; `c-get-state-before-change-functions' and `c-before-font-lock-functions' + ;; as part of the before-change and after-change processing for C++. + ;; + ;; Point is undefined both on entry and exit, and the return value has no + ;; significance. + (c-save-buffer-state (res bos lit-start) + (goto-char end) + (if (setq lit-start (c-literal-start)) + (goto-char lit-start)) + (when (>= (point) beg) + (setq res (c-beginning-of-statement-1 nil t)) ; t is IGNORE-LABELS + (setq bos (point)) + (when (and (memq res '(same previous)) + (looking-at c-module-key)) + (setq c-new-BEG (min c-new-BEG (point))) + (if (c-syntactic-re-search-forward + ";" (min (+ (point) 500) (point-max)) t) + (setq c-new-END (max c-new-END (point)))))) + (when (or (not bos) (< beg bos)) + (goto-char beg) + (when (not (c-literal-start)) + (setq res (c-beginning-of-statement-1 nil t)) + (setq bos (point)) + (when (and (memq res '(same previous)) + (looking-at c-module-key)) + (setq c-new-BEG (min c-new-BEG (point))) + (if (c-syntactic-re-search-forward + ";" (min (+ (point) 500) (point-max)) t) + (setq c-new-END (max c-new-END (point))))))))) + ;; Handling of small scale constructs like types and names. @@ -8474,25 +8508,40 @@ multi-line strings (but not C++, for example)." ;; recording of any found types that constitute an argument in ;; the arglist. (c-record-found-types (if c-record-type-identifiers t))) - (if (catch 'angle-bracket-arglist-escape - (setq c-record-found-types - (c-forward-<>-arglist-recur all-types))) - (progn - (when (consp c-record-found-types) - (let ((cur c-record-found-types)) - (while (consp (car-safe cur)) - (c-fontify-new-found-type - (buffer-substring-no-properties (caar cur) (cdar cur))) - (setq cur (cdr cur)))) - (setq c-record-type-identifiers - ;; `nconc' doesn't mind that the tail of - ;; `c-record-found-types' is t. - (nconc c-record-found-types c-record-type-identifiers))) - t) + ;; Special handling for C++20's "import <...>" operator. + (if (and (c-major-mode-is 'c++-mode) + (save-excursion + (and (zerop (c-backward-token-2)) + (looking-at "import\\>\\(?:[^_$]\\|$\\)")))) + (when (looking-at "<\\(?:\\\\.\\|[^\\\n\r\t>]\\)*\\(>\\)?") + (if (match-beginning 1) ; A terminated <..> + (progn + (when c-parse-and-markup-<>-arglists + (c-mark-<-as-paren (point)) + (c-mark->-as-paren (match-beginning 1)) + (c-truncate-lit-pos-cache (point))) + (goto-char (match-end 1)) + t) + nil)) + (if (catch 'angle-bracket-arglist-escape + (setq c-record-found-types + (c-forward-<>-arglist-recur all-types))) + (progn + (when (consp c-record-found-types) + (let ((cur c-record-found-types)) + (while (consp (car-safe cur)) + (c-fontify-new-found-type + (buffer-substring-no-properties (caar cur) (cdar cur))) + (setq cur (cdr cur)))) + (setq c-record-type-identifiers + ;; `nconc' doesn't mind that the tail of + ;; `c-record-found-types' is t. + (nconc c-record-found-types c-record-type-identifiers))) + t) - (setq c-found-types old-found-types) - (goto-char start) - nil))) + (setq c-found-types old-found-types) + (goto-char start) + nil)))) (defun c-forward-<>-arglist-recur (all-types) ;; Recursive part of `c-forward-<>-arglist'. diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index f34f7f177db..c52f4a8416b 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -112,8 +112,10 @@ ;; In Emacs font-lock-builtin-face has traditionally been ;; used for preprocessor directives. 'font-lock-builtin-face) - (t - 'font-lock-reference-face))) + ((and (c-face-name-p 'font-lock-reference-face) + (eq font-lock-reference-face 'font-lock-reference-face)) + 'font-lock-reference-face) + (t 'font-lock-constant-face))) (cc-bytecomp-defvar font-lock-constant-face) @@ -558,8 +560,10 @@ stuff. Used on level 1 and higher." (c-lang-const c-opt-cpp-prefix) re (c-lang-const c-syntactic-ws) - "\\(<[^>\n\r]*>?\\)") - `(,(+ ncle-depth re-depth sws-depth 1) + "\\(<\\([^>\n\r]*\\)>?\\)") + `(,(+ ncle-depth re-depth sws-depth + (if (featurep 'xemacs) 2 1) + ) font-lock-string-face t) `((let ((beg (match-beginning ,(+ ncle-depth re-depth sws-depth 1))) @@ -878,6 +882,10 @@ casts and declarations are fontified. Used on level 2 and higher." c-reference-face-name)) (goto-char (match-end 1)))))))))) + ;; Module declarations (e.g. in C++20). + ,@(when (c-major-mode-is 'c++-mode) + '(c-font-lock-c++-modules)) + ;; Fontify the special declarations in Objective-C. ,@(when (c-major-mode-is 'objc-mode) `(;; Fontify class names in the beginning of message expressions. @@ -1909,6 +1917,163 @@ casts and declarations are fontified. Used on level 2 and higher." (forward-char))))) ; over the terminating "]" or other close paren. nil) +(defun c-forward-c++-module-name (limit) + ;; Is there a C++20 module name at point? If so, return a cons of the start + ;; and end of that name, in which case point will be moved over the name and + ;; following whitespace. Otherwise nil will be returned and point will be + ;; unmoved. This function doesn't regard a partition as part of the name. + ;; The entire construct must end not after LIMIT. + (when (and + (looking-at c-module-name-re) + (<= (match-end 0) limit) + (not (looking-at c-keywords-regexp))) + (goto-char (match-end 0)) + (prog1 (cons (match-beginning 0) (match-end 0)) + (c-forward-syntactic-ws limit)))) + +(defun c-forward-c++-module-partition-name (limit) + ;; Is there a C++20 module partition name (starting with its colon) at + ;; point? If so return a cons of the start and end of the name, not + ;; including the colon, in which case point will be move to after the name + ;; and following whitespace. Otherwise nil will be returned and point not + ;; moved. The entire construct must end not after LIMIT. + (when (and + (eq (char-after) ?:) + (progn + (forward-char) + (c-forward-syntactic-ws limit) + (looking-at c-module-name-re)) + (<= (match-end 0) limit) + (not (looking-at c-keywords-regexp))) + (goto-char (match-end 0)) + (prog1 (cons (match-beginning 0) (match-end 0)) + (c-forward-syntactic-ws limit)))) + +(defun c-font-lock-c++-modules (limit) + ;; Fontify the C++20 module stanzas, characterised by the keywords `module', + ;; `export' and `import'. Note that this has to be done by a function (as + ;; opposed to regexps) due to the presence of optional C++ attributes. + ;; + ;; This function will be called from font-lock for a region bounded by POINT + ;; and LIMIT, as though it were to identify a keyword for + ;; font-lock-keyword-face. It always returns NIL to inhibit this and + ;; prevent a repeat invocation. See elisp/lispref page "Search-based + ;; Fontification". + (while (and (< (point) limit) + (re-search-forward + "\\<\\(module\\|export\\|import\\)\\>\\(?:[^_$]\\|$\\)" + limit t)) + (goto-char (match-end 1)) + (let (name-bounds pos beg end + module-names) ; A list of conses of start and end + ; of pertinent module names + (unless (c-skip-comments-and-strings limit) + (when + (cond + ;; module foo...; Note we don't handle module; or module + ;; :private; here, since they don't really need handling. + ((save-excursion + (when (equal (match-string-no-properties 1) "export") + (c-forward-syntactic-ws limit) + (re-search-forward "\\=\\(module\\)\\>\\(?:[^_$]\\|$\\)" + limit t)) + (and (equal (match-string-no-properties 1) "module") + (< (point) limit) + (progn (c-forward-syntactic-ws limit) + (setq name-bounds (c-forward-c++-module-name + limit))) + (setq pos (point)))) + (push name-bounds module-names) + (goto-char pos) + ;; Is there a partition name? + (when (setq name-bounds (c-forward-c++-module-partition-name + limit)) + (push name-bounds module-names)) + t) + + ;; import + ((save-excursion + (when (equal (match-string-no-properties 1) "export") + (c-forward-syntactic-ws limit) + (re-search-forward "\\=\\(import\\)\\>\\(?:[^_$]\\|$\\)" + limit t)) + (and (equal (match-string-no-properties 1) "import") + (< (point) limit) + (progn (c-forward-syntactic-ws limit) + (setq pos (point))))) + (goto-char pos) + (cond + ;; import foo; + ((setq name-bounds (c-forward-c++-module-name limit)) + (push name-bounds module-names) + t) + ;; import :foo; + ((setq name-bounds (c-forward-c++-module-partition-name limit)) + (push name-bounds module-names) + t) + ;; import "foo"; + ((and (eq (char-after) ?\") + (setq pos (point)) + (c-safe (c-forward-sexp) t)) ; Should already have string face. + (when (eq (char-before) ?\") + (setq beg pos + end (point))) + (c-forward-syntactic-ws limit) + t) + ;; import ; + ((and (looking-at "<\\(?:\\\\.\\|[^\\\n\r\t>]\\)*\\(>\\)?") + (< (match-end 0) limit)) + (setq beg (point)) + (goto-char (match-end 0)) + (when (match-end 1) + (setq end (point))) + (if (featurep 'xemacs) + (c-put-font-lock-face + (1+ beg) (if end (1- end) (point)) font-lock-string-face) + (c-put-font-lock-face + beg (or end (point)) font-lock-string-face)) + (c-forward-syntactic-ws limit) + t) + (t nil))) + + ;; export + ;; There is no fontification to be done here, but we need to + ;; skip over the declaration or declaration sequence. + ((save-excursion + (when (equal (match-string-no-properties 0) "export") + (c-forward-syntactic-ws limit) + (setq pos (point)))) + (goto-char (point)) + (if (eq (char-after) ?{) + ;; Declaration sequence. + (unless (and (c-go-list-forward nil limit) + (eq (char-before) ?})) + (goto-char limit) + nil) + ;; Single declaration + (unless (c-end-of-decl-1) + (goto-char limit) + nil)))) ; Nothing more to do, here. + + ;; Optional attributes? + (while (and (c-looking-at-c++-attribute) + (< (match-end 0) limit)) + (goto-char (match-end 0)) + (c-forward-syntactic-ws limit)) + ;; Finally, there must be a semicolon. + (if (and (< (point) limit) + (eq (char-after) ?\;)) + (progn + (forward-char) + ;; Fontify any module names we've encountered. + (dolist (name module-names) + (c-put-font-lock-face (car name) (cdr name) + c-reference-face-name))) + ;; No semicolon, so put warning faces on any delimiters. + (when beg + (c-put-font-lock-face beg (1+ beg) font-lock-warning-face)) + (when end + (c-put-font-lock-face (1- end) end font-lock-warning-face)))))))) (c-lang-defconst c-simple-decl-matchers "Simple font lock matchers for types and declarations. These are used diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index bf7eee22834..d33ed4bcda5 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -456,6 +456,7 @@ so that all identifiers are recognized as words.") c-depropertize-CPP c-before-change-check-ml-strings c-before-change-check-<>-operators + c-before-after-change-check-c++-modules c-truncate-bs-cache c-before-change-check-unbalanced-strings c-parse-quotes-before-change @@ -516,6 +517,7 @@ parameters \(point-min) and \(point-max).") c-parse-quotes-after-change c-after-change-mark-abnormal-strings c-extend-font-lock-region-for-macros + c-before-after-change-check-c++-modules c-neutralize-syntax-in-CPP c-restore-<>-properties c-change-expand-fl-region) @@ -1018,6 +1020,16 @@ e.g. identifiers with template arguments such as \"A\" in C++." ""))) (c-lang-defvar c-identifier-key (c-lang-const c-identifier-key)) +(c-lang-defconst c-module-name-re + "This regexp matches (a component of) a module name. +Currently (2022-09) just C++ Mode uses this." + t nil + c++ (concat (c-lang-const c-symbol-key) + "\\(?:\\." + (c-lang-const c-symbol-key) + "\\)*")) +(c-lang-defvar c-module-name-re (c-lang-const c-module-name-re)) + (c-lang-defconst c-identifier-last-sym-match ;; This was a docstring constant in 5.30 but it's no longer used. ;; It's only kept to avoid breaking third party code. @@ -2624,6 +2636,7 @@ If any of these also are on `c-type-list-kwds', `c-ref-list-kwds', `c-<>-type-kwds', or `c-<>-arglist-kwds' then the associated clauses will be handled." t nil + c++ '("export") objc '("@class" "@defs" "@end" "@property" "@dynamic" "@synthesize" "@compatibility_alias") java '("import" "package") @@ -2937,7 +2950,8 @@ assumed to be set if this isn't nil." (c-lang-defconst c-<>-sexp-kwds ;; All keywords that can be followed by an angle bracket sexp. t (c--delete-duplicates (append (c-lang-const c-<>-type-kwds) - (c-lang-const c-<>-arglist-kwds)) + (c-lang-const c-<>-arglist-kwds) + (c-lang-const c-import-<>-kwds)) :test 'string-equal)) (c-lang-defconst c-opt-<>-sexp-key @@ -3099,6 +3113,25 @@ This construct is \" :\"." idl nil awk nil) +(c-lang-defconst c-import-<>-kwds + "Keywords which can start an expression like \"import <...>\" in C++20. +The <, and > operators are like those of #include <...>, they are +not really template operators." + t nil + c++ '("import")) + +(c-lang-defconst c-module-kwds + "The keywords which introduce module constructs in C++20 onwards." + t nil + c++ '("module" "import" "export")) + +(c-lang-defconst c-module-key + ;; Adorned regexp matching module declaration keywords, or nil if there are + ;; none. + t (if (c-lang-const c-module-kwds) + (c-make-keywords-re t (c-lang-const c-module-kwds)))) +(c-lang-defvar c-module-key (c-lang-const c-module-key)) + (c-lang-defconst c-constant-kwds "Keywords for constants." t nil From bfc4393040037a3dd17531e6e9dcfa6990a3c33d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Thu, 15 Sep 2022 21:59:16 +0200 Subject: [PATCH 390/915] Include nil as valid wallpaper-commmand * lisp/image/wallpaper.el (wallpaper-command): Include nil in the type since that is a valid value for the variable, and may be the default value. This should fix test-custom-opts. --- lisp/image/wallpaper.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index 16fc9d23ecb..9572349c366 100644 --- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -167,7 +167,8 @@ systems, where a native API is used instead." (const :tag "xloadimage (X Window System)" "xloadimage") (const :tag "xsetbg (X Window System)" "xsetbg") (const :tag "osascript (macOS)" "osascript")) - (const :tag "Other (specify)" string)) + (const :tag "Other (specify)" string) + (const :tag "None" nil)) :set #'wallpaper--set-wallpaper-command :group 'image :version "29.1") From c6fc00f5d75a28fd4e99050ccc1af9ad82f66b2b Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 15 Sep 2022 22:08:19 +0200 Subject: [PATCH 391/915] Make image-dired-toggle-mark-thumb-original-file obsolete * lisp/image/image-dired.el (image-dired-toggle-mark-thumb-original-file): Make obsolete. (image-dired-mouse-toggle-mark-1): Don't use above obsolete function. --- lisp/image/image-dired.el | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index 75dcdd8cbc2..df4ee071338 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -785,14 +785,6 @@ according to `image-dired-marking-shows-next'." (image-dired--do-mark-command t (dired-flag-file-deletion 1))) -(defun image-dired-toggle-mark-thumb-original-file () - "Toggle mark on original image file in associated Dired buffer." - (interactive nil image-dired-thumbnail-mode image-dired-display-image-mode) - (image-dired--do-mark-command nil - (if (image-dired-dired-file-marked-p) - (dired-unmark 1) - (dired-mark 1)))) - (defun image-dired-unmark-all-marks () "Remove all marks from all files in associated Dired buffer. Also update the marks in the thumbnail buffer." @@ -1261,7 +1253,10 @@ Track this in associated Dired buffer if `image-dired-track-movement' is non-nil." (when image-dired-track-movement (image-dired-track-original-file)) - (image-dired-toggle-mark-thumb-original-file)) + (image-dired--do-mark-command nil + (if (image-dired-dired-file-marked-p) + (dired-unmark 1) + (dired-mark 1)))) (defun image-dired-mouse-toggle-mark (event) "Use mouse EVENT to toggle Dired mark for thumbnail. @@ -1372,6 +1367,15 @@ completely fit)." (make-obsolete-variable 'image-dired-display-window-height-correction "no longer used." "29.1") +(defun image-dired-toggle-mark-thumb-original-file () + "Toggle mark on original image file in associated Dired buffer." + (declare (obsolete nil "29.1")) + (interactive nil image-dired-thumbnail-mode image-dired-display-image-mode) + (image-dired--do-mark-command nil + (if (image-dired-dired-file-marked-p) + (dired-unmark 1) + (dired-mark 1)))) + (defun image-dired-display-window-width (window) "Return width, in pixels, of WINDOW." (declare (obsolete nil "29.1")) From bb76ab015a247d2547a9e6778e50ffb38988f47e Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 15 Sep 2022 22:19:00 +0200 Subject: [PATCH 392/915] image-dired: Fix performance bug with mouse click * lisp/image/image-dired.el (image-dired--on-file-in-dired-buffer): Move call to 'image-dired-thumb-update-marks' from here... (image-dired--do-mark-command): ...to here. Add new optional argument UPDATE to control calling it. Update callers. (image-dired-mouse-toggle-mark-1): Fix performance bug by setting above new optional argument to nil. (Bug#53599) --- lisp/image/image-dired.el | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index df4ee071338..12a94974b1f 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -750,18 +750,20 @@ Should be called from commands in `image-dired-thumbnail-mode'." (message "No image, or image with correct properties, at point") (with-current-buffer dired-buf (when (dired-goto-file file-name) - ,@body - (image-dired-thumb-update-marks)))))) + ,@body))))) -(defmacro image-dired--do-mark-command (maybe-next &rest body) +(defmacro image-dired--do-mark-command (maybe-next update &rest body) "Helper macro for the mark, unmark and flag commands. Run BODY in Dired buffer. -If optional argument MAYBE-NEXT is non-nil, show next image -according to `image-dired-marking-shows-next'." +If MAYBE-NEXT is non-nil, show next image according to +`image-dired-marking-shows-next'. +If UPDATE is non-nil, call `image-dired-thumb-update-marks' too." (declare (indent defun) (debug t)) `(image-dired--with-thumbnail-buffer (image-dired--on-file-in-dired-buffer ,@body) + ,(when update + '(image-dired-thumb-update-marks)) ,(when maybe-next '(if image-dired-marking-shows-next (image-dired-display-next-thumbnail-original) @@ -770,26 +772,26 @@ according to `image-dired-marking-shows-next'." (defun image-dired-mark-thumb-original-file () "Mark original image file in associated Dired buffer." (interactive nil image-dired-thumbnail-mode image-dired-display-image-mode) - (image-dired--do-mark-command t + (image-dired--do-mark-command t t (dired-mark 1))) (defun image-dired-unmark-thumb-original-file () "Unmark original image file in associated Dired buffer." (interactive nil image-dired-thumbnail-mode image-dired-display-image-mode) - (image-dired--do-mark-command t + (image-dired--do-mark-command t t (dired-unmark 1))) (defun image-dired-flag-thumb-original-file () "Flag original image file for deletion in associated Dired buffer." (interactive nil image-dired-thumbnail-mode image-dired-display-image-mode) - (image-dired--do-mark-command t + (image-dired--do-mark-command t t (dired-flag-file-deletion 1))) (defun image-dired-unmark-all-marks () "Remove all marks from all files in associated Dired buffer. Also update the marks in the thumbnail buffer." (interactive nil image-dired-thumbnail-mode image-dired-display-image-mode) - (image-dired--do-mark-command nil + (image-dired--do-mark-command nil t (dired-unmark-all-marks)) (image-dired--with-thumbnail-buffer (image-dired-thumb-update-marks))) @@ -1253,7 +1255,7 @@ Track this in associated Dired buffer if `image-dired-track-movement' is non-nil." (when image-dired-track-movement (image-dired-track-original-file)) - (image-dired--do-mark-command nil + (image-dired--do-mark-command nil nil (if (image-dired-dired-file-marked-p) (dired-unmark 1) (dired-mark 1)))) @@ -1371,7 +1373,7 @@ completely fit)." "Toggle mark on original image file in associated Dired buffer." (declare (obsolete nil "29.1")) (interactive nil image-dired-thumbnail-mode image-dired-display-image-mode) - (image-dired--do-mark-command nil + (image-dired--do-mark-command nil t (if (image-dired-dired-file-marked-p) (dired-unmark 1) (dired-mark 1)))) From c99815fffad7a320c35a516548fd67fedaf0e732 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 15 Sep 2022 16:31:00 -0400 Subject: [PATCH 393/915] combine-change-calls-1: Fix case where `body` also changes other bufs * lisp/subr.el (combine-change-calls-1): Only set the current buffer's part of the `*-change-functions` hooks. --- lisp/subr.el | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index 8769fec2b95..bfc2e207b2c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4823,16 +4823,26 @@ the function `undo--wrap-and-run-primitive-undo'." (let ((undo--combining-change-calls t)) (if (not inhibit-modification-hooks) (run-hook-with-args 'before-change-functions beg end)) - (let (;; (inhibit-modification-hooks t) - (before-change-functions - ;; Ugly Hack: if the body uses syntax-ppss/syntax-propertize - ;; (e.g. via a regexp-search or sexp-movement triggering - ;; on-the-fly syntax-propertize), make sure that this gets - ;; properly refreshed after subsequent changes. - (if (memq #'syntax-ppss-flush-cache before-change-functions) - '(syntax-ppss-flush-cache))) - after-change-functions) - (setq result (funcall body))) + (let ((bcf before-change-functions) + (acf after-change-functions) + (local-bcf (local-variable-p 'before-change-functions)) + (local-acf (local-variable-p 'after-change-functions))) + (unwind-protect + ;; FIXME: WIBNI we could just use `inhibit-modification-hooks'? + (progn + ;; Ugly Hack: if the body uses syntax-ppss/syntax-propertize + ;; (e.g. via a regexp-search or sexp-movement triggering + ;; on-the-fly syntax-propertize), make sure that this gets + ;; properly refreshed after subsequent changes. + (setq-local before-change-functions + (if (memq #'syntax-ppss-flush-cache bcf) + '(syntax-ppss-flush-cache))) + (setq-local after-change-functions nil) + (setq result (funcall body))) + (if local-bcf (setq before-change-functions bcf) + (kill-local-variable 'before-change-functions)) + (if local-acf (setq after-change-functions acf) + (kill-local-variable 'after-change-functions)))) (when (not (eq buffer-undo-list t)) (let ((ap-elt (list 'apply From c3828d47dd0f97bcb1eaef1a29b614a6ae463e52 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 15 Sep 2022 23:34:41 +0200 Subject: [PATCH 394/915] image-dired: Show header line on start * lisp/image/image-dired.el (image-dired-show-all-from-dir): Update header line, to ensure that it is immediately visible on start. --- lisp/image/image-dired.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index 12a94974b1f..a7ca60dd37c 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -551,6 +551,7 @@ never ask for confirmation." (image-dired-display-thumbs) (pop-to-buffer image-dired-thumbnail-buffer) (setq default-directory dir) + (image-dired-update-header-line) (image-dired-unmark-all-marks)) (t (message "Image-Dired canceled"))))) From 89084a193ef5bef813d9f9f5640a83882371beb9 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 15 Sep 2022 23:56:11 +0200 Subject: [PATCH 395/915] Improve image-dired-display-properties-format * lisp/image/image-dired.el (image-dired-display-properties-format): Change default format, improve docstring and add :safe property --- etc/NEWS | 6 ++++++ lisp/image/image-dired.el | 19 ++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 72c330f5f77..e2b5f5fde37 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2093,6 +2093,12 @@ next image. This replaces the message most navigation commands in the thumbnail buffer used to show at the bottom of the screen. +--- +*** 'image-dired-display-properties-format' default has changed. +If you prefer the old format, add this to your Init file: + + (setopt image-dired-display-properties-format "%b: %f (%t): %c") + +++ *** 'image-dired-show-all-from-dir-max-files' increased to 1000. This user option controls asking for confirmation when starting diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index a7ca60dd37c..e25241274c1 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -293,12 +293,21 @@ For more information, see the documentation for `image-dired-toggle-movement-tracking'." :type 'boolean) -(defcustom image-dired-display-properties-format "%b: %f (%t): %c" +(defcustom image-dired-display-properties-format "%-40f %b %t %c" "Display format for thumbnail properties. -%b is replaced with associated Dired buffer name, %f with file -name (without path) of original image file, %t with the list of -tags and %c with the comment." - :type 'string) +This is used for the header line in the Image-Dired buffer. + +The following %-specs are replaced by `format-spec' before +displaying: + + \"%b\" The associated Dired buffer name. + \"%f\" The file name (without a directory) of the + original image file. + \"%t\" The list of tags (from the Image-Dired database). + \"%c\" The comment (from the Image-Dired database)." + :type 'string + :safe #'stringp + :version "29.1") (defcustom image-dired-external-viewer ;; TODO: Use mailcap, dired-guess-shell-alist-default, From 45459fd73b6546bff9bfa6c840da672c45dc40c5 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 00:22:27 +0200 Subject: [PATCH 396/915] ; * etc/NEWS: Improve and re-arrange Image-Dired section. --- etc/NEWS | 133 +++++++++++++++++++++++++++++-------------------------- 1 file changed, 69 insertions(+), 64 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index e2b5f5fde37..dd63efb02d8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2009,55 +2009,22 @@ This is done via 'image-converter-add-handler'. This avoids converting images in the background, and makes Image-Dired noticeably faster. New keybindings from 'image-mode' are now available in the "*image-dired-display-image*" buffer; press '?' or -'h' in that buffer to see the full list. Finally, some commands and -user options that are no longer needed are now obsolete: -'image-dired-cmd-create-temp-image-options', -'image-dired-cmd-create-temp-image-program', -'image-dired-display-current-image-full', -'image-dired-display-current-image-sized', -'image-dired-display-window-height-correction', -'image-dired-display-window-width-correction', -'image-dired-temp-image-file'. +'h' in that buffer to see the full list. --- *** Navigation and marking commands now work in image display buffer. The following new bindings have been added: - - n or SPC image-dired-display-next-thumbnail-original - p or DEL image-dired-display-previous-thumbnail-original - m image-dired-mark-thumb-original-file - d image-dired-flag-thumb-original-file - u image-dired-unmark-thumb-original-file +- 'n', 'SPC' => 'image-dired-display-next-thumbnail-original' +- 'p', 'DEL' => 'image-dired-display-previous-thumbnail-original' +- 'm' => 'image-dired-mark-thumb-original-file' +- 'd' => 'image-dired-flag-thumb-original-file' +- 'u' => 'image-dired-unmark-thumb-original-file' --- -*** Reduce dependency on external "exiftool" command. -The 'image-dired-copy-with-exif-file-name' no longer requires an -external "exiftool" command to be available. The user options -'image-dired-cmd-read-exif-data-program' and -'image-dired-cmd-read-exif-data-options' are now obsolete. - ---- -*** New command for the thumbnail buffer. -The new command 'image-dired-unmark-all-marks' has been added. It is -bound to 'U' in the thumbnail and display buffer. - ---- -*** Support Thumbnail Managing Standard v0.9.0 (Dec 2020). -This standard allows sharing generated thumbnails across different -programs. Version 0.9.0 adds two larger thumbnail sizes: 512x512 and -1024x1024 pixels. See the user option 'image-dired-thumbnail-storage' -to use it; it is not enabled by default. - ---- -*** Support GraphicsMagick command line tools. -Support for the GraphicsMagick command line tool ("gm") has been -added, and is used instead of ImageMagick when it is available. - ---- -*** New face 'image-dired-thumb-flagged'. -If 'image-dired-thumb-mark' is non-nil (the default), this face is -used for images that are flagged for deletion in the Dired buffer -associated with Image-Dired. +*** New command 'image-dired-unmark-all-marks'. +It removes all marks from all files in the thumbnail and the +associated Dired buffer, and is bound to 'U' in the thumbnail and +display buffer. --- *** New command 'image-dired-wallpaper-set'. @@ -2069,12 +2036,40 @@ thumbnail buffer. It is bound to 'W' by default. It is bound in both the thumbnail and display buffer. --- -*** The 'image-dired-slideshow-start' command no longer prompts. -It no longer inconveniently prompts for a number of images and a -delay: it runs indefinitely, but stops automatically on any command. -You can set the delay with a prefix argument, or a negative prefix -argument to prompt for a delay. Customize the user option -'image-dired-slideshow-delay' to change the default from 5 seconds. +*** New user option 'image-dired-marking-shows-next'. +If this option is non-nil (the default), marking, unmarking or +flagging an image in either the thumbnail or display buffer shows the +next image. + +--- +*** New face 'image-dired-thumb-flagged'. +If 'image-dired-thumb-mark' is non-nil (the default), this face is +used for images that are flagged for deletion in the Dired buffer +associated with Image-Dired. + +--- +*** Image information is now shown in the header line. +This replaces the message most navigation commands in the thumbnail +buffer used to show at the bottom of the screen. + +--- +*** Support GraphicsMagick command line tools. +Support for the GraphicsMagick command line tool ("gm") has been +added, and is used instead of ImageMagick when it is available. + +--- +*** Support Thumbnail Managing Standard v0.9.0 (Dec 2020). +This standard allows sharing generated thumbnails across different +programs. Version 0.9.0 adds two larger thumbnail sizes: 512x512 and +1024x1024 pixels. See the user option 'image-dired-thumbnail-storage' +to use it; it is not enabled by default. + +--- +*** Reduce dependency on external "exiftool" command. +The 'image-dired-copy-with-exif-file-name' no longer requires an +external "exiftool" command to be available. The user options +'image-dired-cmd-read-exif-data-program' and +'image-dired-cmd-read-exif-data-options' are now obsolete. --- *** Support for bookmark.el. @@ -2083,15 +2078,12 @@ the thumbnail view, and will create a bookmark that opens the current directory in Image-Dired. --- -*** New user option 'image-dired-marking-shows-next'. -If this option is non-nil (the default), marking, unmarking or -flagging an image in either the thumbnail or display buffer shows the -next image. - ---- -*** Image information is now shown in the header line. -This replaces the message most navigation commands in the thumbnail -buffer used to show at the bottom of the screen. +*** The 'image-dired-slideshow-start' command no longer prompts. +It no longer inconveniently prompts for a number of images and a +delay: it runs indefinitely, but stops automatically on any command. +You can set the delay with a prefix argument, or a negative prefix +argument to prompt for a delay. Customize the user option +'image-dired-slideshow-delay' to change the default from 5 seconds. --- *** 'image-dired-display-properties-format' default has changed. @@ -2107,12 +2099,6 @@ thumbnails in the background in recent versions, this is not as important as it used to be. You can now also customize this option to nil to disable this confirmation completely. ---- -*** 'image-dired-rotate-thumbnail-(left|right)' is now obsolete. -Instead, use commands 'image-dired-refresh-thumb' to generate a new -thumbnail, or 'image-rotate' to rotate the thumbnail without updating -the thumbnail file. - --- *** HTML image gallery generation is now obsolete. The 'image-dired-gallery-generate' command and these user options are @@ -2120,6 +2106,25 @@ now obsolete: 'image-dired-gallery-thumb-image-root-url', 'image-dired-gallery-hidden-tags', 'image-dired-gallery-dir', 'image-dired-gallery-image-root-url'. +--- +*** 'image-dired-rotate-thumbnail-(left|right)' is now obsolete. +Instead, use commands 'image-dired-refresh-thumb' to generate a new +thumbnail, or 'image-rotate' to rotate the thumbnail without updating +the thumbnail file. + ++++ +*** Some commands and user options are now obsolete. +Since Image-Dired no longer converts images in the background before +displaying them, some commands and user options that are no longer +needed are now obsolete: +'image-dired-cmd-create-temp-image-options', +'image-dired-cmd-create-temp-image-program', +'image-dired-display-current-image-full', +'image-dired-display-current-image-sized', +'image-dired-display-window-height-correction', +'image-dired-display-window-width-correction', +'image-dired-temp-image-file'. + ** Dired --- From 7ec31d32222cdad695bc8324414880be5ca20201 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20M=C3=BCnster?= Date: Fri, 16 Sep 2022 02:21:22 +0200 Subject: [PATCH 397/915] image-dired: Fix thumbnail options for gm * lisp/image/image-dired-external.el (image-dired-cmd-create-standard-thumbnail-options): Fix options for "gm" (GraphicsMagick). (Bug#52200) --- lisp/image/image-dired-external.el | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lisp/image/image-dired-external.el b/lisp/image/image-dired-external.el index 223d881bcfa..3e3a9a44431 100644 --- a/lisp/image/image-dired-external.el +++ b/lisp/image/image-dired-external.el @@ -108,8 +108,8 @@ with the information required by the Thumbnail Managing Standard." "-text" "b" "Thumb::URI" "file://%f" "%q" "%t") "Arguments for `image-dired-cmd-pngcrush-program'. -Available format specifiers are the same as in -`image-dired-cmd-create-thumbnail-options', with %q for a +The available %-format specifiers are the same as in +`image-dired-cmd-create-thumbnail-options', with \"%q\" for a temporary file name (typically generated by pnqnq)." :version "26.1" :type '(repeat (string :tag "Argument"))) @@ -128,20 +128,20 @@ Available format specifiers are described in :link '(url-link "man:optipng(1)")) (defcustom image-dired-cmd-create-standard-thumbnail-options - (append '("-size" "%wx%h" "%f[0]") - (unless (or image-dired-cmd-pngcrush-program - image-dired-cmd-pngnq-program) - (list - "-set" "Thumb::MTime" "%m" - "-set" "Thumb::URI" "file://%f" - "-set" "Description" "Thumbnail of file://%f" - "-set" "Software" (emacs-version))) - '("-thumbnail" "%wx%h>" "png:%t")) + (let ((opts (list + "-size" "%wx%h" "%f[0]" + "-set" "Thumb::MTime" "%m" + "-set" "Thumb::URI" "file://%f" + "-set" "Description" "Thumbnail of file://%f" + "-set" "Software" (emacs-version) + "-thumbnail" "%wx%h>" "png:%t"))) + (if (executable-find "gm") (cons "convert" opts) opts)) "Options for creating thumbnails according to the Thumbnail Managing Standard. -Available format specifiers are the same as in -`image-dired-cmd-create-thumbnail-options', with %m for file modification time." - :version "26.1" - :type '(repeat (string :tag "Argument"))) +The available %-format specifiers are the same as in +`image-dired-cmd-create-thumbnail-options', with \"%m\" for file +modification time." + :type '(repeat (string :tag "Argument")) + :version "29.1") (defcustom image-dired-cmd-rotate-original-program "jpegtran" "Executable used to rotate original image. From e3b79c641e04a9e8681e7e27db3db3e4beec0fa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerd=20M=C3=B6llmann?= Date: Thu, 15 Sep 2022 15:50:12 +0200 Subject: [PATCH 398/915] Fix crash in GC on macOS (bug#57751) * src/nsterm.m ([EmacsView windowDidMove:]): Initialize input_event. --- src/nsterm.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/nsterm.m b/src/nsterm.m index b8b4e66cd11..44979c7c04e 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -7901,7 +7901,6 @@ - (void)windowDidMove: sender NSRect r = [win frame]; NSArray *screens = [NSScreen screens]; NSScreen *screen = [screens objectAtIndex: 0]; - struct input_event ie; NSTRACE ("[EmacsView windowDidMove:]"); @@ -7917,6 +7916,8 @@ - (void)windowDidMove: sender if (emacs_event) { + struct input_event ie; + EVENT_INIT (ie); ie.kind = MOVE_FRAME_EVENT; XSETFRAME (ie.frame_or_window, emacsframe); XSETINT (ie.x, emacsframe->left_pos); From 8b29b296931a20ee9f3b3e19aab07ba71b9a12c1 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 16 Sep 2022 10:09:20 +0300 Subject: [PATCH 399/915] Add outline open/close images (bug#57813) * etc/images/outline-open.svg: * etc/images/outline-close.svg: New files. * lisp/outline.el (outline-open, outline-close): Use images outline-open.svg and outline-close.svg. * lisp/emacs-lisp/icons.el (icons--create): Add :ascent 'center'. --- etc/images/outline-close.svg | 6 ++++++ etc/images/outline-open.svg | 4 ++++ lisp/emacs-lisp/icons.el | 2 +- lisp/outline.el | 10 ++++++---- 4 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 etc/images/outline-close.svg create mode 100644 etc/images/outline-open.svg diff --git a/etc/images/outline-close.svg b/etc/images/outline-close.svg new file mode 100644 index 00000000000..ea9157a5fb5 --- /dev/null +++ b/etc/images/outline-close.svg @@ -0,0 +1,6 @@ + +outline-close + + + + diff --git a/etc/images/outline-open.svg b/etc/images/outline-open.svg new file mode 100644 index 00000000000..75cf6aff9f9 --- /dev/null +++ b/etc/images/outline-open.svg @@ -0,0 +1,4 @@ + +outline-open + + diff --git a/lisp/emacs-lisp/icons.el b/lisp/emacs-lisp/icons.el index 93749a3451e..ff4f20c2071 100644 --- a/lisp/emacs-lisp/icons.el +++ b/lisp/emacs-lisp/icons.el @@ -202,7 +202,7 @@ present if the icon is represented by an image." :height (if (eq height 'line) (window-default-line-height) height) - :scale 1) + :scale 1 :ascent 'center) (create-image file)))))) (cl-defmethod icons--create ((_type (eql 'emoji)) icon _keywords) diff --git a/lisp/outline.el b/lisp/outline.el index c9d1a4ac64b..aee6f696b5b 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -292,16 +292,18 @@ buffers (yet) -- that will be amended in a future version." :safe #'booleanp :version "29.1") -(define-icon outline-open button - '((emoji "🔽") +(define-icon outline-open nil + '((image "outline-open.svg" :height 15 :ascent center) + (emoji "🔽") (symbol " ▼ ") (text " open ")) "Icon used for buttons for opening a section in outline buffers." :version "29.1" :help-echo "Open this section") -(define-icon outline-close button - '((emoji "▶️") +(define-icon outline-close nil + '((image "outline-close.svg" :height 15 :ascent center) + (emoji "▶️") (symbol " ▶ ") (text " close ")) "Icon used for buttons for closing a section in outline buffers." From 58454b661578bb56d8feccb1b0340b94869f0655 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 16 Sep 2022 15:45:36 +0800 Subject: [PATCH 400/915] Add portable versions of the outline SVGs * lisp/outline.el (outline-open): (outline-close): Add PBM images. * etc/images/outline-open.pbm: * etc/images/outline-close.pbm: New images used on systems without librsvg. --- etc/images/outline-close.pbm | Bin 0 -> 39 bytes etc/images/outline-open.pbm | Bin 0 -> 39 bytes lisp/outline.el | 2 ++ 3 files changed, 2 insertions(+) create mode 100644 etc/images/outline-close.pbm create mode 100644 etc/images/outline-open.pbm diff --git a/etc/images/outline-close.pbm b/etc/images/outline-close.pbm new file mode 100644 index 0000000000000000000000000000000000000000..b37b640b555fc03654447e3fd38533b392daa4d2 GIT binary patch literal 39 scmWGA;W9K;Ff`?2VBlcjVPIomW?*b!IKYs=aDcIa8OY}WiZd_(0A%X~p#T5? literal 0 HcmV?d00001 diff --git a/etc/images/outline-open.pbm b/etc/images/outline-open.pbm new file mode 100644 index 0000000000000000000000000000000000000000..06b520f14c97d3898897027ab922ae1b6fed8538 GIT binary patch literal 39 icmWGA;W9K;Ff`?2fPw@b0|^NOo&>f7%ngh%K?VR{(F8XD literal 0 HcmV?d00001 diff --git a/lisp/outline.el b/lisp/outline.el index aee6f696b5b..25f3b21e632 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -294,6 +294,7 @@ buffers (yet) -- that will be amended in a future version." (define-icon outline-open nil '((image "outline-open.svg" :height 15 :ascent center) + (image "outline-open.pbm" :height 15 :ascent center) (emoji "🔽") (symbol " ▼ ") (text " open ")) @@ -303,6 +304,7 @@ buffers (yet) -- that will be amended in a future version." (define-icon outline-close nil '((image "outline-close.svg" :height 15 :ascent center) + (image "outline-close.pbm" :height 15 :ascent center) (emoji "▶️") (symbol " ▶ ") (text " close ")) From 3c0dda2663e38635163f0fd6c19748c6eba1c3c8 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 16 Sep 2022 15:52:21 +0800 Subject: [PATCH 401/915] Avoid asserting for fontset validity before it is used * src/fontset.c (face_for_char): Move `eassert' to before the fontset is really used. Suggested by Eli Zaretskii --- src/fontset.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fontset.c b/src/fontset.c index 1793715450e..4b91eff2ef6 100644 --- a/src/fontset.c +++ b/src/fontset.c @@ -922,8 +922,6 @@ face_for_char (struct frame *f, struct face *face, int c, int face_id; int id; - eassert (fontset_id_valid_p (face->fontset)); - if (ASCII_CHAR_P (c) || CHAR_BYTE8_P (c)) return face->ascii_face->id; @@ -969,6 +967,7 @@ face_for_char (struct frame *f, struct face *face, int c, #endif } + eassert (fontset_id_valid_p (face->fontset)); fontset = FONTSET_FROM_ID (face->fontset); eassert (!BASE_FONTSET_P (fontset)); From 4cb3b4e98a7c43de9e210c22f70e9ad323a4340e Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 16 Sep 2022 17:01:41 +0800 Subject: [PATCH 402/915] Fix wrong source window being generated for XDND leave events * src/xterm.c (x_dnd_update_state, handle_one_xevent): Let x_dnd_last_seen_toplevel remain at its old value until any XdndLeave event was definitely sent. --- src/xterm.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 4c3b8128175..8c41f14864a 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -17152,8 +17152,6 @@ x_dnd_update_state (struct x_display_info *dpyinfo, Time timestamp) x_dnd_waiting_for_finish = false; target = None; } - - x_dnd_last_seen_toplevel = toplevel; } if (target != x_dnd_last_seen_window) @@ -17184,6 +17182,7 @@ x_dnd_update_state (struct x_display_info *dpyinfo, Time timestamp) } x_dnd_action = None; + x_dnd_last_seen_toplevel = toplevel; x_dnd_last_seen_window = target; x_dnd_last_protocol_version = target_proto; x_dnd_last_motif_style = motif_style; @@ -17211,6 +17210,8 @@ x_dnd_update_state (struct x_display_info *dpyinfo, Time timestamp) target, &emsg); } } + else + x_dnd_last_seen_toplevel = toplevel; if (x_dnd_last_window_is_frame && target != None) x_dnd_note_self_position (dpyinfo, target, root_x, root_y); @@ -19679,8 +19680,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, x_dnd_waiting_for_finish = false; target = None; } - - x_dnd_last_seen_toplevel = toplevel; } if (target != x_dnd_last_seen_window) @@ -19732,6 +19731,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, } x_dnd_action = None; + x_dnd_last_seen_toplevel = toplevel; x_dnd_last_seen_window = target; x_dnd_last_protocol_version = target_proto; x_dnd_last_motif_style = motif_style; @@ -19760,6 +19760,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, target, &emsg); } } + else + x_dnd_last_seen_toplevel = toplevel; if (x_dnd_last_window_is_frame && target != None) x_dnd_note_self_position (dpyinfo, target, @@ -21550,8 +21552,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, x_dnd_waiting_for_finish = false; target = None; } - - x_dnd_last_seen_toplevel = toplevel; } if (target != x_dnd_last_seen_window) @@ -21605,6 +21605,7 @@ handle_one_xevent (struct x_display_info *dpyinfo, } x_dnd_action = None; + x_dnd_last_seen_toplevel = toplevel; x_dnd_last_seen_window = target; x_dnd_last_protocol_version = target_proto; x_dnd_last_motif_style = motif_style; @@ -21633,6 +21634,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, target, &emsg); } } + else + x_dnd_last_seen_toplevel = toplevel; if (x_dnd_last_window_is_frame && target != None) x_dnd_note_self_position (dpyinfo, target, From e0ab4e361223d39d955710ce1ae1e64b95bf0c0f Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 16 Sep 2022 11:03:35 +0200 Subject: [PATCH 403/915] Rename `image-elide' to `image-cut' and add more bindings * doc/lispref/display.texi (Showing Images): Update. * lisp/image.el (image-map): Move binding to mirror Gimp bindings. * lisp/image/image-crop.el (image-crop-cut-command): Rename. (image-cut-color): New user option. (image-cut): Rename and remove prefix. (image-crop): Remove prefix. (image-crop--crop-image-update): Add commands to switch to move/square modes. --- doc/lispref/display.texi | 4 +- etc/NEWS | 9 ++- lisp/image.el | 2 +- lisp/image/image-crop.el | 138 ++++++++++++++++++++++----------------- 4 files changed, 85 insertions(+), 68 deletions(-) diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 32cf01b2374..190364852af 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -6867,8 +6867,8 @@ Save the image to a file (@code{image-save}). @item c Crop the image interactively (@code{image-crop}). -@item e -Elide a rectangle from the image interactively (@code{image-elide}). +@item x +Cut a rectangle from the image interactively (@code{image-cut}). @end table @node Multi-Frame Images diff --git a/etc/NEWS b/etc/NEWS index dd63efb02d8..9036e4ee019 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2464,13 +2464,12 @@ name. * New Modes and Packages in Emacs 29.1 +++ -** New commands 'image-crop' and 'image-elide'. -These commands allow interactively cropping/eliding the image at -point. The commands are bound to keys 'c' and 'e' (respectively) in +** New commands 'image-crop' and 'image-cut. +These commands allow interactively cropping/cutting the image at +point. The commands are bound to keys 'c' and 'x' (respectively) in the local keymap over images. They rely on external programs, by default 'convert' from ImageMagick, to do the actual cropping/eliding -of the image file. If the 'exiftool' program is available, it is used -to optionally rotate images which have the :rotation property. +of the image file. --- ** New package 'wallpaper'. diff --git a/lisp/image.el b/lisp/image.el index bbc3b996b19..eef47fd91c5 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -179,7 +179,7 @@ or \"ffmpeg\") is installed." "r" #'image-rotate "o" #'image-save "c" #'image-crop - "e" #'image-elide + "x" #'image-cut "h" #'image-flip-horizontally "v" #'image-flip-vertically "C-" #'image-mouse-decrease-size diff --git a/lisp/image/image-crop.el b/lisp/image/image-crop.el index 7716efcd543..682fce39866 100644 --- a/lisp/image/image-crop.el +++ b/lisp/image/image-crop.el @@ -47,10 +47,10 @@ The following `format-spec' elements are allowed: :type '(repeat string) :version "29.1") -(defcustom image-crop-elide-command '("convert" "-draw" "rectangle %l,%t %r,%b" - "-fill" "%c" - "-" "%f:-") - "Command to make a rectangle inside an image. +(defcustom image-crop-cut-command '("convert" "-draw" "rectangle %l,%t %r,%b" + "-fill" "%c" + "-" "%f:-") + "Command to cut a rectangle out of an image. The following `format-spec' elements are allowed: %l: Left. @@ -98,31 +98,37 @@ The function is called with two arguments: The first is the original buffer text, and the second parameter is the cropped image data.") -;;;###autoload -(defun image-elide (color &optional square) - "Elide a rectangle from the image under point, filling it with COLOR. -If SQUARE is non-nil (interactively, prefix arg), elide a square -instead of a rectangle from the image. - -Interactively, prompt for COLOR to use, defaulting to black." - (interactive (list (read-color "Use color: ") - current-prefix-arg)) - (image-crop square (if (string-empty-p color) - "black" color))) +(defcustom image-cut-color "black" + "Color to use for the rectangle cut from the image." + :type 'string + :version "29.1") ;;;###autoload -(defun image-crop (&optional square elide) +(defun image-cut (&optional color) + "Cut a rectangle from the image under point. +Interactively, if given a prefix, prompt for COLOR to use. +Otherwise, default to `image-cut-color'." + (interactive (list (and current-prefix-arg (read-color "Use color: ")))) + (image-crop (if (zerop (length color)) image-cut-color color))) + +;;;###autoload +(defun image-crop (&optional cut) "Crop the image under point. -If SQUARE is non-nil (interactively, prefix arg), crop a square -instead of a rectangle from the image. +If CUT is non-nil, remove a rectangle from the image instead of +cropping the image. In that case CUT should be the name of a +color to fill the rectangle. -If ELIDE is non-nil, remove a rectangle/square from the image -instead of cropping the image. In that case ELIDE should be -the name of a color to fill the rectangle. +While cropping the image, the following key bindings are available: + +`q': Exit without changing anything. +`RET': Crop/cut the image. +`m': Make mouse movements move the rectangle instead of altering the + rectangle shape. +`s': Same as `m', but make the rectangle into a square first. After cropping an image, you can save it by `M-x image-save' or \\\\[image-save] when point is over the image." - (interactive "P") + (interactive) (unless (image-type-available-p 'svg) (error "SVG support is needed to crop images")) (unless (executable-find (car image-crop-crop-command)) @@ -186,22 +192,21 @@ After cropping an image, you can save it by `M-x image-save' or (save-excursion (forward-line 1) (image-crop--crop-image-1 - svg square (car size) (cdr size) - (if elide "elide" "crop"))) + svg (if cut "cut" "crop"))) (quit nil)))) (message (substitute-command-keys "Type \\[image-save] to save %s image to file") - (if elide "elided" "cropped")) + (if cut "cut" "cropped")) (delete-region (pos-bol) (pos-eol)) (if area (image-crop--crop-image-update - area orig-data size type elide text) + area orig-data size type cut text) ;; If the user didn't complete the crop, re-insert the ;; original image (and text). (insert text)) (undo-amalgamate-change-group undo-handle))))) -(defun image-crop--crop-image-update (area data size type elide text) +(defun image-crop--crop-image-update (area data size type cut text) (let* ((image-scaling-factor 1) (osize (image-size (create-image data nil t) t)) (factor (/ (float (car osize)) (car size))) @@ -218,13 +223,13 @@ After cropping an image, you can save it by `M-x image-save' or (with-temp-buffer (set-buffer-multibyte nil) (insert data) - (if elide - (image-crop--process image-crop-elide-command + (if cut + (image-crop--process image-crop-cut-command `((?l . ,left) (?t . ,top) (?r . ,(+ left width)) (?b . ,(+ top height)) - (?c . ,elide) + (?c . ,cut) (?f . ,(cadr (split-string type "/"))))) (image-crop--process image-crop-crop-command `((?l . ,left) @@ -235,37 +240,46 @@ After cropping an image, you can save it by `M-x image-save' or (buffer-string)) text))) -(defun image-crop--crop-image-1 (svg &optional square image-width image-height op) +(defun image-crop--width (area) + (- (plist-get area :right) (plist-get area :left))) + +(defun image-crop--height (area) + (- (plist-get area :bottom) (plist-get area :top))) + +(defun image-crop--crop-image-1 (svg op) (track-mouse (cl-loop - with prompt = (if square - (format "Move square for %s" op) - (format - (substitute-command-keys - "Select area for %s (click \\`mouse-1' and drag)") - op)) - and state = (if square 'move-unclick 'begin) - and area = (if square - (list :left (- (/ image-width 2) - (/ image-height 2)) - :top 0 - :right (+ (/ image-width 2) - (/ image-height 2)) - :bottom image-height) - (list :left 0 - :top 0 - :right 0 - :bottom 0)) + with prompt = (format + (substitute-command-keys + "Select area for %s (click \\`mouse-1' and drag)") + op) + and state = 'begin + and area = (list :left 0 + :top 0 + :right 0 + :bottom 0) and corner = nil for event = (read-event prompt) - do (if (or (not (consp event)) - (not (consp (cadr event))) - (not (nth 7 (cadr event))) - ;; Only do things if point is over the SVG being - ;; tracked. - (not (eq (cl-getf (cdr (nth 7 (cadr event))) :type) - 'svg))) - () + do (cond + ;; Go to "square" mode. + ((eql event ?s) + (setq state 'move-unclick + prompt (format "Move square for %s" op)) + (let ((size (min (image-crop--width area) (image-crop--height area)))) + (setf (plist-get area :right) (+ (plist-get area :left) size) + (plist-get area :bottom) (+ (plist-get area :top) size)))) + ;; Go to "move" move. + ((eql event ?m) + (setq state 'move-unclick + prompt (format "Move for %s" op))) + ;; We have a (relevant) mouse event. + ((and (consp event) + (consp (cadr event)) + (nth 7 (cadr event)) + ;; Only do things if point is over the SVG being + ;; tracked. + (eq (cl-getf (cdr (nth 7 (cadr event))) :type) + 'svg)) (let ((pos (nth 8 (cadr event)))) (cl-case state (begin @@ -322,11 +336,15 @@ After cropping an image, you can save it by `M-x image-save' or (move-click (cond ((eq (car event) 'mouse-movement) - (setf (cl-getf area :left) (car pos) - (cl-getf area :right) (+ (car pos) image-height))) + (setf (cl-getf area :right) + (+ (car pos) (image-crop--width area))) + (setf (cl-getf area :left) (car pos)) + (setf (cl-getf area :bottom) + (+ (cdr pos) (image-crop--height area))) + (setf (cl-getf area :top) (cdr pos))) ((memq (car event) '(mouse-1 drag-mouse-1)) (setq state 'move-unclick - prompt (format "Click to move for %s" op)))))))) + prompt (format "Click to move for %s" op))))))))) do (svg-line svg (cl-getf area :left) (cl-getf area :top) (cl-getf area :right) (cl-getf area :top) :id "top-line" :stroke-color "white") From cdb8106bec97c6a4d1e34a7ce98a54dfe2060d5a Mon Sep 17 00:00:00 2001 From: Po Lu Date: Fri, 16 Sep 2022 17:16:48 +0800 Subject: [PATCH 404/915] Fix icon spec for outline icons * lisp/outline.el (outline-open): (outline-close): Fix listing of multiple images. Reported by Lars Ingebrigtsen . --- lisp/outline.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/outline.el b/lisp/outline.el index 25f3b21e632..8281f24291d 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -293,8 +293,8 @@ buffers (yet) -- that will be amended in a future version." :version "29.1") (define-icon outline-open nil - '((image "outline-open.svg" :height 15 :ascent center) - (image "outline-open.pbm" :height 15 :ascent center) + '((image "outline-open.svg" "outline-open.pbm" + :height 15 :ascent center) (emoji "🔽") (symbol " ▼ ") (text " open ")) @@ -303,8 +303,8 @@ buffers (yet) -- that will be amended in a future version." :help-echo "Open this section") (define-icon outline-close nil - '((image "outline-close.svg" :height 15 :ascent center) - (image "outline-close.pbm" :height 15 :ascent center) + '((image "outline-close.svg" "outline-close.pbm" + :height 15 :ascent center) (emoji "▶️") (symbol " ▶ ") (text " close ")) From fd8969fe27fc2757a22ec5ae7013e088ad4f2015 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 16 Sep 2022 11:46:25 +0200 Subject: [PATCH 405/915] Fix sorting of backends in vc-responsible-backend * lisp/vc/vc.el (vc-responsible-backend): When comparing directory names, expand them first so that we get consistent sorting of ~/ etc (bug#57777). --- lisp/vc/vc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 39a5be6654b..05109256bd1 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1014,7 +1014,7 @@ responsible for the given file." (lambda (backend) (when-let ((dir (vc-call-backend backend 'responsible-p file))) - (cons backend dir))) + (cons backend (expand-file-name dir)))) vc-handled-backends)))) ;; Just a single response (or none); use it. (if (< (length dirs) 2) From 520b041b5446b09530e4b9a23b364da223a59b7b Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 12:14:33 +0200 Subject: [PATCH 406/915] * lisp/textmodes/page-ext.el: Improve Commentary. --- lisp/textmodes/page-ext.el | 54 +++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/lisp/textmodes/page-ext.el b/lisp/textmodes/page-ext.el index 24149f9afb8..a38b8d0445b 100644 --- a/lisp/textmodes/page-ext.el +++ b/lisp/textmodes/page-ext.el @@ -1,7 +1,6 @@ ;;; page-ext.el --- extended page handling commands -*- lexical-binding:t -*- -;; Copyright (C) 1990-1991, 1993-1994, 2001-2022 Free Software -;; Foundation, Inc. +;; Copyright (C) 1990-2022 Free Software Foundation, Inc. ;; Author: Robert J. Chassell ;; (according to ack.texi) @@ -25,20 +24,20 @@ ;;; Commentary: ;; You may use these commands to handle an address list or other -;; small data base. +;; small database. ;;; Summary ;; The current page commands are: -;; forward-page C-x ] -;; backward-page C-x [ -;; narrow-to-page C-x p -;; count-lines-page C-x l -;; mark-page C-x C-p (change this to C-x C-p C-m) -;; sort-pages not bound -;; what-page not bound +;; `forward-page' C-x ] +;; `backward-page' C-x [ +;; `narrow-to-page' C-x p +;; `count-lines-page' C-x l +;; `mark-page' C-x C-p (change this to C-x C-p C-m) +;; `sort-pages' not bound +;; `what-page' not bound ;; The new page handling commands all use `C-x C-p' as a prefix. This ;; means that the key binding for `mark-page' must be changed. @@ -47,15 +46,15 @@ ;; New page handling commands: -;; pages-next-page C-x C-p C-n -;; pages-previous-page C-x C-p C-p -;; pages-search C-x C-p C-s -;; pages-add-new-page C-x C-p C-a -;; pages-sort-buffer C-x C-p s -;; pages-set-delimiter C-x C-p C-l -;; pages-directory C-x C-p C-d -;; pages-directory-for-addresses C-x C-p d -;; pages-directory-goto C-c C-c +;; `pages-next-page' C-x C-p C-n +;; `pages-previous-page' C-x C-p C-p +;; `pages-search' C-x C-p C-s +;; `pages-add-new-page' C-x C-p C-a +;; `pages-sort-buffer' C-x C-p s +;; `pages-set-delimiter' C-x C-p C-l +;; `pages-directory' C-x C-p C-d +;; `pages-directory-for-addresses' C-x C-p d +;; `pages-directory-goto' C-c C-c ;;; Using the page commands @@ -103,8 +102,8 @@ ;; ;; 2. The first line of text in each entry is the `heading line'; it ;; will appear in the pages-directory-buffer which is constructed -;; using the `C-x C-p C-d' (pages-directory) command or the `C-x -;; C-p d' (pages-directory-for-addresses) command. +;; using the `C-x C-p C-d' (`pages-directory') command or the +;; `C-x C-p d' (`pages-directory-for-addresses') command. ;; ;; The heading line may be on the same line as the page-delimiter ;; or it may follow after. It is the first non-blank line on the @@ -163,17 +162,18 @@ ;; `pages-previous-page', `pages-add-new-page', `mark-page', and `pages-search' ;; commands. -;; You may use either the `C-x C-p d' (pages-directory-for-addresses) -;; or the `C-x C-p C-d' (pages-directory) command to construct and +;; You may use either the `C-x C-p d' (`pages-directory-for-addresses') +;; or the `C-x C-p C-d' (`pages-directory') command to construct and ;; display a directory of all the heading lines. ;; In the directory, you may position the cursor over a heading line -;; and type `C-c C-c' (pages-directory-goto) to go to the entry to +;; and type `C-c C-c' (`pages-directory-goto') to go to the entry to ;; which it refers in the pages buffer. -;; You can type `C-c C-p C-a' (pages-add-new-page) to add a new entry in the -;; pages buffer or address file. This is the same command you use to -;; add a new entry when you are in the pages buffer or address file. +;; You can type `C-c C-p C-a' (`pages-add-new-page') to add a new +;; entry in the pages buffer or address file. This is the same +;; command you use to add a new entry when you are in the pages buffer +;; or address file. ;; If you wish, you may create several different directories, ;; one for each different buffer. From 7d39453fd64e355526291b0ca5672e838de5fb58 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 16 Sep 2022 12:29:54 +0200 Subject: [PATCH 407/915] Add new predicate list-of-strings-p * lisp/subr.el (list-of-strings-p): New function. --- lisp/subr.el | 5 +++++ test/lisp/subr-tests.el | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/lisp/subr.el b/lisp/subr.el index bfc2e207b2c..e8e8f1584b4 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4026,6 +4026,11 @@ system's shell." Otherwise, return nil." (or (stringp object) (null object))) +(defun list-of-strings-p (object) + "Return t if OBJECT is nil or a list of strings." + (and (listp object) + (seq-every-p #'stringp object))) + (defun booleanp (object) "Return t if OBJECT is one of the two canonical boolean values: t or nil. Otherwise, return nil." diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 30117132101..38966cea585 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -1158,5 +1158,12 @@ final or penultimate step during initialization.")) (should (equal (butlast l n) (subr-tests--butlast-ref l n)))))) +(ert-deftest test-list-of-strings-p () + (should-not (list-of-strings-p 1)) + (should (list-of-strings-p nil)) + (should (list-of-strings-p '("a" "b"))) + (should-not (list-of-strings-p ["a" "b"])) + (should-not (list-of-strings-p '("a" nil "b")))) + (provide 'subr-tests) ;;; subr-tests.el ends here From 7be7ad279e96f90cc70e384a350331de8e1607df Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 16 Sep 2022 12:36:15 +0200 Subject: [PATCH 408/915] Don't use autoloaded functions for safe-local-variable * doc/lispref/symbols.texi (Standard Properties): Clarify how safe-local-variable should look. * lisp/emacs-lisp/checkdoc.el (checkdoc-ispell-lisp-words) (checkdoc-symbol-words): Use list-of-strings-p. (checkdoc-list-of-strings-p): Obsolete. * lisp/vc/vc-git.el (vc-git-annotate-switches): Remove. (vc-git-annotate-switches): Open-code the check. --- doc/lispref/symbols.texi | 5 ++++- lisp/emacs-lisp/checkdoc.el | 6 +++--- lisp/vc/vc-git.el | 19 ++++++------------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi index 336fa9c9182..ea1e086ebf1 100644 --- a/doc/lispref/symbols.texi +++ b/doc/lispref/symbols.texi @@ -613,7 +613,10 @@ file-local evaluation forms. @xref{File Local Variables}. @item safe-local-variable The value specifies a function for determining safe file-local values -for the named variable. @xref{File Local Variables}. +for the named variable. @xref{File Local Variables}. Since this +value is consulted when loading files, the function should be +efficient and should ideally not lead to loading any libraries to +determine the safeness (e.g., it should not be an autoloaded function). @item side-effect-free @cindex @code{side-effect-free} property diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 20d64b59158..3f9bc28e0b0 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -250,7 +250,7 @@ with these words enabled." (defvar checkdoc-ispell-lisp-words '("alist" "emacs" "etags" "keymap" "paren" "regexp" "sexp") "List of words that are correct when spell-checking Lisp documentation.") -;;;###autoload(put 'checkdoc-ispell-list-words 'safe-local-variable #'checkdoc-list-of-strings-p) +;;;###autoload(put 'checkdoc-ispell-list-words 'safe-local-variable #'list-of-strings-p) (defcustom checkdoc-max-keyref-before-warn nil "If non-nil, number of \\\\=[command-to-keystroke] tokens allowed in a doc string. @@ -320,7 +320,7 @@ These words are ignored when unquoted symbols are searched for. This should be set in an Emacs Lisp file's local variables." :type '(repeat (string :tag "Word")) :version "28.1") -;;;###autoload(put 'checkdoc-symbol-words 'safe-local-variable #'checkdoc-list-of-strings-p) +;;;###autoload(put 'checkdoc-symbol-words 'safe-local-variable #'list-of-strings-p) (defcustom checkdoc-column-zero-backslash-before-paren t "Non-nil means to warn if there is no \"\\\" before \"(\" in column zero. @@ -360,9 +360,9 @@ large number of libraries means it is impractical to fix all of these warnings masse. In almost any other case, setting this to anything but t is likely to be counter-productive.") -;;;###autoload (defun checkdoc-list-of-strings-p (obj) "Return t when OBJ is a list of strings." + (declare (obsolete list-of-strings-p "29.1")) ;; this is a function so it might be shared by checkdoc-proper-noun-list ;; and/or checkdoc-ispell-lisp-words in the future (and (listp obj) diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index b1025ed7149..a5d12f03bcf 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -119,18 +119,6 @@ If nil, use the value of `vc-diff-switches'. If t, use no switches." (repeat :tag "Argument List" :value ("") string)) :version "23.1") -;; We put the entire function into the autoload file so that we don't -;; have to load a whole bunch of vc.*el files just to see whether the -;; file-local variable is safe. -;;;###autoload -(progn - (defun vc-git-annotate-switches-safe-p (switches) - "Check if local value of `vc-git-annotate-switches' is safe. -Currently only \"-w\" (ignore whitespace) is considered safe, but -this list might be extended in the future." - ;; TODO: Probably most options are perfectly safe. - (equal switches "-w"))) - (defcustom vc-git-annotate-switches nil "String or list of strings specifying switches for Git blame under VC. If nil, use the value of `vc-annotate-switches'. If t, use no switches." @@ -139,7 +127,12 @@ If nil, use the value of `vc-annotate-switches'. If t, use no switches." (string :tag "Argument String") (repeat :tag "Argument List" :value ("") string)) :version "25.1") -;;;###autoload(put 'vc-git-annotate-switches 'safe-local-variable #'vc-git-annotate-switches-safe-p) + +;; Check if local value of `vc-git-annotate-switches' is safe. +;; Currently only "-w" (ignore whitespace) is considered safe, but +;; this list might be extended in the future (probably most options +;; are perfectly safe.) +;;;###autoload(put 'vc-git-annotate-switches 'safe-local-variable (lambda (switches) (equal switches "-w"))) (defcustom vc-git-log-switches nil "String or list of strings specifying switches for Git log under VC." From f25f9dbf301fb0265917ddc20d8435f9ad4ee684 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 12:44:08 +0200 Subject: [PATCH 409/915] Minor doc fixes in picture.el * lisp/textmodes/picture.el: Improve Commentary. (picture-forward-column, picture-backward-column) (picture-move-down, picture-move-up, picture-movement-nw) (picture-movement-ne, picture-movement-sw, picture-movement-se) (picture-set-motion, picture-clear-line, picture-newline) (picture-tab, picture-yank-rectangle) (picture-yank-rectangle-from-register, picture-insert-rectangle) (picture-draw-rectangle): Minor doc fixes. --- lisp/textmodes/picture.el | 66 +++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index 17d9483f68c..54142412553 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el @@ -23,9 +23,9 @@ ;;; Commentary: -;; This code provides the picture-mode commands documented in the Emacs +;; This code provides the `picture-mode' commands documented in the Emacs ;; manual. The screen is treated as a semi-infinite quarter-plane with -;; support for rectangle operations and `etch-a-sketch' character +;; support for rectangle operations and "etch-a-sketch" character ;; insertion in any of eight directions. ;;; Code: @@ -96,7 +96,7 @@ If scan reaches end of buffer, stop there without error." (defun picture-forward-column (arg &optional interactive) "Move cursor right, making whitespace if necessary. -With argument, move that many columns." +With prefix argument ARG, move that many columns." (interactive "^p\nd") (let (deactivate-mark) (picture-update-desired-column interactive) @@ -110,14 +110,14 @@ With argument, move that many columns." (defun picture-backward-column (arg &optional interactive) "Move cursor left, making whitespace if necessary. -With argument, move that many columns." +With prefix argument ARG, move that many columns." (interactive "^p\nd") (picture-update-desired-column interactive) (picture-forward-column (- arg))) (defun picture-move-down (arg) "Move vertically down, making whitespace if necessary. -With argument, move that many lines." +With prefix argument ARG, move that many lines." (interactive "^p") (let (deactivate-mark) (picture-update-desired-column nil) @@ -134,7 +134,7 @@ With argument, move that many lines." (defun picture-move-up (arg) "Move vertically up, making whitespace if necessary. -With argument, move that many lines." +With prefix argument ARG, move that many lines." (interactive "^p") (picture-update-desired-column nil) (picture-move-down (- arg))) @@ -161,36 +161,36 @@ With argument, move that many lines." (defun picture-movement-nw (&optional arg) "Move up and left after self-inserting character in Picture mode. -With prefix argument, move up and two-column left." +With prefix argument ARG, move up and two-column left." (interactive "P") (picture-set-motion -1 (if arg -2 -1))) (defun picture-movement-ne (&optional arg) "Move up and right after self-inserting character in Picture mode. -With prefix argument, move up and two-column right." +With prefix argument ARG, move up and two-column right." (interactive "P") (picture-set-motion -1 (if arg 2 1))) (defun picture-movement-sw (&optional arg) "Move down and left after self-inserting character in Picture mode. -With prefix argument, move down and two-column left." +With prefix argument ARG, move down and two-column left." (interactive "P") (picture-set-motion 1 (if arg -2 -1))) (defun picture-movement-se (&optional arg) "Move down and right after self-inserting character in Picture mode. -With prefix argument, move down and two-column right." +With prefix argument ARG, move down and two-column right." (interactive "P") (picture-set-motion 1 (if arg 2 1))) -(defun picture-set-motion (vert horiz) +(defun picture-set-motion (vertical horizontal) "Set VERTICAL and HORIZONTAL increments for movement in Picture mode. The mode line is updated to reflect the current direction." - (setq picture-vertical-step vert - picture-horizontal-step horiz) + (setq picture-vertical-step vertical + picture-horizontal-step horizontal) (setq mode-name (format "Picture:%s" - (nth (+ 2 (% horiz 3) (* 5 (1+ (% vert 2)))) + (nth (+ 2 (% horizontal 3) (* 5 (1+ (% vertical 2)))) '(wnw nw up ne ene Left left none right Right wsw sw down se ese)))) (force-mode-line-update) @@ -305,9 +305,9 @@ Use \"\\[command-apropos] picture-movement\" to see those commands." (defun picture-clear-line (arg) "Clear out rest of line; if at end of line, advance to next line. -Cleared-out line text goes into the kill ring, as do newlines that are -advanced over. With argument, clear out (and save in kill ring) that -many lines." +Cleared-out line text goes into the kill ring, as do newlines +that are advanced over. With prefix argument ARG, clear out (and +save in kill ring) that many lines." (interactive "P") (if arg (progn @@ -320,7 +320,8 @@ many lines." (defun picture-newline (arg) "Move to the beginning of the following line. -With argument, moves that many lines (up, if negative argument); +With prefix argument ARG, move that many lines (up, if negative +argument); always moves to the beginning of a line." (interactive "^p") (let ((start (point)) @@ -466,8 +467,11 @@ If no such character is found, move to beginning of line." (defun picture-tab (&optional arg) "Tab transparently (just move point) to next tab stop. -With prefix arg, overwrite the traversed text with spaces. The tab stop -list can be changed by \\[picture-set-tab-stops] and \\[edit-tab-stops]. +With prefix argument ARG, overwrite the traversed text with +spaces. The tab stop list can be changed by \ +\\\\[picture-set-tab-stops] and +\\[edit-tab-stops]. + See also documentation for variable `picture-tab-chars'." (interactive "^P") (let* ((opoint (point))) @@ -515,10 +519,11 @@ Interactively, reads the register using `register-read-with-preview'." (defun picture-yank-rectangle (&optional insertp) "Overlay rectangle saved by \\[picture-clear-rectangle]. -The rectangle is positioned with upper left corner at point, overwriting -existing text. With prefix argument, the rectangle is inserted instead, -shifting existing text. Leaves mark at one corner of rectangle and -point at the other (diagonally opposed) corner." +The rectangle is positioned with upper left corner at point, +overwriting existing text. With prefix argument INSERTP, the +rectangle is inserted instead, shifting existing text. Leave +mark at one corner of rectangle and point at the +other (diagonally opposed) corner." (interactive "P") (if (not (consp picture-killed-rectangle)) (error "No rectangle saved") @@ -536,10 +541,11 @@ regardless of where you click." (defun picture-yank-rectangle-from-register (register &optional insertp) "Overlay rectangle saved in REGISTER. -The rectangle is positioned with upper left corner at point, overwriting -existing text. With prefix argument, the rectangle is -inserted instead, shifting existing text. Leaves mark at one corner -of rectangle and point at the other (diagonally opposed) corner. +The rectangle is positioned with upper left corner at point, +overwriting existing text. With prefix argument INSERTP, the +rectangle is inserted instead, shifting existing text. Leave +mark at one corner of rectangle and point at the +other (diagonally opposed) corner. Interactively, reads the register using `register-read-with-preview'." (interactive (list (register-read-with-preview "Rectangle from register: ") @@ -552,7 +558,7 @@ Interactively, reads the register using `register-read-with-preview'." (defun picture-insert-rectangle (rectangle &optional insertp) "Overlay RECTANGLE with upper left corner at point. Optional argument INSERTP, if non-nil causes RECTANGLE to be inserted. -Leaves the region surrounding the rectangle." +Leave the region surrounding the rectangle." (let ((indent-tabs-mode nil)) (if (not insertp) (save-excursion @@ -570,7 +576,7 @@ Leaves the region surrounding the rectangle." (if (= (current-column) 0) 1 0))) (defun picture-draw-rectangle (start end) - "Draw a rectangle around region." + "Draw a rectangle around region from START to END." (interactive "*r") ; start will be less than end (let* ((sl (picture-current-line)) (sc (current-column)) From 37e9d6a35aa9fb087490292ca8c2143930b052cf Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 12:51:28 +0200 Subject: [PATCH 410/915] Prefer defvar-keymap in picture.el * lisp/textmodes/picture.el (picture-mode-map): Prefer defvar-keymap. --- lisp/textmodes/picture.el | 108 ++++++++++++++++++-------------------- 1 file changed, 52 insertions(+), 56 deletions(-) diff --git a/lisp/textmodes/picture.el b/lisp/textmodes/picture.el index e8c1e6b14f2..a020b7de850 100644 --- a/lisp/textmodes/picture.el +++ b/lisp/textmodes/picture.el @@ -1,6 +1,6 @@ ;;; picture.el --- "Picture mode" -- editing using quarter-plane screen model -*- lexical-binding: t -*- -;; Copyright (C) 1985, 1994, 2001-2022 Free Software Foundation, Inc. +;; Copyright (C) 1985-2022 Free Software Foundation, Inc. ;; Author: K. Shane Hartman ;; Maintainer: emacs-devel@gnu.org @@ -615,61 +615,57 @@ Leaves the region surrounding the rectangle." (defalias 'picture-delete-char 'delete-char) -(defvar picture-mode-map - (let ((map (make-keymap))) - (define-key map [remap self-insert-command] 'picture-self-insert) - (define-key map [remap completion-separator-self-insert-command] - 'picture-self-insert) - (define-key map [remap completion-separator-self-insert-autofilling] - 'picture-self-insert) - (define-key map [remap forward-char] 'picture-forward-column) - (define-key map [remap right-char] 'picture-forward-column) - (define-key map [remap backward-char] 'picture-backward-column) - (define-key map [remap left-char] 'picture-backward-column) - (define-key map [remap delete-char] 'picture-clear-column) - ;; There are two possibilities for what is normally on DEL. - (define-key map [remap backward-delete-char-untabify] - 'picture-backward-clear-column) - (define-key map [remap delete-backward-char] 'picture-backward-clear-column) - (define-key map [remap kill-line] 'picture-clear-line) - (define-key map [remap open-line] 'picture-open-line) - (define-key map [remap newline] 'picture-newline) - (define-key map [remap newline-and-indent] 'picture-duplicate-line) - (define-key map [remap next-line] 'picture-move-down) - (define-key map [remap previous-line] 'picture-move-up) - (define-key map [remap move-beginning-of-line] 'picture-beginning-of-line) - (define-key map [remap move-end-of-line] 'picture-end-of-line) - (define-key map [remap mouse-set-point] 'picture-mouse-set-point) - (define-key map "\C-c\C-d" 'picture-delete-char) - (define-key map "\t" 'picture-tab) - (define-key map "\e\t" 'picture-tab-search) - (define-key map "\C-c\t" 'picture-set-tab-stops) - (define-key map "\C-c\C-k" 'picture-clear-rectangle) - (define-key map "\C-c\C-w" 'picture-clear-rectangle-to-register) - (define-key map "\C-c\C-y" 'picture-yank-rectangle) - (define-key map "\C-c\C-x" 'picture-yank-rectangle-from-register) - (define-key map "\C-c\C-r" 'picture-draw-rectangle) - (define-key map "\C-c\C-c" 'picture-mode-exit) - (define-key map "\C-c\C-f" 'picture-motion) - (define-key map "\C-c\C-b" 'picture-motion-reverse) - (define-key map "\C-c<" 'picture-movement-left) - (define-key map "\C-c>" 'picture-movement-right) - (define-key map "\C-c^" 'picture-movement-up) - (define-key map "\C-c." 'picture-movement-down) - (define-key map "\C-c`" 'picture-movement-nw) - (define-key map "\C-c'" 'picture-movement-ne) - (define-key map "\C-c/" 'picture-movement-sw) - (define-key map "\C-c\\" 'picture-movement-se) - (define-key map [(control ?c) left] 'picture-movement-left) - (define-key map [(control ?c) right] 'picture-movement-right) - (define-key map [(control ?c) up] 'picture-movement-up) - (define-key map [(control ?c) down] 'picture-movement-down) - (define-key map [(control ?c) home] 'picture-movement-nw) - (define-key map [(control ?c) prior] 'picture-movement-ne) - (define-key map [(control ?c) end] 'picture-movement-sw) - (define-key map [(control ?c) next] 'picture-movement-se) - map) - "Keymap used in `picture-mode'.") +(defvar-keymap picture-mode-map + :doc "Keymap used in `picture-mode'." + :full t + " " #'picture-self-insert + " " #'picture-self-insert + " " #'picture-self-insert + " " #'picture-forward-column + " " #'picture-forward-column + " " #'picture-backward-column + " " #'picture-backward-column + " " #'picture-clear-column + ;; There are two possibilities for what is normally on DEL. + " " #'picture-backward-clear-column + " " #'picture-backward-clear-column + " " #'picture-clear-line + " " #'picture-open-line + " " #'picture-newline + " " #'picture-duplicate-line + " " #'picture-move-down + " " #'picture-move-up + " " #'picture-beginning-of-line + " " #'picture-end-of-line + " " #'picture-mouse-set-point + "C-c C-d" #'picture-delete-char + "TAB" #'picture-tab + "M-TAB" #'picture-tab-search + "C-c TAB" #'picture-set-tab-stops + "C-c C-k" #'picture-clear-rectangle + "C-c C-w" #'picture-clear-rectangle-to-register + "C-c C-y" #'picture-yank-rectangle + "C-c C-x" #'picture-yank-rectangle-from-register + "C-c C-r" #'picture-draw-rectangle + "C-c C-c" #'picture-mode-exit + "C-c C-f" #'picture-motion + "C-c C-b" #'picture-motion-reverse + "C-c <" #'picture-movement-left + "C-c >" #'picture-movement-right + "C-c ^" #'picture-movement-up + "C-c ." #'picture-movement-down + "C-c `" #'picture-movement-nw + "C-c '" #'picture-movement-ne + "C-c /" #'picture-movement-sw + "C-c \\" #'picture-movement-se + "C-c " #'picture-movement-left + "C-c " #'picture-movement-right + "C-c " #'picture-movement-up + "C-c " #'picture-movement-down + "C-c " #'picture-movement-nw + "C-c " #'picture-movement-ne + "C-c " #'picture-movement-sw + "C-c " #'picture-movement-se) (defcustom picture-mode-hook nil "If non-nil, its value is called on entry to Picture mode. From 711f908f5d7ce348e28e5640c83d1b0d024b65ca Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 16 Sep 2022 13:05:54 +0200 Subject: [PATCH 411/915] Fix cperl list indentation problem * lisp/progmodes/cperl-mode.el (cperl-calculate-indent): Indent foo:bar() in lists correctly (bug#57829). --- lisp/progmodes/cperl-mode.el | 2 +- .../cperl-mode-resources/cperl-indents.erts | 26 +++++++++++++++++++ test/lisp/progmodes/cperl-mode-tests.el | 3 +++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 test/lisp/progmodes/cperl-mode-resources/cperl-indents.erts diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index a3995e2969d..85229250ee0 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -3016,7 +3016,7 @@ and closing parentheses and brackets." ;; Now it is a hash reference (+ cperl-indent-level cperl-close-paren-offset)) ;; Labels do not take :: ... - (if (looking-at "\\(\\w\\|_\\)+[ \t]*:") + (if (looking-at "\\(\\w\\|_\\)+[ \t]*:[^:]") (if (> (current-indentation) cperl-min-label-indent) (- (current-indentation) cperl-label-offset) ;; Do not move `parse-data', this should diff --git a/test/lisp/progmodes/cperl-mode-resources/cperl-indents.erts b/test/lisp/progmodes/cperl-mode-resources/cperl-indents.erts new file mode 100644 index 00000000000..6b874ffaa1f --- /dev/null +++ b/test/lisp/progmodes/cperl-mode-resources/cperl-indents.erts @@ -0,0 +1,26 @@ +Code: + (lambda () + (cperl-mode) + (indent-region (point-min) (point-max))) + +Name: cperl-indent1 + +=-= +{ + print "", + "", + foo::bar(), + ""; +} +=-=-= + +Name: cperl-indents1 + +=-= +{ + print "", + "", + foobar(), + ""; +} +=-=-= diff --git a/test/lisp/progmodes/cperl-mode-tests.el b/test/lisp/progmodes/cperl-mode-tests.el index 7eb2d9be756..db3feec93ab 100644 --- a/test/lisp/progmodes/cperl-mode-tests.el +++ b/test/lisp/progmodes/cperl-mode-tests.el @@ -1103,4 +1103,7 @@ as a regex." (funcall cperl-test-mode) (should-not (nth 3 (syntax-ppss 3))))) +(ert-deftest test-indentation () + (ert-test-erts-file (ert-resource-file "cperl-indents.erts"))) + ;;; cperl-mode-tests.el ends here From f3277128e0e8741cf20c72c718c83e848cd92f2f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 16 Sep 2022 14:17:56 +0300 Subject: [PATCH 412/915] ; * lisp/vc/vc.el (vc-responsible-backend): Explain last change. --- lisp/vc/vc.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 05109256bd1..4688137d923 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1014,6 +1014,10 @@ responsible for the given file." (lambda (backend) (when-let ((dir (vc-call-backend backend 'responsible-p file))) + ;; We run DIR through `expand-file-name' + ;; so that abbreviated directories, such + ;; as "~/", wouldn't look "less specific" + ;; due to their artificially shorter length. (cons backend (expand-file-name dir)))) vc-handled-backends)))) ;; Just a single response (or none); use it. From 9c0403aae0498d356c56bf972013faec61097064 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 16 Sep 2022 13:18:16 +0200 Subject: [PATCH 413/915] Inhibit image-mode resizing in the minibuffer * lisp/image-mode.el (image-fit-to-window): Don't resize when in the minibuffer (bug#57823). --- lisp/image-mode.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/image-mode.el b/lisp/image-mode.el index bc0f7ccb048..0f1c4901591 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -1058,7 +1058,11 @@ Otherwise, display the image by calling `image-mode'." (defun image-fit-to-window (window) "Adjust size of image to display it exactly in WINDOW boundaries." - (when (window-live-p window) + (when (and (window-live-p window) + ;; Don't resize anything if we're in the minibuffer + ;; (which may transitively change the window sizes if you + ;; hit TAB, for instance). + (not (minibuffer-window-active-p (selected-window)))) (with-current-buffer (window-buffer window) (when (derived-mode-p 'image-mode) (let ((spec (image-get-display-property))) From 8c5363f8e89222994f041e06668a751233f96faf Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 16 Sep 2022 13:23:34 +0200 Subject: [PATCH 414/915] Regenerate ldefs-boot.el --- lisp/ldefs-boot.el | 248 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 220 insertions(+), 28 deletions(-) diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index e84795547c2..47080250020 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -4048,14 +4048,10 @@ Returns non-nil if any false statements are found. (put 'checkdoc-force-history-flag 'safe-local-variable #'booleanp) (put 'checkdoc-permit-comma-termination-flag 'safe-local-variable #'booleanp) (put 'checkdoc-spellcheck-documentation-flag 'safe-local-variable #'booleanp) -(put 'checkdoc-ispell-list-words 'safe-local-variable #'checkdoc-list-of-strings-p) +(put 'checkdoc-ispell-list-words 'safe-local-variable #'list-of-strings-p) (put 'checkdoc-arguments-in-order-flag 'safe-local-variable #'booleanp) (put 'checkdoc-verb-check-experimental-flag 'safe-local-variable #'booleanp) -(put 'checkdoc-symbol-words 'safe-local-variable #'checkdoc-list-of-strings-p) -(autoload 'checkdoc-list-of-strings-p "checkdoc" "\ -Return t when OBJ is a list of strings. - -(fn OBJ)") +(put 'checkdoc-symbol-words 'safe-local-variable #'list-of-strings-p) (put 'checkdoc-proper-noun-regexp 'safe-local-variable 'stringp) (put 'checkdoc-common-verbs-regexp 'safe-local-variable 'stringp) (autoload 'checkdoc "checkdoc" "\ @@ -16943,25 +16939,31 @@ should output the image in the current buffer, converted to ;;; Generated autoloads from image/image-crop.el -(autoload 'image-elide "image-crop" "\ -Elide a square from the image under point. -If SQUARE (interactively, the prefix), elide a square instead of a -rectangle from the image. +(autoload 'image-cut "image-crop" "\ +Cut a rectangle from the image under point. +Interactively, if given a prefix, prompt for COLOR to use. +Otherwise, default to `image-cut-color'. -(fn &optional SQUARE)" t) +(fn &optional COLOR)" t) (autoload 'image-crop "image-crop" "\ Crop the image under point. -If SQUARE (interactively, the prefix), crop a square instead of a -rectangle from the image. +If CUT is non-nil, remove a rectangle from the image instead of +cropping the image. In that case CUT should be the name of a +color to fill the rectangle. -If ELIDE, remove a rectangle from the image instead of cropping -the image. +While cropping the image, the following key bindings are available: -After cropping an image, it can be saved by `M-x image-save' or +`q': Exit without changing anything. +`RET': Crop/cut the image. +`m': Make mouse movements move the rectangle instead of altering the + rectangle shape. +`s': Same as `m', but make the rectangle into a square first. + +After cropping an image, you can save it by `M-x image-save' or \\\\[image-save] when point is over the image. -(fn &optional SQUARE ELIDE)" t) -(register-definition-prefixes "image-crop" '("image-crop-")) +(fn &optional CUT)" t) +(register-definition-prefixes "image-crop" '("image-c")) ;;; Generated autoloads from image/image-dired.el @@ -18756,7 +18758,7 @@ See `linum-mode' for more information on Linum mode. (put 'generated-autoload-file 'safe-local-variable 'stringp) (put 'generated-autoload-load-name 'safe-local-variable 'stringp) (autoload 'loaddefs-generate "loaddefs-gen" "\ -Generate loaddefs files for Lisp files in the directories DIRS. +Generate loaddefs files for Lisp files in one or more directories given by DIR. DIR can be either a single directory or a list of directories. The autoloads will be written to OUTPUT-FILE. If any Lisp file @@ -18764,7 +18766,7 @@ binds `generated-autoload-file' as a file-local variable, write its autoloads into the specified file instead. The function does NOT recursively descend into subdirectories of the -directory or directories specified by DIRS. +directories specified by DIR. Optional argument EXCLUDED-FILES, if non-nil, should be a list of files, such as preloaded files, whose autoloads should not be written @@ -23281,6 +23283,13 @@ for the result of evaluating EXP (first arg to `pcase'). Completion rules for the `cvs' command.") (register-definition-prefixes "pcmpl-cvs" '("pcmpl-cvs-")) + +;;; Generated autoloads from pcmpl-git.el + +(autoload 'pcomplete/git "pcmpl-git" "\ +Completion for the `git' command.") +(register-definition-prefixes "pcmpl-git" '("pcmpl-git--")) + ;;; Generated autoloads from pcmpl-gnu.el @@ -23294,7 +23303,16 @@ Completion for GNU `make'.") Completion for the GNU tar utility.") (autoload 'pcomplete/find "pcmpl-gnu" "\ Completion for the GNU find utility.") -(defalias 'pcomplete/gdb 'pcomplete/xargs) +(autoload 'pcomplete/awk "pcmpl-gnu" "\ +Completion for the `awk' command.") +(autoload 'pcomplete/gpg "pcmpl-gnu" "\ +Completion for the `gpg` command.") +(autoload 'pcomplete/gdb "pcmpl-gnu" "\ +Completion for the `gdb' command.") +(autoload 'pcomplete/emacs "pcmpl-gnu" "\ +Completion for the `emacs' command.") +(autoload 'pcomplete/emacsclient "pcmpl-gnu" "\ +Completion for the `emacsclient' command.") (register-definition-prefixes "pcmpl-gnu" '("pcmpl-gnu-" "pcomplete/find")) @@ -23306,6 +23324,10 @@ Completion for GNU/Linux `kill', using /proc filesystem.") Completion for GNU/Linux `umount'.") (autoload 'pcomplete/mount "pcmpl-linux" "\ Completion for GNU/Linux `mount'.") +(autoload 'pcomplete/systemctl "pcmpl-linux" "\ +Completion for the `systemctl' command.") +(autoload 'pcomplete/journalctl "pcmpl-linux" "\ +Completion for the `journalctl' command.") (register-definition-prefixes "pcmpl-linux" '("pcmpl-linux-" "pcomplete-pare-list")) @@ -23313,6 +23335,8 @@ Completion for GNU/Linux `mount'.") (autoload 'pcomplete/rpm "pcmpl-rpm" "\ Completion for the `rpm' command.") +(autoload 'pcomplete/dnf "pcmpl-rpm" "\ +Completion for the `dnf' command.") (register-definition-prefixes "pcmpl-rpm" '("pcmpl-rpm-")) @@ -23324,16 +23348,174 @@ Completion for `cd'.") (autoload 'pcomplete/rmdir "pcmpl-unix" "\ Completion for `rmdir'.") (autoload 'pcomplete/rm "pcmpl-unix" "\ -Completion for `rm'.") +Completion for the `rm' command.") (autoload 'pcomplete/xargs "pcmpl-unix" "\ Completion for `xargs'.") -(defalias 'pcomplete/time 'pcomplete/xargs) +(autoload 'pcomplete/time "pcmpl-unix" "\ +Completion for the `time' command.") (autoload 'pcomplete/which "pcmpl-unix" "\ Completion for `which'.") +(autoload 'pcomplete/cat "pcmpl-unix" "\ +Completion for the `cat' command.") +(autoload 'pcomplete/tac "pcmpl-unix" "\ +Completion for the `tac' command.") +(autoload 'pcomplete/nl "pcmpl-unix" "\ +Completion for the `nl' command.") +(autoload 'pcomplete/od "pcmpl-unix" "\ +Completion for the `od' command.") +(autoload 'pcomplete/base32 "pcmpl-unix" "\ +Completion for the `base32' and `base64' commands.") +(defalias 'pcomplete/base64 'pcomplete/base32) +(autoload 'pcomplete/basenc "pcmpl-unix" "\ +Completion for the `basenc' command.") +(autoload 'pcomplete/fmt "pcmpl-unix" "\ +Completion for the `fmt' command.") +(autoload 'pcomplete/pr "pcmpl-unix" "\ +Completion for the `pr' command.") +(autoload 'pcomplete/fold "pcmpl-unix" "\ +Completion for the `fold' command.") +(autoload 'pcomplete/head "pcmpl-unix" "\ +Completion for the `head' command.") +(autoload 'pcomplete/tail "pcmpl-unix" "\ +Completion for the `tail' command.") +(autoload 'pcomplete/split "pcmpl-unix" "\ +Completion for the `split' command.") +(autoload 'pcomplete/csplit "pcmpl-unix" "\ +Completion for the `csplit' command.") +(autoload 'pcomplete/wc "pcmpl-unix" "\ +Completion for the `wc' command.") +(autoload 'pcomplete/sum "pcmpl-unix" "\ +Completion for the `sum' command.") +(autoload 'pcomplete/cksum "pcmpl-unix" "\ +Completion for the `cksum' command.") +(autoload 'pcomplete/b2sum "pcmpl-unix" "\ +Completion for the `b2sum' command.") +(autoload 'pcomplete/md5sum "pcmpl-unix" "\ +Completion for checksum commands.") +(defalias 'pcomplete/sha1sum 'pcomplete/md5sum) +(defalias 'pcomplete/sha224sum 'pcomplete/md5sum) +(defalias 'pcomplete/sha256sum 'pcomplete/md5sum) +(defalias 'pcomplete/sha384sum 'pcomplete/md5sum) +(defalias 'pcomplete/sha521sum 'pcomplete/md5sum) +(autoload 'pcomplete/sort "pcmpl-unix" "\ +Completion for the `sort' command.") +(autoload 'pcomplete/shuf "pcmpl-unix" "\ +Completion for the `shuf' command.") +(autoload 'pcomplete/uniq "pcmpl-unix" "\ +Completion for the `uniq' command.") +(autoload 'pcomplete/comm "pcmpl-unix" "\ +Completion for the `comm' command.") +(autoload 'pcomplete/ptx "pcmpl-unix" "\ +Completion for the `ptx' command.") +(autoload 'pcomplete/tsort "pcmpl-unix" "\ +Completion for the `tsort' command.") +(autoload 'pcomplete/cut "pcmpl-unix" "\ +Completion for the `cut' command.") +(autoload 'pcomplete/paste "pcmpl-unix" "\ +Completion for the `paste' command.") +(autoload 'pcomplete/join "pcmpl-unix" "\ +Completion for the `join' command.") +(autoload 'pcomplete/tr "pcmpl-unix" "\ +Completion for the `tr' command.") +(autoload 'pcomplete/expand "pcmpl-unix" "\ +Completion for the `expand' command.") +(autoload 'pcomplete/unexpand "pcmpl-unix" "\ +Completion for the `unexpand' command.") +(autoload 'pcomplete/ls "pcmpl-unix" "\ +Completion for the `ls' command.") +(defalias 'pcomplete/dir 'pcomplete/ls) +(defalias 'pcomplete/vdir 'pcomplete/ls) +(autoload 'pcomplete/cp "pcmpl-unix" "\ +Completion for the `cp' command.") +(autoload 'pcomplete/dd "pcmpl-unix" "\ +Completion for the `dd' command.") +(autoload 'pcomplete/install "pcmpl-unix" "\ +Completion for the `install' command.") +(autoload 'pcomplete/mv "pcmpl-unix" "\ +Completion for the `mv' command.") +(autoload 'pcomplete/shred "pcmpl-unix" "\ +Completion for the `shred' command.") +(autoload 'pcomplete/ln "pcmpl-unix" "\ +Completion for the `ln' command.") +(autoload 'pcomplete/mkdir "pcmpl-unix" "\ +Completion for the `mkdir' command.") +(autoload 'pcomplete/mkfifo "pcmpl-unix" "\ +Completion for the `mkfifo' command.") +(autoload 'pcomplete/mknod "pcmpl-unix" "\ +Completion for the `mknod' command.") +(autoload 'pcomplete/readlink "pcmpl-unix" "\ +Completion for the `readlink' command.") (autoload 'pcomplete/chown "pcmpl-unix" "\ Completion for the `chown' command.") (autoload 'pcomplete/chgrp "pcmpl-unix" "\ Completion for the `chgrp' command.") +(autoload 'pcomplete/chmod "pcmpl-unix" "\ +Completion for the `chmod' command.") +(autoload 'pcomplete/touch "pcmpl-unix" "\ +Completion for the `touch' command.") +(autoload 'pcomplete/df "pcmpl-unix" "\ +Completion for the `df' command.") +(autoload 'pcomplete/du "pcmpl-unix" "\ +Completion for the `du' command.") +(autoload 'pcomplete/stat "pcmpl-unix" "\ +Completion for the `stat' command.") +(autoload 'pcomplete/sync "pcmpl-unix" "\ +Completion for the `sync' command.") +(autoload 'pcomplete/truncate "pcmpl-unix" "\ +Completion for the `truncate' command.") +(autoload 'pcomplete/echo "pcmpl-unix" "\ +Completion for the `echo' command.") +(autoload 'pcomplete/test "pcmpl-unix" "\ +Completion for the `test' command.") +(defalias (intern "pcomplete/[") 'pcomplete/test) +(autoload 'pcomplete/tee "pcmpl-unix" "\ +Completion for the `tee' command.") +(autoload 'pcomplete/basename "pcmpl-unix" "\ +Completion for the `basename' command.") +(autoload 'pcomplete/dirname "pcmpl-unix" "\ +Completion for the `dirname' command.") +(autoload 'pcomplete/pathchk "pcmpl-unix" "\ +Completion for the `pathchk' command.") +(autoload 'pcomplete/mktemp "pcmpl-unix" "\ +Completion for the `mktemp' command.") +(autoload 'pcomplete/realpath "pcmpl-unix" "\ +Completion for the `realpath' command.") +(autoload 'pcomplete/id "pcmpl-unix" "\ +Completion for the `id' command.") +(autoload 'pcomplete/groups "pcmpl-unix" "\ +Completion for the `groups' command.") +(autoload 'pcomplete/who "pcmpl-unix" "\ +Completion for the `who' command.") +(autoload 'pcomplete/date "pcmpl-unix" "\ +Completion for the `date' command.") +(autoload 'pcomplete/nproc "pcmpl-unix" "\ +Completion for the `nproc' command.") +(autoload 'pcomplete/uname "pcmpl-unix" "\ +Completion for the `uname' command.") +(autoload 'pcomplete/hostname "pcmpl-unix" "\ +Completion for the `hostname' command.") +(autoload 'pcomplete/uptime "pcmpl-unix" "\ +Completion for the `uptime' command.") +(autoload 'pcomplete/chcon "pcmpl-unix" "\ +Completion for the `chcon' command.") +(autoload 'pcomplete/runcon "pcmpl-unix" "\ +Completion for the `runcon' command.") +(autoload 'pcomplete/chroot "pcmpl-unix" "\ +Completion for the `chroot' command.") +(autoload 'pcomplete/env "pcmpl-unix" "\ +Completion for the `env' command.") +(autoload 'pcomplete/nice "pcmpl-unix" "\ +Completion for the `nice' command.") +(autoload 'pcomplete/nohup "pcmpl-unix" "\ +Completion for the `nohup' command.") +(autoload 'pcomplete/stdbuf "pcmpl-unix" "\ +Completion for the `stdbuf' command.") +(autoload 'pcomplete/timeout "pcmpl-unix" "\ +Completion for the `timeout' command.") +(autoload 'pcomplete/numfmt "pcmpl-unix" "\ +Completion for the `numfmt' command.") +(autoload 'pcomplete/seq "pcmpl-unix" "\ +Completion for the `seq' command.") (autoload 'pcomplete/ssh "pcmpl-unix" "\ Completion rules for the `ssh' command.") (defalias 'pcomplete/rsh #'pcomplete/ssh) @@ -23341,13 +23523,25 @@ Completion rules for the `ssh' command.") Completion rules for the `scp' command. Includes files as well as host names followed by a colon.") (autoload 'pcomplete/telnet "pcmpl-unix") +(autoload 'pcomplete/sudo "pcmpl-unix" "\ +Completion for the `sudo' command.") (register-definition-prefixes "pcmpl-unix" '("pcmpl-" "pcomplete/")) ;;; Generated autoloads from pcmpl-x.el +(autoload 'pcomplete/tex "pcmpl-x" "\ +Completion for the `tex' command.") +(defalias 'pcomplete/pdftex 'pcomplete/tex) +(defalias 'pcomplete/latex 'pcomplete/tex) +(defalias 'pcomplete/pdflatex 'pcomplete/tex) +(autoload 'pcomplete/luatex "pcmpl-x" "\ +Completion for the `luatex' command.") +(defalias 'pcomplete/lualatex 'pcomplete/luatex) (autoload 'pcomplete/tlmgr "pcmpl-x" "\ Completion for the `tlmgr' command.") +(autoload 'pcomplete/rg "pcmpl-x" "\ +Completion for the `rg' command.") (autoload 'pcomplete/ack "pcmpl-x" "\ Completion for the `ack' command. Start an argument with `-' to complete short options and `--' for @@ -23358,6 +23552,8 @@ Completion for the `ag' command.") (autoload 'pcomplete/bcc32 "pcmpl-x" "\ Completion function for Borland's C++ compiler.") (defalias 'pcomplete/bcc 'pcomplete/bcc32) +(autoload 'pcomplete/rclone "pcmpl-x" "\ +Completion for the `rclone' command.") (register-definition-prefixes "pcmpl-x" '("pcmpl-x-")) @@ -33558,11 +33754,7 @@ case, and the process object in the asynchronous case. ;;; Generated autoloads from vc/vc-git.el -(defun vc-git-annotate-switches-safe-p (switches) "\ -Check if local value of `vc-git-annotate-switches' is safe. -Currently only \"-w\" (ignore whitespace) is considered safe, but -this list might be extended in the future." (equal switches "-w")) -(put 'vc-git-annotate-switches 'safe-local-variable #'vc-git-annotate-switches-safe-p) +(put 'vc-git-annotate-switches 'safe-local-variable (lambda (switches) (equal switches "-w"))) (defun vc-git-registered (file) "Return non-nil if FILE is registered with git." (if (vc-find-root file ".git") ; Short cut. From e485734151ca3741ecf03e27aae2384fc7ace461 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 16 Sep 2022 14:23:41 +0300 Subject: [PATCH 415/915] ; * lisp/image/image-crop.el (image-cut): Doc fix. --- lisp/image/image-crop.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/image/image-crop.el b/lisp/image/image-crop.el index 682fce39866..8b6694f2231 100644 --- a/lisp/image/image-crop.el +++ b/lisp/image/image-crop.el @@ -105,9 +105,9 @@ image data.") ;;;###autoload (defun image-cut (&optional color) - "Cut a rectangle from the image under point. -Interactively, if given a prefix, prompt for COLOR to use. -Otherwise, default to `image-cut-color'." + "Cut a rectangle from the image under point, filling it with COLOR. +COLOR defaults to the value of `image-cut-color'. +Interactively, with prefix argument, prompt for COLOR to use." (interactive (list (and current-prefix-arg (read-color "Use color: ")))) (image-crop (if (zerop (length color)) image-cut-color color))) From e3fa41ac9217cc0a4dd83676c349786290e6fa09 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Fri, 16 Sep 2022 13:38:01 +0200 Subject: [PATCH 416/915] Fix *Help* output for native-comp functions from IELM * lisp/help-fns.el (find-lisp-object-file-name): Don't claim that native-comp functions that are defined outside of files (for instance, created by calling `native-compile' in IELM) are in C source (bug#57819). --- lisp/help-fns.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/help-fns.el b/lisp/help-fns.el index a3d4e002b6f..2bb3e63487c 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -457,7 +457,9 @@ the C sources, too." load-path '(".el" ".elc") 'readable)))))))) (cond - ((and (not file-name) (subrp type)) + ((and (not file-name) + (subrp type) + (not (subr-native-elisp-p type))) ;; A built-in function. The form is from `describe-function-1'. (if (or (get-buffer " *DOC*") (and also-c-source From 19de241a7dc193c0d0423019824627adb28f8944 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 13:59:51 +0200 Subject: [PATCH 417/915] Recommend NonGNU ELPA over MELPA * doc/misc/org.org (Using CDLaTeX to enter math, Footnotes): Recommend NonGNU ELPA over MELPA. --- doc/misc/org.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/misc/org.org b/doc/misc/org.org index 9f69c684318..16cddbc3c9f 100644 --- a/doc/misc/org.org +++ b/doc/misc/org.org @@ -11042,7 +11042,7 @@ a major LaTeX mode like AUCTeX in order to speed-up insertion of environments and math templates. Inside Org mode, you can make use of some of the features of CDLaTeX mode. You need to install =cdlatex.el= and =texmathp.el= (the latter comes also with AUCTeX) -using [[https://melpa.org/][MELPA]] with the [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Package-Installation.html][Emacs packaging system]] or alternatively from +from [[https://elpa.nongnu.org/][NonGNU ELPA]] with the [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Package-Installation.html][Emacs packaging system]] or alternatively from [[https://staff.fnwi.uva.nl/c.dominik/Tools/cdlatex/]]. Do not use CDLaTeX mode itself under Org mode, but use the special version Org CDLaTeX minor mode that comes as part of Org. Turn it on for the @@ -22024,7 +22024,7 @@ a deadline string. See ~org-agenda-entry-types~ on how to set what planning information is taken into account. [fn:104] For HTML you need to install Hrvoje Nikšić's =htmlize.el= -as an Emacs package from MELPA or from [[https://github.com/hniksic/emacs-htmlize][Hrvoje Nikšić's repository]]. +as an Emacs package from [[https://elpa.nongnu.org/][NonGNU ELPA]] or from [[https://github.com/hniksic/emacs-htmlize][Hrvoje Nikšić's repository]]. [fn:105] To create PDF output, the Ghostscript ps2pdf utility must be installed on the system. Selecting a PDF file also creates the From 838e6cae81392139377dd8b78b52ff3aaeba2fc1 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 16 Sep 2022 15:07:08 +0200 Subject: [PATCH 418/915] ; * etc/NEWS: Fix typos. --- etc/NEWS | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 9036e4ee019..df09533c0b9 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -107,7 +107,7 @@ as was already the case for all the non-preloaded files. ** Emacs Sessions (Desktop) +++ -*** New option to load a locked desktop if locking Emacs is not running. +*** New user option to load a locked desktop if locking Emacs is not running. The option 'desktop-load-locked-desktop' can now be set to the value 'check-pid', which means to allow loading a locked ".emacs.desktop" file if the Emacs process which locked it is no longer running on the @@ -189,7 +189,7 @@ buffers, but not in buffers that inherit from 'special-mode'. To get back to how things worked in Emacs 28.1, put the following in your init file: - (setopt show-paren-predicate t) + (setopt show-paren-predicate t) +++ *** Explicitly-set read-only state is preserved when reverting a buffer. @@ -1588,7 +1588,7 @@ Non-nil means that the default definitions of equivalent characters are overridden. *** New command 'describe-char-fold-equivalences'. -It displays character equivalences used by `char-fold-to-regexp'. +It displays character equivalences used by 'char-fold-to-regexp'. +++ *** New command 'isearch-emoji-by-name'. @@ -1681,7 +1681,7 @@ consistent with 'vc-responsible-backend'. --- *** Log Edit now font locks long Git commit summary lines. Writing shorter summary lines avoids truncation in contexts in which -Git commands display summary lines. See the two new variables +Git commands display summary lines. See the two new user options 'vc-git-log-edit-summary-target-len' and 'vc-git-log-edit-summary-max-len'. ** Message @@ -1951,16 +1951,16 @@ as opposed to via the command-line. *** New command 'image-transform-fit-to-window'. This command fits the image to the current window by scaling down or up as necessary. Unlike 'image-transform-fit-both', this does not -only scale the image down, but up as well. It is bound to "s w" in +only scale the image down, but up as well. It is bound to 's w' in Image Mode by default. --- *** New command 'image-mode-wallpaper-set'. This command sets the desktop background to the current image. It is -bound to "W" by default. +bound to 'W' by default. +++ -*** 'image-transform-fit-to-(height|width)' are now obsolete. +*** 'image-transform-fit-to-{height,width}' are now obsolete. Use the new command 'image-transform-fit-to-window' instead. The keybinding for 'image-transform-fit-to-width' is now 's i'. @@ -1986,7 +1986,7 @@ These commands horizontally and vertically flip the image under point. +++ *** New command 'image-transform-set-percent'. It allows setting the image size to a percentage of its original size, -and is bound to "s p" in Image mode. +and is bound to 's p' in Image mode. +++ *** 'image-transform-original' renamed to 'image-transform-reset-to-original'. @@ -2107,7 +2107,7 @@ now obsolete: 'image-dired-gallery-thumb-image-root-url', 'image-dired-gallery-image-root-url'. --- -*** 'image-dired-rotate-thumbnail-(left|right)' is now obsolete. +*** 'image-dired-rotate-thumbnail-{left,right}' are now obsolete. Instead, use commands 'image-dired-refresh-thumb' to generate a new thumbnail, or 'image-rotate' to rotate the thumbnail without updating the thumbnail file. @@ -2178,9 +2178,9 @@ recently set. It is bound to the new command 'bookmark-edit-annotation-cancel'. --- -*** New option 'bookmark-fringe-mark'. +*** New user option 'bookmark-fringe-mark'. This option controls the bitmap used to indicate bookmarks in the -fringe (or 'nil' to disable showing this marker). +fringe (or nil to disable showing this marker). ** Exif @@ -2282,7 +2282,7 @@ in the project root directory and is shared among all project buffers. Without a prefix argument, the kind of shell (buffer-dedicated, project-dedicated or global) is specified by the new -'python-shell-dedicated' variable. +'python-shell-dedicated' user option. ** Ruby Mode @@ -2308,14 +2308,15 @@ automatically insert the Tramp prefix. The automatic insertion applies only when 'default-directory' is remote and the command is a Lisp function. This frees you from having to keep track of whether commands are Lisp function or external when supplying absolute file -name arguments. See "Electric forward slash" in the Eshell manual. +name arguments. See the "(eshell) Electric forward slash" node in the +Eshell manual for details. +++ *** Improved support for redirection operators in Eshell. Eshell now supports a wider variety of redirection operators. For example, you can now redirect both stdout and stderr via '&>' or duplicate one output handle to another via 'NEW-FD>&OLD-FD'. For more -information, see "Redirections" in the Eshell manual. +information, see the "(eshell) Redirection" node in the Eshell manual. +++ *** Double-quoting an Eshell expansion now treats the result as a single string. @@ -2434,7 +2435,7 @@ instead of also trying to ping it. Customize the user option *** The 'run-dig' command is now obsolete; use 'dig' instead. --- -*** Some `bib-mode' commands and variables have been renamed. +*** Some 'bib-mode' commands and variables have been renamed. To respect Emacs naming conventions, the variable 'unread-bib-file' has been renamed to 'bib-unread-file'. The following commands have also been renamed: @@ -2468,15 +2469,15 @@ name. These commands allow interactively cropping/cutting the image at point. The commands are bound to keys 'c' and 'x' (respectively) in the local keymap over images. They rely on external programs, by -default 'convert' from ImageMagick, to do the actual cropping/eliding +default "convert" from ImageMagick, to do the actual cropping/eliding of the image file. --- ** New package 'wallpaper'. This package provides the command 'wallpaper-set', which sets the desktop background image. Depending on the system and the desktop, -this may require an external program (such as 'swaybg', 'gm', -'display' or 'xloadimage'). If so, a suitable command should be +this may require an external program (such as "swaybg", "gm", +"display" or "xloadimage"). If so, a suitable command should be detected automatically in most cases. It can also be customized manually if needed, using the new user options 'wallpaper-command' and 'wallpaper-command-args'. @@ -2687,7 +2688,7 @@ It's been obsolete since Emacs-22.1, actually. negative arguments, and is generally slower than 'ash', which should be used instead. This warning can be suppressed by surrounding calls to 'lsh' with the construct '(with-suppressed-warnings ((suspicious lsh)) ...)', -but switching to `ash` is generally much preferable. +but switching to 'ash' is generally much preferable. --- ** Some functions and variables obsolete since Emacs 24 have been removed: @@ -2837,12 +2838,12 @@ patcomp.el, pc-mode.el, pc-select.el, s-region.el, and sregex.el. Emacs has a number of rather obscure generalized variables defined, that, for instance, allowed you to say things like: - (setf (point-min) 4) + (setf (point-min) 4) These never caught on and have been made obsolete. The form above, for instance, is the same as saying - (narrow-to-region 4 (point-max)) + (narrow-to-region 4 (point-max)) The following generalized variables have been made obsolete: 'buffer-file-name', 'buffer-local-value', 'buffer-modified-p', From 70ca5f652409ce7a85d1ddbcc16036b4266ec053 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 15:03:19 +0200 Subject: [PATCH 419/915] ; * etc/NEWS: Fix typos. --- etc/NEWS | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 4030589decf..15854be8fd2 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -386,7 +386,7 @@ the current buffer and the text "GNU Emacs" instead of the value of your init file: (setq frame-title-format '(multiple-frames "%b" - ("" invocation-name "@" system-name))) + ("" invocation-name "@" system-name))) *** New frame parameter 'drag-with-tab-line'. This parameter, similar to 'drag-with-header-line', allows moving frames @@ -3951,7 +3951,6 @@ and enable the MS-Windows native Input Method Editor (IME) at run time. A companion function 'w32-get-ime-open-status' returns the current IME activation status. --- ** On macOS, 's-' and 's-' are now bound to 'move-beginning-of-line' and 'move-end-of-line' respectively. The commands to select previous/next frame are still bound to 's-~' and 's-`'. From 397890ba77465f71c4ccd38314f30907b78193b8 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 15:16:43 +0200 Subject: [PATCH 420/915] Delete "etc/NEWS*.html" from .gitignore We actually do want to see it when preparing a release, so that we don't include it in a tarball by mistake. * .gitignore: Don't ignore "etc/NEWS*.html". --- .gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitignore b/.gitignore index e48e3594269..2254b8a9c8e 100644 --- a/.gitignore +++ b/.gitignore @@ -263,7 +263,6 @@ doc/misc/cc-mode.ss doc/misc/modus-themes.texi doc/misc/org.texi etc/DOC -etc/NEWS*.html etc/refcards/emacsver.tex gnustmp* /info/ From 4da0fbdc82577da0583c8858a52f456beb23fd0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Fri, 16 Sep 2022 15:29:03 +0200 Subject: [PATCH 421/915] Faster and more robust list-of-strings-p * lisp/subr.el (list-of-strings-p): Speed up by a factor 4 (approx.) and don't crash on dotted lists. * test/lisp/subr-tests.el (test-list-of-strings-p): Extend test. --- lisp/subr.el | 5 +++-- test/lisp/subr-tests.el | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lisp/subr.el b/lisp/subr.el index e8e8f1584b4..caea2b9f933 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4028,8 +4028,9 @@ Otherwise, return nil." (defun list-of-strings-p (object) "Return t if OBJECT is nil or a list of strings." - (and (listp object) - (seq-every-p #'stringp object))) + (while (and (consp object) (stringp (car object))) + (setq object (cdr object))) + (null object)) (defun booleanp (object) "Return t if OBJECT is one of the two canonical boolean values: t or nil. diff --git a/test/lisp/subr-tests.el b/test/lisp/subr-tests.el index 38966cea585..347981e8185 100644 --- a/test/lisp/subr-tests.el +++ b/test/lisp/subr-tests.el @@ -1163,7 +1163,8 @@ final or penultimate step during initialization.")) (should (list-of-strings-p nil)) (should (list-of-strings-p '("a" "b"))) (should-not (list-of-strings-p ["a" "b"])) - (should-not (list-of-strings-p '("a" nil "b")))) + (should-not (list-of-strings-p '("a" nil "b"))) + (should-not (list-of-strings-p '("a" "b" . "c")))) (provide 'subr-tests) ;;; subr-tests.el ends here From ec2dfd110c407038ab1abc7fd713d37ada91edd9 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Fri, 16 Sep 2022 13:57:40 +0000 Subject: [PATCH 422/915] cc-fonts.el: Eliminate an Emacs compiler warning introduced yesterday. * lisp/progmodes/cc-fonts.el (top level): Introduce a cc-bytecomp-defvar for font-lock-reference-face. --- lisp/progmodes/cc-fonts.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index c52f4a8416b..5d80eb58e38 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -99,6 +99,8 @@ (cc-bytecomp-defun c-font-lock-invalid-string) (cc-bytecomp-defun c-font-lock-fontify-region) +(cc-bytecomp-defvar font-lock-reference-face) ; For Emacs 29 + ;; Note that font-lock in XEmacs doesn't expand face names as ;; variables, so we have to use the (eval . FORM) in the font lock @@ -165,9 +167,8 @@ (defconst c-doc-markup-face-name (if (c-face-name-p 'font-lock-doc-markup-face) - ;; If it happens to occur in the future. (Well, the more - ;; pragmatic reason is to get unique faces for the test - ;; suite.) + ;; Exists in Emacs 28+. (For other emacsen, the pragmatic + ;; reason is to get unique faces for the test suite.) 'font-lock-doc-markup-face c-label-face-name)) From d407bdfd01a8fa4a1a20b8b0f1d07629be4ae54f Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 16:06:09 +0200 Subject: [PATCH 423/915] Add command to delete temporary markers in NEWS * lisp/textmodes/emacs-news-mode.el (emacs-news-delete-temporary-markers): New command. * admin/make-tarball.txt: Update instructions. --- admin/make-tarball.txt | 11 ++++++----- lisp/textmodes/emacs-news-mode.el | 11 +++++++++++ 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/admin/make-tarball.txt b/admin/make-tarball.txt index ad2aacb57a9..9a406b24fa1 100644 --- a/admin/make-tarball.txt +++ b/admin/make-tarball.txt @@ -52,11 +52,12 @@ General steps (for each step, check for possible errors): ./autogen.sh ./configure --with-native-compilation && make - 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. For a bug fix release (e.g. 28.2), delete any empty - headlines too. + For a release (as opposed to pretest), visit etc/NEWS and use the + "M-x emacs-news-delete-temporary-markers" command to 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. For a bug fix release (e.g. 28.2), + delete any empty headlines too. 2. Regenerate the versioned ChangeLog.N and etc/AUTHORS files. diff --git a/lisp/textmodes/emacs-news-mode.el b/lisp/textmodes/emacs-news-mode.el index 6bf96deaccb..88e89480609 100644 --- a/lisp/textmodes/emacs-news-mode.el +++ b/lisp/textmodes/emacs-news-mode.el @@ -276,6 +276,17 @@ documentation marks on the previous line." (forward-line -1)) (open-line n)) +(defun emacs-news-delete-temporary-markers () + "Delete any temporary markers. +This is used when preparing a new release of Emacs." + (interactive nil emacs-news-mode) + (goto-char (point-min)) + (re-search-forward "^Temporary note:$") + (forward-line -1) + (delete-region (point) (save-excursion (forward-paragraph) (point))) + (while (re-search-forward (rx bol (or "+++" "---") eol) nil t) + (delete-line))) + (provide 'emacs-news-mode) ;;; emacs-news-mode.el ends here From 01ad2a4a926ba56ce370db9e368e72cf824026e5 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 16:10:26 +0200 Subject: [PATCH 424/915] ; * etc/NEWS.28: Fix merge of NEWS.28. --- etc/NEWS.28 | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/etc/NEWS.28 b/etc/NEWS.28 index 1e8bd499b68..5f3626eeeb0 100644 --- a/etc/NEWS.28 +++ b/etc/NEWS.28 @@ -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 @@ -3257,12 +3284,13 @@ completing on commands from buffers in major modes derived from MODE..., or, if it's a minor mode, when that minor mode is enabled in the current buffer. -Note that these forms will only have their effect if the +Note that these forms will only have their effect for 'M-x' if the 'read-extended-command-predicate' user option is customized to call 'command-completion-default-include-p' or a similar function. The default value of 'read-extended-command-predicate' is nil, which means no commands that match what you have typed are excluded from being -completion candidates. +completion candidates. The forms will, however, be used by 'M-S-x' by +default. ** 'define-minor-mode' now takes an ':interactive' argument. This can be used for specifying which modes this minor mode is meant From f232d989fd90dc35b647da9db152d70b421f35a9 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 14:17:14 +0200 Subject: [PATCH 425/915] Improve HTML export of NEWS file * admin/admin.el (admin--org-export-headers-format) (admin--org-html-postamble): New variables. (admin--require-external-package): New function. (make-news-html-file): Improve HTML export. --- admin/admin.el | 211 ++++++++++++++++++++++++++++++------------------- 1 file changed, 130 insertions(+), 81 deletions(-) diff --git a/admin/admin.el b/admin/admin.el index 12e6fcb7f8c..60b043a3516 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -770,69 +770,13 @@ Optional argument TYPE is type of output (nil means all)." (if (member type (list nil m)) (make-manuals-dist--1 root m)))) -(defun make-news-html-file (root version) - "Convert the NEWS file into an HTML file." - (interactive (let ((root - (if noninteractive - (or (pop command-line-args-left) - default-directory) - (read-directory-name "Emacs root directory: " - source-directory nil t)))) - (list root - (read-string "Version number: " emacs-version)))) - (unless (file-exists-p (expand-file-name "src/emacs.c" root)) - (user-error "%s doesn't seem to be the root of an Emacs source tree" root)) - (let* ((dir (make-temp-file "emacs-news-file" t)) - (orig (expand-file-name "etc/NEWS" root)) - (new (expand-file-name (format "NEWS.%s.org" version) dir)) - (html-file (format "%s.html" (file-name-base new))) - (copyright-years (format-time-string "%Y"))) - (unwind-protect - (progn - (copy-file orig new) - (find-file new) - - ;; Find the copyright range: - (goto-char (point-min)) - (re-search-forward "^Copyright (C) \\([0-9-]+\\) Free Software Foundation, Inc.") - (setq copyright-years (match-string 1)) - - ;; Get rid of some unnecessary stuff: - (replace-regexp-in-region "^---$" "" (point-min) (point-max)) - (replace-regexp-in-region "^\\+\\+\\+$" "" (point-min) (point-max)) - (dolist (str '(" \n" - "GNU Emacs NEWS -- history of user-visible changes." - "Temporary note:" - "+++ indicates that all relevant manuals in doc/ have been updated." - "--- means no change in the manuals is needed." - "When you add a new item, use the appropriate mark if you are sure it" - "applies, and please also update docstrings as needed." - "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'.")) - (replace-string-in-region str "" (point-min) (point-max))) - - ;; Use Org-mode markers for . - (replace-regexp-in-region - ;; This could probably be improved quite a bit... - (rx "'" (group (+ (not (any "'\n")))) "'") - "~\\1~" (point-min) (point-max)) - - ;; Format Emacs Lisp. - (while (re-search-forward "^ " nil t) - (backward-paragraph) - (insert "\n#+begin_src emacs-lisp") - (forward-paragraph) - (insert "#+end_src\n")) - - ;; Insert Org-mode export headers. - (goto-char (point-min)) - (insert (format - "\ +(defvar admin--org-export-headers-format "\ #+title: GNU Emacs %s NEWS -- history of user-visible changes #+author: -#+options: author:nil creator:nil toc:1 num:2 *:nil \\n:nil +#+options: author:nil creator:nil toc:1 num:2 *:nil \\n:t ^:nil tex:nil #+language: en -#+HTML_LINK_HOME: https://www.gnu.org/software/emacs +#+HTML_LINK_HOME: /software/emacs +#+HTML_LINK_UP: /software/emacs #+html_head_extra: #+html_head_extra: #+html_head_extra: @@ -844,12 +788,9 @@ Optional argument TYPE is type of output (nil means all)." of a GNU] \" width=\"129\" height=\"122\"/> -#+END_EXPORT\n\n" - version)) - (org-mode) - (let ((org-html-postamble - (format - " +#+END_EXPORT\n\n") + +(defvar admin--org-html-postamble "

Return to the GNU Emacs home page.

@@ -884,21 +825,129 @@ $Date: %s $

-" - copyright-years - ;; e.g. "2022/09/13 09:13:13" - (format-time-string "%Y/%M/%y %H:%m:%S")))) - ;; Actually export. - (org-html-export-to-html) - ;; Kill the .org buffer. - (kill-buffer (current-buffer)) - ;; Move file into place. - (let ((old (expand-file-name html-file dir)) - (new (expand-file-name html-file (expand-file-name "etc" root)))) - (delete-file new) - (copy-file old new) - (find-file new)))) - (delete-directory dir t)))) +") + +(defun admin--require-external-package (pkg) + (package-initialize) + (require pkg nil t) + (unless (featurep pkg) + (when (yes-or-no-p (format "Package \"%s\" is missing. Install now?" pkg)) + (package-install pkg) + (require pkg nil t)))) + +(defvar org-html-postamble) +(defvar org-html-mathjax-template) +(defun make-news-html-file (root version) + "Convert the NEWS file into an HTML file." + (interactive (let ((root + (if noninteractive + (or (pop command-line-args-left) + default-directory) + (read-directory-name "Emacs root directory: " + source-directory nil t)))) + (list root + (read-string "Major version number: " + (number-to-string emacs-major-version))))) + (unless (file-exists-p (expand-file-name "src/emacs.c" root)) + (user-error "%s doesn't seem to be the root of an Emacs source tree" root)) + (admin--require-external-package 'htmlize) + (let* ((orig (expand-file-name "etc/NEWS" root)) + (new (expand-file-name (format "etc/NEWS.%s.org" version) root)) + (html-file (format "%s.html" (file-name-base new))) + (copyright-years (format-time-string "%Y"))) + (copy-file orig new t) + (find-file new) + + ;; Find the copyright range. + (goto-char (point-min)) + (re-search-forward "^Copyright (C) \\([0-9-]+\\) Free Software Foundation, Inc.") + (setq copyright-years (match-string 1)) + + ;; Delete some unnecessary stuff. + (replace-regexp-in-region "^---$" "" (point-min) (point-max)) + (replace-regexp-in-region "^\\+\\+\\+$" "" (point-min) (point-max)) + (dolist (str '(" \n" + "GNU Emacs NEWS -- history of user-visible changes." + "Temporary note:" + "+++ indicates that all relevant manuals in doc/ have been updated." + "--- means no change in the manuals is needed." + "When you add a new item, use the appropriate mark if you are sure it" + "applies, and please also update docstrings as needed." + "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'.")) + (replace-string-in-region str "" (point-min) (point-max))) + + ;; Escape some characters. + (replace-regexp-in-region (rx "$") "@@html:$@@" (point-min) (point-max)) + + ;; Use Org-mode markers for 'symbols', 'C-x k', etc. + (replace-regexp-in-region + (rx-let ((key (seq + ;; Modifier (optional) + (? (any "ACHMSs") "-") + (or + ;; single key + (not (any " \n")) + ;; "" and " " + (seq "<" + (+ (any "A-Za-z-")) + (+ (seq " " (+ (any "A-Za-z-")))) + ">") + "NUL" "RET" "LFD" "TAB" + "ESC" "SPC" "DEL"))) + (email (seq (+ (not (any " @\n"))) + "@" + (+ (not (any " @\n"))))) + (lisp-symbol (regexp lisp-mode-symbol-regexp))) + (rx "'" (group + (or lisp-symbol + email + (seq "M-x " lisp-symbol) + (seq key (+ " " key)))) + "'")) + "~\\1~" (point-min) (point-max)) + + ;; Format code blocks. + (while (re-search-forward "^ " nil t) + (let ((elisp-block (looking-at "("))) + (backward-paragraph) + (insert (if elisp-block + "\n#+BEGIN_SRC emacs-lisp" + "\n#+BEGIN_EXAMPLE")) + (forward-paragraph) + (insert (if elisp-block + "#+END_SRC\n" + "#+END_EXAMPLE\n")))) + + ;; Delete buffer local variables. + (goto-char (point-max)) + (when (re-search-backward "Local variables:") + (forward-line -1) + (delete-region (point) (point-max))) + + ;; Insert Org-mode export headers. + (goto-char (point-min)) + (insert (format admin--org-export-headers-format version)) + (org-mode) + (save-buffer) + + ;; Make the HTML export. + (let* ((org-html-postamble + (format admin--org-html-postamble + copyright-years + ;; e.g. "2022/09/13 09:13:13" + (format-time-string "%Y/%M/%y %H:%m:%S"))) + (org-html-mathjax-template "") + (htmlize-output-type 'css)) + (org-html-export-as-html)) + + ;; Write HTML to file. + (let ((new (expand-file-name html-file (expand-file-name "etc" root)))) + (write-file new) + (unless noninteractive + (find-file new) + (html-mode)) + (message "Successfully exported HTML to %s" new)))) ;; Stuff to check new `defcustom's got :version tags. From 562c19609971a809d3bb42f76d18ba7f3659d254 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 16:16:32 +0200 Subject: [PATCH 426/915] ; * etc/NEWS: Backport fixes from master. Don't merge to master. --- etc/NEWS | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 15854be8fd2..47e82a96e64 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1686,7 +1686,7 @@ and variables. *** Lisp mode now uses 'common-lisp-indent-function'. To revert to the previous behavior, -'(setq lisp-indent-function 'lisp-indent-function)' from 'lisp-mode-hook'. +'(setq lisp-indent-function #'lisp-indent-function)' from 'lisp-mode-hook'. ** Change Logs and VC @@ -2835,7 +2835,7 @@ different timezone causing a difference in the date. *** 'mspools-show' is now autoloaded. -*** Loading dunnet.el in batch mode doesn't start the game any more. +*** Loading 'dunnet' in batch mode doesn't start the game any more. Instead you need to do "emacs --batch -f dunnet" to start the game in batch mode. @@ -3615,6 +3615,13 @@ pairs. ** New function 'mail-header-parse-address-lax'. Parse a string as a mail address-like string. +** New function 'make-closure'. +This function is used internally by the byte-compiler: calls to it are +inserted into the generated bytecode to handle closures more +efficiently than the old code which relied on +'make-byte-code' instead. +It also makes the disassembly more readable. + ** New function 'make-separator-line'. Make a string appropriate for usage as a visual separator line. From 9b09def4be5b348a984c3e73507206044c22f32b Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 16:37:58 +0200 Subject: [PATCH 427/915] Use substitute-command-keys in some vc messages * lisp/vc/vc-dispatcher.el (vc-start-logentry): * lisp/vc/vc.el (vc-steal-lock): Use substitute-command-keys. --- lisp/vc/vc-dispatcher.el | 6 +++++- lisp/vc/vc.el | 4 +++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lisp/vc/vc-dispatcher.el b/lisp/vc/vc-dispatcher.el index 36a6f27891b..f64809da616 100644 --- a/lisp/vc/vc-dispatcher.el +++ b/lisp/vc/vc-dispatcher.el @@ -704,7 +704,11 @@ PATCH-STRING is a patch to check in." (erase-buffer) (when (stringp comment) (insert comment))) (if (or (not comment) initial-contents) - (message "%s Type C-c C-c when done" msg) + (message (substitute-command-keys + (if (eq major-mode 'log-edit-mode) + "%s Type \\[log-edit-done] when done" + "%s Type \\`C-c C-c' when done")) + msg) (vc-finish-logentry (eq comment t))))) ;; vc-finish-logentry is typically called from a log-edit buffer (see diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 4688137d923..c67dad69fce 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1627,7 +1627,9 @@ Type \\[vc-next-action] to check in changes.") (format "I stole the lock on %s, " file-description) (current-time-string) ".\n") - (message "Please explain why you stole the lock. Type C-c C-c when done."))) + (message + (substitute-command-keys + "Please explain why you stole the lock. Type \\`C-c C-c' when done")))) (defun vc-checkin (files backend &optional comment initial-contents rev patch-string) "Check in FILES. COMMENT is a comment string; if omitted, a From f8c5a82ba15a6217b52dad66bf5fdf6f064a9b42 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 17:04:45 +0200 Subject: [PATCH 428/915] ; Add myself as image-dired maintainer * lisp/image/image-dired-dired.el: * lisp/image/image-dired-external.el: * lisp/image/image-dired-tags.el: * lisp/image/image-dired-util.el: * lisp/image/image-dired.el: Add myself as maintainer. --- lisp/image/image-dired-dired.el | 1 + lisp/image/image-dired-external.el | 1 + lisp/image/image-dired-tags.el | 1 + lisp/image/image-dired-util.el | 1 + lisp/image/image-dired.el | 1 + 5 files changed, 5 insertions(+) diff --git a/lisp/image/image-dired-dired.el b/lisp/image/image-dired-dired.el index ab994742ecd..c8d19028748 100644 --- a/lisp/image/image-dired-dired.el +++ b/lisp/image/image-dired-dired.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2005-2022 Free Software Foundation, Inc. ;; Author: Mathias Dahl +;; Maintainer: Stefan Kangas ;; Keywords: multimedia ;; This file is part of GNU Emacs. diff --git a/lisp/image/image-dired-external.el b/lisp/image/image-dired-external.el index 3e3a9a44431..1e63123a2d1 100644 --- a/lisp/image/image-dired-external.el +++ b/lisp/image/image-dired-external.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2005-2022 Free Software Foundation, Inc. ;; Author: Mathias Dahl +;; Maintainer: Stefan Kangas ;; Keywords: multimedia ;; This file is part of GNU Emacs. diff --git a/lisp/image/image-dired-tags.el b/lisp/image/image-dired-tags.el index ee3c63b009f..05cd2720d44 100644 --- a/lisp/image/image-dired-tags.el +++ b/lisp/image/image-dired-tags.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2005-2022 Free Software Foundation, Inc. ;; Author: Mathias Dahl +;; Maintainer: Stefan Kangas ;; Keywords: multimedia ;; This file is part of GNU Emacs. diff --git a/lisp/image/image-dired-util.el b/lisp/image/image-dired-util.el index 6eb5fa18ce7..0ac25ef8615 100644 --- a/lisp/image/image-dired-util.el +++ b/lisp/image/image-dired-util.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2005-2022 Free Software Foundation, Inc. ;; Author: Mathias Dahl +;; Maintainer: Stefan Kangas ;; This file is part of GNU Emacs. diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index e25241274c1..442767dda10 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -3,6 +3,7 @@ ;; Copyright (C) 2005-2022 Free Software Foundation, Inc. ;; Author: Mathias Dahl +;; Maintainer: Stefan Kangas ;; Version: 0.4.11 ;; Keywords: multimedia From 2053e350f3d39e312a6a4b18c05fe8abefc5ee95 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 16 Sep 2022 17:23:59 +0200 Subject: [PATCH 429/915] Enable `dont-follow' for inotify file notifications * doc/lispref/os.texi (File Notifications): Symlinks aren't followed. * lisp/filenotify.el (file-notify--add-watch-inotify): Add `dont-follow' flag. * lisp/net/tramp.el (tramp-handle-file-notify-rm-watch): Suppress errors when reading process output. * test/lisp/filenotify-tests.el (file-notify-test11-symlinks) (file-notify-test11-symlinks-remote): New tests. --- doc/lispref/os.texi | 3 + lisp/filenotify.el | 1 + lisp/net/tramp.el | 6 +- test/lisp/filenotify-tests.el | 109 ++++++++++++++++++++++++++++++++++ 4 files changed, 117 insertions(+), 2 deletions(-) diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 35828018417..3e16ac0eb49 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -3175,6 +3175,9 @@ This is not detected by this function, and so a non-@code{nil} return value does not guarantee that changes on @var{file} will be actually notified. +If @var{file} is a symlink, it doesn't follow that link. Just +@var{file} itself will be watched. + @var{flags} is a list of conditions to set what will be watched for. It can include the following symbols: diff --git a/lisp/filenotify.el b/lisp/filenotify.el index 94e07289e32..6b13ed0b725 100644 --- a/lisp/filenotify.el +++ b/lisp/filenotify.el @@ -339,6 +339,7 @@ DESC is the back-end descriptor. ACTIONS is a list of: "Add a watch for FILE in DIR with FLAGS, using inotify." (inotify-add-watch dir (append + '(dont-follow) (and (memq 'change flags) '(create delete delete-self modify move-self move)) (and (memq 'attribute-change flags) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 90cc03c188e..f18e4c41c3c 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -5173,8 +5173,10 @@ of." ;; The descriptor must be a process object. (unless (processp proc) (tramp-error proc 'file-notify-error "Not a valid descriptor %S" proc)) - ;; There might be pending output. - (while (tramp-accept-process-output proc 0)) + ;; There might be pending output. Avoid problems with reentrant + ;; call of Tramp. + (ignore-errors + (while (tramp-accept-process-output proc 0))) (tramp-message proc 6 "Kill %S" proc) (delete-process proc)) diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el index 2d147e900d7..fef3ab80f9a 100644 --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el @@ -1571,6 +1571,115 @@ the file watch." (file-notify--deftest-remote file-notify-test10-sufficient-resources "Check `file-notify-test10-sufficient-resources' for remote files.") +(ert-deftest file-notify-test11-symlinks () + "Check that file notification do not follow symbolic links." + :tags '(:expensive-test) + (skip-unless (file-notify--test-local-enabled)) + + (setq file-notify--test-tmpfile (file-notify--test-make-temp-name) + file-notify--test-tmpfile1 (file-notify--test-make-temp-name)) + + ;; Symlink a file. + (unwind-protect + (progn + (write-region "any text" nil file-notify--test-tmpfile1 nil 'no-message) + (make-symbolic-link file-notify--test-tmpfile1 file-notify--test-tmpfile) + (should + (setq file-notify--test-desc + (file-notify--test-add-watch + file-notify--test-tmpfile + '(attribute-change change) #'file-notify--test-event-handler))) + (should (file-notify-valid-p file-notify--test-desc)) + + ;; Writing to either the symlink or the target should not + ;; raise any event. + (file-notify--test-with-actions nil + (write-region + "another text" nil file-notify--test-tmpfile nil 'no-message) + (write-region + "another text" nil file-notify--test-tmpfile1 nil 'no-message)) + ;; Sanity check. + (file-notify--test-wait-for-events + (file-notify--test-timeout) + (not (input-pending-p))) + (should-not file-notify--test-events) + + ;; Changing timestamp of the target should not raise any + ;; event. We don't use `nofollow'. + (file-notify--test-with-actions nil + (set-file-times file-notify--test-tmpfile1 '(0 0)) + (set-file-times file-notify--test-tmpfile '(0 0))) + ;; Sanity check. + (file-notify--test-wait-for-events + (file-notify--test-timeout) + (not (input-pending-p))) + (should-not file-notify--test-events) + + ;; Changing timestamp of the symlink shows the event. + (file-notify--test-with-actions '(attribute-changed) + (set-file-times file-notify--test-tmpfile '(0 0) 'nofollow)) + + ;; Deleting the target should not raise any event. + (file-notify--test-with-actions nil + (delete-file file-notify--test-tmpfile1) + (delete-file file-notify--test-tmpfile)) + ;; Sanity check. + (file-notify--test-wait-for-events + (file-notify--test-timeout) + (not (input-pending-p))) + (should-not file-notify--test-events) + + ;; The environment shall be cleaned up. + (file-notify-rm-watch file-notify--test-desc) + (file-notify--test-cleanup-p)) + + ;; Cleanup. + (file-notify--test-cleanup)) + + (setq file-notify--test-tmpfile1 (file-notify--test-make-temp-name) + file-notify--test-tmpfile (file-notify--test-make-temp-name)) + + ;; Symlink a directory. + (unwind-protect + (let ((tmpfile (expand-file-name "foo" file-notify--test-tmpfile)) + (tmpfile1 (expand-file-name "foo" file-notify--test-tmpfile1))) + (make-directory file-notify--test-tmpfile1) + (make-symbolic-link file-notify--test-tmpfile1 file-notify--test-tmpfile) + (write-region "any text" nil tmpfile1 nil 'no-message) + (should + (setq file-notify--test-desc + (file-notify--test-add-watch + file-notify--test-tmpfile + '(attribute-change change) #'file-notify--test-event-handler))) + (should (file-notify-valid-p file-notify--test-desc)) + + ;; None of the actions on a file in the symlinked directory will be reported. + (file-notify--test-with-actions nil + (write-region "another text" nil tmpfile nil 'no-message) + (write-region "another text" nil tmpfile1 nil 'no-message) + (set-file-times tmpfile '(0 0)) + (set-file-times tmpfile '(0 0) 'nofollow) + (set-file-times tmpfile1 '(0 0)) + (set-file-times tmpfile1 '(0 0) 'nofollow) + (delete-file tmpfile) + (delete-file tmpfile1)) + ;; Sanity check. + (file-notify--test-wait-for-events + (file-notify--test-timeout) + (not (input-pending-p))) + (should-not file-notify--test-events) + + ;; The environment shall be cleaned up. + (delete-directory file-notify--test-tmpdir 'recursive) + (file-notify-rm-watch file-notify--test-desc) + (file-notify--test-cleanup-p)) + + ;; Cleanup. + (file-notify--test-cleanup))) + +(file-notify--deftest-remote file-notify-test11-symlinks + "Check `file-notify-test11-symlinks' for remote files.") + (defun file-notify-test-all (&optional interactive) "Run all tests for \\[file-notify]." (interactive "p") From dd1aa62642e9c121c783b4973c1289d409d915ef Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Fri, 16 Sep 2022 19:16:10 +0300 Subject: [PATCH 430/915] * lisp/outline.el: Optimize performance of S-TAB (bug#57813) (outline-hide-subtree): Don't call outline--insert-close-button, because it's handled by outline--fix-up-all-buttons called from outline-flag-region. (outline-show-subtree): Don't call outline--insert-open-button, same reason. (outline--fix-up-all-buttons): Check invisible outlines explicitly instead of using slow outline--cycle-state. --- lisp/outline.el | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lisp/outline.el b/lisp/outline.el index 8281f24291d..25ef1616b93 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -986,8 +986,6 @@ If non-nil, EVENT should be a mouse event." (interactive (list last-nonmenu-event)) (when (mouse-event-p event) (mouse-set-point event)) - (when (outline--use-buttons-p) - (outline--insert-close-button)) (outline-flag-subtree t)) (defun outline--make-button-overlay (type) @@ -1052,12 +1050,12 @@ If non-nil, EVENT should be a mouse event." (setq from (line-beginning-position)))) (outline-map-region (lambda () - ;; `outline--cycle-state' will fail if we're in a totally - ;; collapsed buffer -- but in that case, we're not in a - ;; `show-all' situation. - (if (eq (ignore-errors (outline--cycle-state)) 'show-all) - (outline--insert-open-button) - (outline--insert-close-button))) + (if (save-excursion + (outline-end-of-heading) + (seq-some (lambda (o) (eq (overlay-get o 'invisible) 'outline)) + (overlays-at (point)))) + (outline--insert-close-button) + (outline--insert-open-button))) (or from (point-min)) (or to (point-max))))) (define-obsolete-function-alias 'hide-subtree #'outline-hide-subtree "25.1") @@ -1080,8 +1078,6 @@ If non-nil, EVENT should be a mouse event." (interactive (list last-nonmenu-event)) (when (mouse-event-p event) (mouse-set-point event)) - (when (outline--use-buttons-p) - (outline--insert-open-button)) (outline-flag-subtree nil)) (define-obsolete-function-alias 'show-subtree #'outline-show-subtree "25.1") From d4d6f7a74776034bff615ce4983ef9e710ba9963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Fri, 16 Sep 2022 18:51:10 +0200 Subject: [PATCH 431/915] * lisp/subr.el (list-of-strings-p): Declare pure and error-free --- lisp/subr.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/subr.el b/lisp/subr.el index caea2b9f933..d7cdc28abba 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -4028,6 +4028,7 @@ Otherwise, return nil." (defun list-of-strings-p (object) "Return t if OBJECT is nil or a list of strings." + (declare (pure t) (side-effect-free error-free)) (while (and (consp object) (stringp (car object))) (setq object (cdr object))) (null object)) From 5d227ae83e57eb5ef2144e3af3e3431d26d77bc1 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 18:54:59 +0200 Subject: [PATCH 432/915] ; * etc/NEWS: Fix formatting. --- etc/NEWS | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 47e82a96e64..2fed65e7391 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1319,18 +1319,18 @@ comma-separated list. *** New commands to filter the package list. The filter commands are bound to the following keys: -key binding ---- ------- -/ a package-menu-filter-by-archive -/ d package-menu-filter-by-description -/ k package-menu-filter-by-keyword -/ N package-menu-filter-by-name-or-description -/ n package-menu-filter-by-name -/ s package-menu-filter-by-status -/ v package-menu-filter-by-version -/ m package-menu-filter-marked -/ u package-menu-filter-upgradable -/ / package-menu-clear-filter + key binding + --- ------- + / a package-menu-filter-by-archive + / d package-menu-filter-by-description + / k package-menu-filter-by-keyword + / N package-menu-filter-by-name-or-description + / n package-menu-filter-by-name + / s package-menu-filter-by-status + / v package-menu-filter-by-version + / m package-menu-filter-marked + / u package-menu-filter-upgradable + / / package-menu-clear-filter *** Option to automatically native-compile packages upon installation. Customize the user option 'package-native-compile' to enable automatic From bcc84ac7feccf285811d3bc3254fa10062c9334c Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 19:33:02 +0200 Subject: [PATCH 433/915] Add version headlines to HTML NEWS export This allows linking to, e.g. "NEWS.28.html#28.1" to go directly to those release notes. * admin/admin.el (admin--org-export-headers-format) (make-news-html-file): Add XX.Y version headlines with an HTML anchor. --- admin/admin.el | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/admin/admin.el b/admin/admin.el index 60b043a3516..14f0f80188b 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -773,7 +773,7 @@ Optional argument TYPE is type of output (nil means all)." (defvar admin--org-export-headers-format "\ #+title: GNU Emacs %s NEWS -- history of user-visible changes #+author: -#+options: author:nil creator:nil toc:1 num:2 *:nil \\n:t ^:nil tex:nil +#+options: author:nil creator:nil toc:2 num:3 *:nil \\n:t ^:nil tex:nil #+language: en #+HTML_LINK_HOME: /software/emacs #+HTML_LINK_UP: /software/emacs @@ -851,12 +851,13 @@ $Date: %s $ (unless (file-exists-p (expand-file-name "src/emacs.c" root)) (user-error "%s doesn't seem to be the root of an Emacs source tree" root)) (admin--require-external-package 'htmlize) - (let* ((orig (expand-file-name "etc/NEWS" root)) - (new (expand-file-name (format "etc/NEWS.%s.org" version) root)) - (html-file (format "%s.html" (file-name-base new))) + (let* ((newsfile (expand-file-name "etc/NEWS" root)) + (orgfile (expand-file-name (format "etc/NEWS.%s.org" version) root)) + (html (format "%s.html" (file-name-base orgfile))) (copyright-years (format-time-string "%Y"))) - (copy-file orig new t) - (find-file new) + (delete-file orgfile) + (copy-file newsfile orgfile t) + (find-file orgfile) ;; Find the copyright range. (goto-char (point-min)) @@ -931,6 +932,34 @@ $Date: %s $ (org-mode) (save-buffer) + ;; Make everything one level lower. + (goto-char (point-min)) + (while (re-search-forward (rx bol (group (+ "*")) " ") nil t) + (replace-match "*\\1" nil nil nil 1)) + + ;; Insert anchors for different versions. + (goto-char (point-min)) + (let (last-major last-minor) + (while (re-search-forward (rx bol "** " (+ (not "\n")) "in Emacs " + (group digit digit) "." (group digit) + eol) + nil t) + (unless (and (equal (match-string 1) last-major) + (equal (match-string 2) last-minor)) + (setq last-major (match-string 1)) + (setq last-minor (match-string 2)) + (forward-line -1) + (insert (format + (concat + ;; Add anchor to allow linking to + ;; e.g. "NEWS.28.html#28.1". + "#+HTML:

 

\n" + "* Changes in Emacs %s.%s\n") + last-major last-minor + last-major last-minor))))) + + (save-buffer) + ;; Make the HTML export. (let* ((org-html-postamble (format admin--org-html-postamble @@ -942,12 +971,12 @@ $Date: %s $ (org-html-export-as-html)) ;; Write HTML to file. - (let ((new (expand-file-name html-file (expand-file-name "etc" root)))) - (write-file new) + (let ((html (expand-file-name html (expand-file-name "etc" root)))) + (write-file html) (unless noninteractive - (find-file new) + (find-file html) (html-mode)) - (message "Successfully exported HTML to %s" new)))) + (message "Successfully exported HTML to %s" html)))) ;; Stuff to check new `defcustom's got :version tags. From 069ffbda0934b114959ca514616d9a56cdb0063a Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 19:46:31 +0200 Subject: [PATCH 434/915] * admin/admin.el (make-news-html-file): Set id on correct tag. --- admin/admin.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/admin/admin.el b/admin/admin.el index 14f0f80188b..4727dd08e6f 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -951,10 +951,13 @@ $Date: %s $ (forward-line -1) (insert (format (concat + "#+HTML:

 

\n" + "* Changes in Emacs %s.%s\n" ;; Add anchor to allow linking to ;; e.g. "NEWS.28.html#28.1". - "#+HTML:

 

\n" - "* Changes in Emacs %s.%s\n") + ":PROPERTIES:\n" + ":CUSTOM_ID: %s.%s\n" + ":END:\n") last-major last-minor last-major last-minor))))) From dc5c8274409fe37199fa20659b55a40b1e47928a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Fri, 16 Sep 2022 14:26:13 -0400 Subject: [PATCH 435/915] Fix last occurrence of `font-lock-reference-face` Well... except for CC-mode. * lisp/cedet/semantic/grammar.el (semantic-grammar-mode-keywords-1): Redirect reference to obsolete `font-lock-reference-face` to `font-lock-constant-face`. --- lisp/cedet/semantic/grammar.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/cedet/semantic/grammar.el b/lisp/cedet/semantic/grammar.el index d42022e0423..72037f47108 100644 --- a/lisp/cedet/semantic/grammar.el +++ b/lisp/cedet/semantic/grammar.el @@ -1148,9 +1148,9 @@ END is the limit of the search." (defvar semantic-grammar-mode-keywords-1 `(("\\(\\<%%\\>\\|\\<%[{}]\\)" - 0 font-lock-reference-face) + 0 font-lock-constant-face) ("\\(%\\)\\(\\(\\sw\\|\\s_\\)+\\)" - (1 font-lock-reference-face) + (1 font-lock-constant-face) (2 font-lock-keyword-face)) ("\\" 0 (unless (semantic-grammar-in-lisp-p) 'bold)) @@ -1167,7 +1167,8 @@ END is the limit of the search." (,semantic-grammar-lex-c-char-re 0 ,(if (boundp 'font-lock-constant-face) 'font-lock-constant-face - 'font-lock-string-face) t) + 'font-lock-string-face) + t) ;; Must highlight :keyword here, because ':' is a punctuation in ;; grammar mode! ("[\r\n\t ]+:\\sw+\\>" From 74df87704380779ac86b97a39d8500943990efb5 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 21:11:26 +0200 Subject: [PATCH 436/915] Delete some commented out code in cperl-mode.el The differences between this and the existing `cperl-ps-print-init' are that some faces had been moved from italic to bold or vice versa, and that there were some obsolete or non-existent face names mentioned. So there is no point to keeping it given that it's been commented out since 1999. * lisp/progmodes/cperl-mode.el: Delete code commented out since 1999: a slightly different, duplicate definition of `cperl-ps-print-init'. --- lisp/progmodes/cperl-mode.el | 33 --------------------------------- 1 file changed, 33 deletions(-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 85229250ee0..55900a1b62a 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -6045,39 +6045,6 @@ Style of printout regulated by the variable `cperl-ps-print-face-properties'." (ps-extend-face-list cperl-ps-print-face-properties) (ps-print-buffer-with-faces file))) -;; (defun cperl-ps-print-init () -;; "Initialization of `ps-print' components for faces used in CPerl." -;; ;; Guard against old versions -;; (defvar ps-underlined-faces nil) -;; (defvar ps-bold-faces nil) -;; (defvar ps-italic-faces nil) -;; (setq ps-bold-faces -;; (append '(font-lock-emphasized-face -;; cperl-array-face -;; font-lock-keyword-face -;; font-lock-variable-name-face -;; font-lock-constant-face -;; font-lock-reference-face -;; font-lock-other-emphasized-face -;; cperl-hash-face) -;; ps-bold-faces)) -;; (setq ps-italic-faces -;; (append '(cperl-nonoverridable-face -;; font-lock-constant-face -;; font-lock-reference-face -;; font-lock-other-emphasized-face -;; cperl-hash-face) -;; ps-italic-faces)) -;; (setq ps-underlined-faces -;; (append '(font-lock-emphasized-face -;; cperl-array-face -;; font-lock-other-emphasized-face -;; cperl-hash-face -;; cperl-nonoverridable-face font-lock-type-face) -;; ps-underlined-faces)) -;; (cons 'font-lock-type-face ps-underlined-faces)) - - (cperl-windowed-init) (defconst cperl-styles-entries From b45c6cbf7c413a53e9a22664a07c79592ab72d2c Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 21:19:46 +0200 Subject: [PATCH 437/915] Delete mystery code from cperl-mode.el * lisp/progmodes/cperl-mode.el: Delete commented out code referring to some 'edit-var-mode-alist' that we don't think is used for anything. --- lisp/progmodes/cperl-mode.el | 7 ------- 1 file changed, 7 deletions(-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 55900a1b62a..433aa434a58 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -958,13 +958,6 @@ Unless KEEP, removes the old indentation." "Abbrev table in use in CPerl mode buffers." :parents (list cperl-mode-electric-keywords-abbrev-table)) -;; ;; TODO: Commented out as we don't know what it is used for. If -;; ;; there are no bug reports about this for Emacs 28.1, this -;; ;; can probably be removed. (Code search online reveals nothing.) -;; (when (boundp 'edit-var-mode-alist) -;; ;; FIXME: What package uses this? -;; (add-to-list 'edit-var-mode-alist '(perl-mode (regexp . "^cperl-")))) - (defvar cperl-mode-map (let ((map (make-sparse-keymap))) (define-key map "{" 'cperl-electric-lbrace) From be34b9bf772ffaafcb09721dcd6a72645948eca3 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 21:23:17 +0200 Subject: [PATCH 438/915] ; * lisp/progmodes/cperl-mode.el: Fix Author header. --- lisp/progmodes/cperl-mode.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 433aa434a58..a6d94b58179 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -2,7 +2,7 @@ ;; Copyright (C) 1985-2022 Free Software Foundation, Inc. -;; Author: Ilya Zakharevich +;; Author: Ilya Zakharevich ;; Bob Olson ;; Jonathan Rockway ;; Maintainer: emacs-devel@gnu.org @@ -24,8 +24,6 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . -;; Corrections made by Ilya Zakharevich ilyaz@cpan.org - ;;; Commentary: ;; You can either fine-tune the bells and whistles of this mode or From a9b0d3b3fca84464b972b8e7780512b2168eab94 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 21:27:14 +0200 Subject: [PATCH 439/915] ; * lisp/progmodes/cperl-mode.el: Fix typo. --- lisp/progmodes/cperl-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index a6d94b58179..614ee60fa03 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -52,7 +52,7 @@ ;; (define-key global-map [M-S-down-mouse-3] #'imenu) ;; This version supports the syntax added by the MooseX::Declare CPAN -;; module, as well as Perl 5.10 keyword support. +;; module, as well as Perl 5.10 keywords. ;;; Code: From dda7502e0a7e0dafe6b4c4bdab8480f6cff11c66 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 21:34:57 +0200 Subject: [PATCH 440/915] image-dired: Print command when debugging * lisp/image/image-dired-external.el (image-dired-create-thumb-1): Display command and arguments when debugging. * lisp/image/image-dired-util.el (image-dired-debug): Rename from 'image-dired-debug-message'. --- lisp/image/image-dired-external.el | 22 ++++++++++++---------- lisp/image/image-dired-util.el | 7 ++++--- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lisp/image/image-dired-external.el b/lisp/image/image-dired-external.el index 1e63123a2d1..6ad2aa72c90 100644 --- a/lisp/image/image-dired-external.el +++ b/lisp/image/image-dired-external.el @@ -311,15 +311,17 @@ and remove the cached thumbnail files between each trial run.") ;; Thumbnail file creation processes begin here and are marshaled ;; in a queue by `image-dired-create-thumb'. - (setq process - (apply #'start-process "image-dired-create-thumbnail" nil - image-dired-cmd-create-thumbnail-program - (mapcar - (lambda (arg) (format-spec arg spec)) - (if (memq image-dired-thumbnail-storage - image-dired--thumbnail-standard-sizes) - image-dired-cmd-create-standard-thumbnail-options - image-dired-cmd-create-thumbnail-options)))) + (let ((cmd image-dired-cmd-create-thumbnail-program) + (args (mapcar + (lambda (arg) (format-spec arg spec)) + (if (memq image-dired-thumbnail-storage + image-dired--thumbnail-standard-sizes) + image-dired-cmd-create-standard-thumbnail-options + image-dired-cmd-create-thumbnail-options)))) + (image-dired-debug "Running %s %s" cmd (string-join args " ")) + (setq process + (apply #'start-process "image-dired-create-thumbnail" nil + cmd args))) (setf (process-sentinel process) (lambda (process status) @@ -327,7 +329,7 @@ and remove the cached thumbnail files between each trial run.") (cl-decf image-dired-queue-active-jobs) (image-dired-thumb-queue-run) (when (= image-dired-queue-active-jobs 0) - (image-dired-debug-message + (image-dired-debug (format-time-string "Generated thumbnails in %s.%3N seconds" (time-subtract nil diff --git a/lisp/image/image-dired-util.el b/lisp/image/image-dired-util.el index 0ac25ef8615..f9caed57b20 100644 --- a/lisp/image/image-dired-util.el +++ b/lisp/image/image-dired-util.el @@ -38,7 +38,7 @@ (defvar image-dired-debug nil "Non-nil means enable debug messages.") -(defun image-dired-debug-message (&rest args) +(defun image-dired-debug (&rest args) "Display debug message ARGS when `image-dired-debug' is non-nil." (when image-dired-debug (apply #'message args))) @@ -46,8 +46,9 @@ (defun image-dired-dir () "Return the current thumbnail directory (from variable `image-dired-dir'). Create the thumbnail directory if it does not exist." - (let ((image-dired-dir (file-name-as-directory - (expand-file-name image-dired-dir)))) + (let ((image-dired-dir + (file-name-as-directory + (expand-file-name image-dired-dir)))) (unless (file-directory-p image-dired-dir) (with-file-modes #o700 (make-directory image-dired-dir t)) From aaf39c38784198353b61bf6086f48a689b199f0d Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 21:54:29 +0200 Subject: [PATCH 441/915] image-dired: Add support for PDF files (Bug#26432) * lisp/image/image-dired.el (image-dired--file-name-regexp): New function. (image-dired-display-thumbnail-original-image): Clean up. (image-dired-display-image): Support visiting PDF files. * lisp/image/image-dired-dired.el (image-dired-dired-toggle-marked-thumbs): * lisp/image/image-dired.el (image-dired-get-thumbnail-image) (image-dired-show-all-from-dir): Use above new function instead of 'image-file-name-regexp'. --- etc/NEWS | 5 +++++ lisp/image/image-dired-dired.el | 2 +- lisp/image/image-dired.el | 40 ++++++++++++++++++++------------- 3 files changed, 30 insertions(+), 17 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index df09533c0b9..97ec53ca7c1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2052,6 +2052,11 @@ associated with Image-Dired. This replaces the message most navigation commands in the thumbnail buffer used to show at the bottom of the screen. +--- +*** PDF support. +Image-Dired now displays thumbnails for PDF files. Type 'RET' on a +PDF file in the thumbnail buffer to visit the corresponding PDF. + --- *** Support GraphicsMagick command line tools. Support for the GraphicsMagick command line tool ("gm") has been diff --git a/lisp/image/image-dired-dired.el b/lisp/image/image-dired-dired.el index c8d19028748..e3aa3da421d 100644 --- a/lisp/image/image-dired-dired.el +++ b/lisp/image/image-dired-dired.el @@ -69,7 +69,7 @@ previous -ARG, if ARG<0) files." thumb-file overlay) (when (and image-file - (string-match-p (image-file-name-regexp) image-file)) + (string-match-p (image-dired--file-name-regexp) image-file)) (setq thumb-file (image-dired-get-thumbnail-image image-file)) ;; If image is not already added, then add it. (let ((thumb-ov (cl-loop for ov in (overlays-in (point) (1+ (point))) diff --git a/lisp/image/image-dired.el b/lisp/image/image-dired.el index 442767dda10..449945b88d8 100644 --- a/lisp/image/image-dired.el +++ b/lisp/image/image-dired.el @@ -356,6 +356,11 @@ This affects the following commands: ;;; Util functions +(defun image-dired--file-name-regexp () + (let ((image-file-name-extensions + (append '("pdf") image-file-name-extensions))) + (image-file-name-regexp))) + (defun image-dired-insert-image (file type relief margin) "Insert image FILE of image TYPE, using RELIEF and MARGIN, at point." (let ((i `(image :type ,type @@ -366,7 +371,7 @@ This affects the following commands: (defun image-dired-get-thumbnail-image (file) "Return the image descriptor for a thumbnail of image file FILE." - (unless (string-match-p (image-file-name-regexp) file) + (unless (string-match-p (image-dired--file-name-regexp) file) (error "%s is not a valid image file" file)) (let* ((thumb-file (image-dired-thumb-name file)) (thumb-attr (file-attributes thumb-file))) @@ -538,8 +543,8 @@ thumbnail buffer to be selected." ;;;###autoload (defun image-dired-show-all-from-dir (dir) "Make a thumbnail buffer for all images in DIR and display it. -Any file matching `image-file-name-regexp' is considered an image -file. +Any file matching `image-dired--file-name-regexp' is considered an +image file. If the number of image files in DIR exceeds `image-dired-show-all-from-dir-max-files', ask for confirmation @@ -547,7 +552,7 @@ before creating the thumbnail buffer. If that variable is nil, never ask for confirmation." (interactive "DImage-Dired: ") (dired dir) - (dired-mark-files-regexp (image-file-name-regexp)) + (dired-mark-files-regexp (image-dired--file-name-regexp)) (let ((files (dired-get-marked-files nil nil nil t))) (cond ((and (null (cdr files))) (message "No image files in directory")) @@ -1091,10 +1096,9 @@ Ask user how many thumbnails should be displayed per row." image-dired-external-viewer file))))) (defun image-dired-display-image (file &optional _ignored) - "Display image FILE in image buffer. -Use this when you want to display the image, in a new window. -The window will use `image-dired-display-image-mode' which is -based on `image-mode'." + "Display image FILE in a the image buffer window. +If it is an image, the window will use `image-dired-display-image-mode' +which is based on `image-mode'." (declare (advertised-calling-convention (file) "29.1")) (setq file (expand-file-name file)) (when (not (file-exists-p file)) @@ -1106,7 +1110,10 @@ based on `image-mode'." (when-let ((buf (find-file-noselect file nil t))) (pop-to-buffer buf) (rename-buffer image-dired-display-image-buffer) - (image-dired-display-image-mode) + (if (string-match (image-file-name-regexp) file) + (image-dired-display-image-mode) + ;; Support visiting PDF files. + (normal-mode)) (select-window cur-win)))) (defun image-dired-display-thumbnail-original-image (&optional arg) @@ -1114,14 +1121,15 @@ based on `image-mode'." See documentation for `image-dired-display-image' for more information. With prefix argument ARG, display image in its original size." (interactive "P" image-dired-thumbnail-mode) + (unless (string-equal major-mode "image-dired-thumbnail-mode") + (user-error "Not in `image-dired-thumbnail-mode'")) (let ((file (image-dired-original-file-name))) - (if (not (string-equal major-mode "image-dired-thumbnail-mode")) - (message "Not in image-dired-thumbnail-mode") - (if (not (image-dired-image-at-point-p)) - (message "No thumbnail at point") - (if (not file) - (message "No original file name found") - (image-dired-display-image file arg)))))) + (cond ((not (image-dired-image-at-point-p)) + (message "No thumbnail at point")) + ((not file) + (message "No original file name found")) + (t + (image-dired-display-image file arg))))) (defun image-dired-rotate-original-left () "Rotate original image left (counter clockwise) 90 degrees. From 6938a2ddd2d9861a0f04e79d05ba976bdf91cc8c Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 22:24:20 +0200 Subject: [PATCH 442/915] Accept more wide function signatures in docstrings * test/lisp/emacs-lisp/bytecomp-tests.el ("warn-wide-docstring-ignore-function-signature.el"): New test. * lisp/emacs-lisp/bytecomp.el (byte-compile--wide-docstring-p): Make regexp more allowing to silence warning. * test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-function-signature.el: New file. --- lisp/emacs-lisp/bytecomp.el | 2 +- .../warn-wide-docstring-ignore-function-signature.el | 4 ++++ test/lisp/emacs-lisp/bytecomp-tests.el | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-function-signature.el diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 48929e62bdf..3b3f7bb6190 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1705,7 +1705,7 @@ URLs." (+ " " (or ;; Arguments. (+ (or (syntax symbol) - (any word "-/:[]&=().?^\\#'"))) + (any word "-/:[]&=()<>.,?^\\#*'\""))) ;; Argument that is a list. (seq "(" (* (not ")")) ")"))) ")"))) diff --git a/test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-function-signature.el b/test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-function-signature.el new file mode 100644 index 00000000000..e83f516e58c --- /dev/null +++ b/test/lisp/emacs-lisp/bytecomp-resources/warn-wide-docstring-ignore-function-signature.el @@ -0,0 +1,4 @@ +;;; -*- lexical-binding: t -*- +(defun foo-bar () + "This should not warn: +(fn COMMAND &rest ARGS &key (MARGIN (rx bol (+ \" \"))) (ARGUMENT (rx \"-\" (+ (any \"-\" alnum)) (32 \"=\"))) (METAVAR (rx (32 \" \") (or (+ (any alnum \"_-\")) (seq \"[\" (+? nonl) \"]\") (seq \"<\" (+? nonl) \">\") (seq \"{\" (+? nonl) \"}\")))) (SEPARATOR (rx \", \" symbol-start)) (DESCRIPTION (rx (* nonl) (* \"\\=\\n\" (>= 9 \" \") (* nonl)))) NARROW-START NARROW-END)") diff --git a/test/lisp/emacs-lisp/bytecomp-tests.el b/test/lisp/emacs-lisp/bytecomp-tests.el index bc9f8d802a6..1ca44dc7a48 100644 --- a/test/lisp/emacs-lisp/bytecomp-tests.el +++ b/test/lisp/emacs-lisp/bytecomp-tests.el @@ -1006,6 +1006,10 @@ byte-compiled. Run with dynamic binding." "warn-wide-docstring-ignore-fill-column.el" "defvar .foo-bar. docstring wider than .* characters" 'reverse) +(bytecomp--define-warning-file-test + "warn-wide-docstring-ignore-function-signature.el" + "defvar .foo-bar. docstring wider than .* characters" 'reverse) + (bytecomp--define-warning-file-test "warn-wide-docstring-ignore-override.el" "defvar .foo-bar. docstring wider than .* characters" 'reverse) From fe7c015b20b5bca07aa178d28b9fd5cc66ad16f9 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Fri, 16 Sep 2022 22:37:56 +0200 Subject: [PATCH 443/915] Support XFCE in wallpaper.el * lisp/image/wallpaper.el (wallpaper--default-commands) (wallpaper-command): Support XFCE. (Bug#57781) Thanks to Thierry Volpiatto . --- lisp/image/wallpaper.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lisp/image/wallpaper.el b/lisp/image/wallpaper.el index 9572349c366..4572a8c0628 100644 --- a/lisp/image/wallpaper.el +++ b/lisp/image/wallpaper.el @@ -63,6 +63,9 @@ ("gsettings" "set" "org.gnome.desktop.background" "picture-uri" "file://%f") ;; KDE Plasma ("plasma-apply-wallpaperimage" "%f") + ;; XFCE + ("xfconf-query" "-c" "xfce4-desktop" "-p" + "/backdrop/screen0/monitoreDP/workspace0/last-image" "-s" "%f") ;; macOS ("osascript" "-e" "tell application \"Finder\" to set desktop picture to POSIX file \"%f\"") ;; Other / General X @@ -97,6 +100,9 @@ will be replaced as described in `wallpaper-command-args'.") (cl-defmethod wallpaper--check-command ((_type (eql 'plasma-apply-wallpaperimage))) (member "KDE" (xdg-current-desktop))) +(cl-defmethod wallpaper--check-command ((_type (eql 'xfconf-query))) + (member "XFCE" (xdg-current-desktop))) + (cl-defmethod wallpaper--check-command ((_type (eql 'swaybg))) (and (getenv "WAYLAND_DISPLAY") (getenv "SWAYSOCK"))) @@ -156,6 +162,7 @@ systems, where a native API is used instead." (radio (const :tag "gsettings (GNOME)" "gsettings") (const :tag "plasma-apply-wallpaperimage (KDE Plasma)" "plasma-apply-wallpaperimage") + (const :tag "xfconf-query (XFCE)" "xfconf-query") (const :tag "swaybg (Wayland/Sway)" "swaybg") (const :tag "wbg (Wayland)" "wbg") (const :tag "gm (X Window System)" "gm") From 637cf3ba4955449bc2510da385d39c21f2e0fc42 Mon Sep 17 00:00:00 2001 From: Gregory Heytings Date: Fri, 16 Sep 2022 23:32:31 +0000 Subject: [PATCH 444/915] Various improvements to admin/emake. * admin/emake: Return the status code of make when the build fails. Filter the output of emake *clean. Add three options --no-color (useful for emake check for example), --no-check (useful for quicker builds during development) and --no-fast. --- admin/emake | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/admin/emake b/admin/emake index 8b2114b3f8c..db4363a25bf 100755 --- a/admin/emake +++ b/admin/emake @@ -20,7 +20,11 @@ if [ -f /proc/cpuinfo ]; then sed 's/^[0-9]*/+/'))) fi -make FAST=true -j$cores "$@" 2>&1 | \ +[[ "X$1" == "X--no-color" ]] && { NOCOLOR=1; shift; } || NOCOLOR=0 +[[ "X$1" == "X--no-check" ]] && { NOCHECK=1; shift; } || NOCHECK=0 +[[ "X$1" == "X--no-fast" ]] && { FASTOPT=""; shift; } || FASTOPT="FAST=true" + +make $FASTOPT -j$cores "$@" 2>&1 | \ sed -u 's# \.\./\.\./# # s# \.\./# # s#^Configuring local git # Configuring local git # @@ -30,6 +34,7 @@ s#^Configured for # Configured for # s#^./temacs.*# \\& # s#^make.*Error# \\& # s#^Dumping under the name.*# \\& # +:a;/\\$/N;s/\\\n//;ta ' | \ grep -E --line-buffered -v "^make|\ ^Loading|\ @@ -82,16 +87,33 @@ The GNU allocators don't work|\ ^\^\(\(|\ ^ANCIENT=yes make|\ ^touch -t|\ -^'build-aux/git-hooks\ +^'build-aux/git-hooks|\ +^GNUmakefile:[0-9]*: There seems to be no |\ +^GNUmakefile:[0-9]*: Running |\ +^GNUmakefile:[0-9]*: No Makefile|\ +^rm -f |\ +^rm -rf|\ +^find \. |\ +^rm -fr deps|\ +^if test -f \./\.gdbinit|\ +^true|\ +^for file in |\ +^rmdir|\ +^\[ \"\.\" = \"\.\" \]\ " | \ while read do C="" - [[ "X${REPLY:0:1}" != "X " ]] && C="\033[1;31m" - [[ "X${REPLY:0:3}" == "X " ]] && C="\033[1;31m" + (($NOCOLOR == 0)) && [[ "X${REPLY:0:1}" != "X " ]] && C="\033[1;31m" + (($NOCOLOR == 0)) && [[ "X${REPLY:0:3}" == "X " ]] && C="\033[1;31m" [[ "X$C" == "X" ]] && printf "%s\n" "$REPLY" || printf "$C%s\033[0m\n" "$REPLY" done +# If make failed, exit now with its error code. +((${PIPESTATUS[0]} != 0)) && exit ${PIPESTATUS[0]} + +(($NOCHECK == 1)) && exit 0 + # Run a "make check" on all test files belonging to files that have # changed since last time. make -j$cores check-maybe 2>&1 | \ From 5dbe4fa64abe9e9991e060ecd61f34e675b1bf8a Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 17 Sep 2022 02:13:05 +0200 Subject: [PATCH 445/915] Simplify regexp in make-news-html-file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * admin/admin.el (make-news-html-file): Simplify regexp. Suggested by Mattias Engdegård . --- admin/admin.el | 35 +++++++++++------------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/admin/admin.el b/admin/admin.el index 4727dd08e6f..3906dd8d63c 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -883,30 +883,17 @@ $Date: %s $ ;; Use Org-mode markers for 'symbols', 'C-x k', etc. (replace-regexp-in-region - (rx-let ((key (seq - ;; Modifier (optional) - (? (any "ACHMSs") "-") - (or - ;; single key - (not (any " \n")) - ;; "" and " " - (seq "<" - (+ (any "A-Za-z-")) - (+ (seq " " (+ (any "A-Za-z-")))) - ">") - "NUL" "RET" "LFD" "TAB" - "ESC" "SPC" "DEL"))) - (email (seq (+ (not (any " @\n"))) - "@" - (+ (not (any " @\n"))))) - (lisp-symbol (regexp lisp-mode-symbol-regexp))) - (rx "'" (group - (or lisp-symbol - email - (seq "M-x " lisp-symbol) - (seq key (+ " " key)))) - "'")) - "~\\1~" (point-min) (point-max)) + (rx (or (: (group (in " \t\n(")) + "'" + (group (+ (or (not (in "'\n")) + (: "'" (not (in " .,\t\n)")))))) + "'" + (group (in ",.;:!? \t\n)"))) + ;; Buffer names, e.g. "*scratch*". + (: "\"" + (group-n 2 "*" (+ (not (in "*\""))) "*") + "\""))) + "\\1~\\2~\\3" (point-min) (point-max)) ;; Format code blocks. (while (re-search-forward "^ " nil t) From 320f0cac8008a54b988c0166dbfd195f5de8790f Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 17 Sep 2022 02:13:27 +0200 Subject: [PATCH 446/915] ; * etc/NEWS: Fix typo. --- etc/NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 2fed65e7391..8694b575a7a 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2623,7 +2623,7 @@ non-nil. ** ERC -*** Starting with Emacs 28.1 and ERC 5.4, see the ERC-NEWS file for +Starting with Emacs 28.1 and ERC 5.4, see the ERC-NEWS file for user-visible changes in ERC. ** Xwidget Webkit mode From 8ec7f8f1699ca1ab4d1e75b369ea231f5802f0e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=B8=E0=A4=AE=E0=A5=80=E0=A4=B0=20=E0=A4=B8=E0=A4=BF?= =?UTF-8?q?=E0=A4=82=E0=A4=B9=20Sameer=20Singh?= Date: Fri, 16 Sep 2022 06:52:51 +0530 Subject: [PATCH 447/915] Update Unicode support to Unicode version 15.0.0 (bug#57846) * admin/unidata/BidiBrackets.txt * admin/unidata/BidiMirroring.txt * admin/unidata/Blocks.txt * admin/unidata/IVD_Sequences.txt * admin/unidata/IdnaMappingTable.txt * admin/unidata/NormalizationTest.txt * admin/unidata/PropertyValueAliases.txt * admin/unidata/ScriptExtensions.txt * admin/unidata/Scripts.txt * admin/unidata/SpecialCasing.txt * admin/unidata/UnicodeData.txt * admin/unidata/confusables.txt * admin/unidata/copyright.html * admin/unidata/emoji-data.txt * admin/unidata/emoji-sequences.txt * admin/unidata/emoji-test.txt * admin/unidata/emoji-zwj-sequences.txt * test/manual/BidiCharacterTest.txt: Updated files from Unicode 15.0. * admin/unidata/unidata-gen.el (unidata-file-alist): Add new ranges. * lisp/international/fontset.el (script-representative-chars): Add new scripts. (otf-script-alist): Update from latest version. (setup-default-fontset): Add new scripts. * lisp/international/characters.el: Update syntax and category tables for new characters and scripts. (char-width-table): Update for changes in Unicode 15.0. * test/lisp/international/ucs-normalize-tests.el (ucs-normalize-tests--failing-lines-part1) (ucs-normalize-tests--failing-lines-part2): Update per the test results. * doc/lispref/nonascii.texi (Character Properties): Update Unicode version number. * etc/NEWS: Announce support for Unicode 15.0. --- admin/unidata/BidiBrackets.txt | 6 +- admin/unidata/BidiMirroring.txt | 8 +- admin/unidata/Blocks.txt | 21 +- admin/unidata/IVD_Sequences.txt | 6 +- admin/unidata/IdnaMappingTable.txt | 169 +++++++-- admin/unidata/NormalizationTest.txt | 92 ++++- admin/unidata/PropertyValueAliases.txt | 24 +- admin/unidata/ScriptExtensions.txt | 10 +- admin/unidata/Scripts.txt | 106 ++++-- admin/unidata/SpecialCasing.txt | 10 +- admin/unidata/UnicodeData.txt | 300 ++++++++++++++- admin/unidata/confusables.txt | 22 +- admin/unidata/copyright.html | 6 +- admin/unidata/emoji-data.txt | 73 ++-- admin/unidata/emoji-sequences.txt | 343 ++++++++++-------- admin/unidata/emoji-test.txt | 125 ++++--- admin/unidata/emoji-zwj-sequences.txt | 13 +- admin/unidata/unidata-gen.el | 10 +- doc/lispref/nonascii.texi | 2 +- etc/NEWS | 3 + lisp/international/characters.el | 62 +++- lisp/international/fontset.el | 8 + .../lisp/international/ucs-normalize-tests.el | 89 +++-- test/manual/BidiCharacterTest.txt | 12 +- 24 files changed, 1101 insertions(+), 419 deletions(-) diff --git a/admin/unidata/BidiBrackets.txt b/admin/unidata/BidiBrackets.txt index 89698f588ae..e138e7f5bea 100644 --- a/admin/unidata/BidiBrackets.txt +++ b/admin/unidata/BidiBrackets.txt @@ -1,6 +1,6 @@ -# BidiBrackets-14.0.0.txt -# Date: 2021-06-30, 23:59:00 GMT [AG, LI, KW] -# © 2021 Unicode®, Inc. +# BidiBrackets-15.0.0.txt +# Date: 2022-05-03, 18:42:00 GMT [AG, LI, KW] +# © 2022 Unicode®, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. # For terms of use, see https://www.unicode.org/terms_of_use.html # diff --git a/admin/unidata/BidiMirroring.txt b/admin/unidata/BidiMirroring.txt index bd8e2c5d001..5861d6e7f4b 100644 --- a/admin/unidata/BidiMirroring.txt +++ b/admin/unidata/BidiMirroring.txt @@ -1,6 +1,6 @@ -# BidiMirroring-14.0.0.txt -# Date: 2021-08-08, 22:55:00 GMT [KW, RP] -# © 2021 Unicode®, Inc. +# BidiMirroring-15.0.0.txt +# Date: 2022-05-03, 18:47:00 GMT [KW, RP] +# © 2022 Unicode®, Inc. # For terms of use, see https://www.unicode.org/terms_of_use.html # # Unicode Character Database @@ -15,7 +15,7 @@ # value, for which there is another Unicode character that typically has a glyph # that is the mirror image of the original character's glyph. # -# The repertoire covered by the file is Unicode 14.0.0. +# The repertoire covered by the file is Unicode 15.0.0. # # The file contains a list of lines with mappings from one code point # to another one for character-based mirroring. diff --git a/admin/unidata/Blocks.txt b/admin/unidata/Blocks.txt index cc5d61988bb..12684594c9f 100644 --- a/admin/unidata/Blocks.txt +++ b/admin/unidata/Blocks.txt @@ -1,10 +1,10 @@ -# Blocks-14.0.0.txt -# Date: 2021-01-22, 23:29:00 GMT [KW] -# © 2021 Unicode®, Inc. -# For terms of use, see http://www.unicode.org/terms_of_use.html +# Blocks-15.0.0.txt +# Date: 2022-01-28, 20:58:00 GMT [KW] +# © 2022 Unicode®, Inc. +# For terms of use, see https://www.unicode.org/terms_of_use.html # # Unicode Character Database -# For documentation, see http://www.unicode.org/reports/tr44/ +# For documentation, see https://www.unicode.org/reports/tr44/ # # Format: # Start Code..End Code; Block Name @@ -15,7 +15,7 @@ # and underbars are ignored. # For example, "Latin Extended-A" and "latin extended a" are equivalent. # For more information on the comparison of property values, -# see UAX #44: http://www.unicode.org/reports/tr44/ +# see UAX #44: https://www.unicode.org/reports/tr44/ # # All block ranges start with a value where (cp MOD 16) = 0, # and end with a value where (cp MOD 16) = 15. In other words, @@ -241,6 +241,7 @@ FFF0..FFFF; Specials 10D00..10D3F; Hanifi Rohingya 10E60..10E7F; Rumi Numeral Symbols 10E80..10EBF; Yezidi +10EC0..10EFF; Arabic Extended-C 10F00..10F2F; Old Sogdian 10F30..10F6F; Sogdian 10F70..10FAF; Old Uyghur @@ -272,11 +273,13 @@ FFF0..FFFF; Specials 11A50..11AAF; Soyombo 11AB0..11ABF; Unified Canadian Aboriginal Syllabics Extended-A 11AC0..11AFF; Pau Cin Hau +11B00..11B5F; Devanagari Extended-A 11C00..11C6F; Bhaiksuki 11C70..11CBF; Marchen 11D00..11D5F; Masaram Gondi 11D60..11DAF; Gunjala Gondi 11EE0..11EFF; Makasar +11F00..11F5F; Kawi 11FB0..11FBF; Lisu Supplement 11FC0..11FFF; Tamil Supplement 12000..123FF; Cuneiform @@ -284,7 +287,7 @@ FFF0..FFFF; Specials 12480..1254F; Early Dynastic Cuneiform 12F90..12FFF; Cypro-Minoan 13000..1342F; Egyptian Hieroglyphs -13430..1343F; Egyptian Hieroglyph Format Controls +13430..1345F; Egyptian Hieroglyph Format Controls 14400..1467F; Anatolian Hieroglyphs 16800..16A3F; Bamum Supplement 16A40..16A6F; Mro @@ -309,6 +312,7 @@ FFF0..FFFF; Specials 1D000..1D0FF; Byzantine Musical Symbols 1D100..1D1FF; Musical Symbols 1D200..1D24F; Ancient Greek Musical Notation +1D2C0..1D2DF; Kaktovik Numerals 1D2E0..1D2FF; Mayan Numerals 1D300..1D35F; Tai Xuan Jing Symbols 1D360..1D37F; Counting Rod Numerals @@ -316,9 +320,11 @@ FFF0..FFFF; Specials 1D800..1DAAF; Sutton SignWriting 1DF00..1DFFF; Latin Extended-G 1E000..1E02F; Glagolitic Supplement +1E030..1E08F; Cyrillic Extended-D 1E100..1E14F; Nyiakeng Puachue Hmong 1E290..1E2BF; Toto 1E2C0..1E2FF; Wancho +1E4D0..1E4FF; Nag Mundari 1E7E0..1E7FF; Ethiopic Extended-B 1E800..1E8DF; Mende Kikakui 1E900..1E95F; Adlam @@ -348,6 +354,7 @@ FFF0..FFFF; Specials 2CEB0..2EBEF; CJK Unified Ideographs Extension F 2F800..2FA1F; CJK Compatibility Ideographs Supplement 30000..3134F; CJK Unified Ideographs Extension G +31350..323AF; CJK Unified Ideographs Extension H E0000..E007F; Tags E0100..E01EF; Variation Selectors Supplement F0000..FFFFF; Supplementary Private Use Area-A diff --git a/admin/unidata/IVD_Sequences.txt b/admin/unidata/IVD_Sequences.txt index 886d8519ab5..86a4ab5138f 100644 --- a/admin/unidata/IVD_Sequences.txt +++ b/admin/unidata/IVD_Sequences.txt @@ -2,6 +2,9 @@ # # History: # +# 2022-09-13 Registration of additional sequences in the Adobe-Japan1 +# collection. +# # 2020-11-06 Registration of additional sequences in the MSARG # collection. # @@ -32,7 +35,7 @@ # For more details on the IVD, see UTS #37: # https://www.unicode.org/reports/tr37/ # -# Copyright 2006-2020 Unicode, Inc. +# Copyright 2006-2022 Unicode, Inc. # For terms of use, see: https://www.unicode.org/copyright.html#8 # 3402 E0100; Adobe-Japan1; CID+13698 @@ -39337,4 +39340,5 @@ FA29 E0100; Adobe-Japan1; CID+8687 2EB71 E0101; Moji_Joho; MJ059252 2EB79 E0100; Moji_Joho; MJ059255 2EB79 E0101; Moji_Joho; MJ059256 +31350 E0100; Adobe-Japan1; CID+19130 # EOF diff --git a/admin/unidata/IdnaMappingTable.txt b/admin/unidata/IdnaMappingTable.txt index 1b862827ef7..e4c06117929 100644 --- a/admin/unidata/IdnaMappingTable.txt +++ b/admin/unidata/IdnaMappingTable.txt @@ -1,13 +1,13 @@ # IdnaMappingTable.txt -# Date: 2021-07-10, 00:49:51 GMT -# © 2021 Unicode®, Inc. +# Date: 2022-05-02, 19:29:26 GMT +# © 2022 Unicode®, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. -# For terms of use, see http://www.unicode.org/terms_of_use.html +# For terms of use, see https://www.unicode.org/terms_of_use.html # # Unicode IDNA Compatible Preprocessing for UTS #46 -# Version: 14.0.0 +# Version: 15.0.0 # -# For documentation and usage, see http://www.unicode.org/reports/tr46 +# For documentation and usage, see https://www.unicode.org/reports/tr46 # 0000..002C ; disallowed_STD3_valid # 1.1 ..COMMA 002D..002E ; valid # 1.1 HYPHEN-MINUS..FULL STOP @@ -1278,7 +1278,8 @@ 0CE6..0CEF ; valid # 1.1 KANNADA DIGIT ZERO..KANNADA DIGIT NINE 0CF0 ; disallowed # NA 0CF1..0CF2 ; valid # 5.0 KANNADA SIGN JIHVAMULIYA..KANNADA SIGN UPADHMANIYA -0CF3..0CFF ; disallowed # NA .. +0CF3 ; valid # 15.0 KANNADA SIGN COMBINING ANUSVARA ABOVE RIGHT +0CF4..0CFF ; disallowed # NA .. 0D00 ; valid # 10.0 MALAYALAM SIGN COMBINING ANUSVARA ABOVE 0D01 ; valid # 7.0 MALAYALAM SIGN CANDRABINDU 0D02..0D03 ; valid # 1.1 MALAYALAM SIGN ANUSVARA..MALAYALAM SIGN VISARGA @@ -1386,7 +1387,8 @@ 0EC6 ; valid # 1.1 LAO KO LA 0EC7 ; disallowed # NA 0EC8..0ECD ; valid # 1.1 LAO TONE MAI EK..LAO NIGGAHITA -0ECE..0ECF ; disallowed # NA .. +0ECE ; valid # 15.0 LAO YAMAKKAN +0ECF ; disallowed # NA 0ED0..0ED9 ; valid # 1.1 LAO DIGIT ZERO..LAO DIGIT NINE 0EDA..0EDB ; disallowed # NA .. 0EDC ; mapped ; 0EAB 0E99 # 1.1 LAO HO NO @@ -6206,7 +6208,8 @@ FFFE..FFFF ; disallowed # 1.1 .. 10EB0..10EB1 ; valid # 13.0 YEZIDI LETTER LAM WITH DOT ABOVE..YEZIDI LETTER YOT WITH CIRCUMFLEX ABOVE -10EB2..10EFF ; disallowed # NA .. +10EB2..10EFC ; disallowed # NA .. +10EFD..10EFF ; valid # 15.0 ARABIC SMALL LOW WORD SAKTA..ARABIC SMALL LOW WORD MADDA 10F00..10F1C ; valid # 11.0 OLD SOGDIAN LETTER ALEPH..OLD SOGDIAN LETTER FINAL TAW WITH VERTICAL TAIL 10F1D..10F26 ; valid ; ; NV8 # 11.0 OLD SOGDIAN NUMBER ONE..OLD SOGDIAN FRACTION ONE HALF 10F27 ; valid # 11.0 OLD SOGDIAN LIGATURE AYIN-DALETH @@ -6271,7 +6274,8 @@ FFFE..FFFF ; disallowed # 1.1 .. +1123F..11241 ; valid # 15.0 KHOJKI LETTER QA..KHOJKI VOWEL SIGN VOCALIC R +11242..1127F ; disallowed # NA .. 11280..11286 ; valid # 8.0 MULTANI LETTER A..MULTANI LETTER GA 11287 ; disallowed # NA 11288 ; valid # 8.0 MULTANI LETTER GHA @@ -6443,7 +6447,9 @@ FFFE..FFFF ; disallowed # 1.1 .. 11AB0..11ABF ; valid # 14.0 CANADIAN SYLLABICS NATTILIK HI..CANADIAN SYLLABICS SPA 11AC0..11AF8 ; valid # 7.0 PAU CIN HAU LETTER PA..PAU CIN HAU GLOTTAL STOP FINAL -11AF9..11BFF ; disallowed # NA .. +11AF9..11AFF ; disallowed # NA .. +11B00..11B09 ; valid ; ; NV8 # 15.0 DEVANAGARI HEAD MARK..DEVANAGARI SIGN MINDU +11B0A..11BFF ; disallowed # NA .. 11C00..11C08 ; valid # 9.0 BHAIKSUKI LETTER A..BHAIKSUKI LETTER VOCALIC L 11C09 ; disallowed # NA 11C0A..11C36 ; valid # 9.0 BHAIKSUKI LETTER E..BHAIKSUKI VOWEL SIGN VOCALIC L @@ -6489,7 +6495,15 @@ FFFE..FFFF ; disallowed # 1.1 .. 11EE0..11EF6 ; valid # 11.0 MAKASAR LETTER KA..MAKASAR VOWEL SIGN O 11EF7..11EF8 ; valid ; ; NV8 # 11.0 MAKASAR PASSIMBANG..MAKASAR END OF SECTION -11EF9..11FAF ; disallowed # NA .. +11EF9..11EFF ; disallowed # NA .. +11F00..11F10 ; valid # 15.0 KAWI SIGN CANDRABINDU..KAWI LETTER O +11F11 ; disallowed # NA +11F12..11F3A ; valid # 15.0 KAWI LETTER KA..KAWI VOWEL SIGN VOCALIC R +11F3B..11F3D ; disallowed # NA .. +11F3E..11F42 ; valid # 15.0 KAWI VOWEL SIGN E..KAWI CONJOINER +11F43..11F4F ; valid ; ; NV8 # 15.0 KAWI DANDA..KAWI PUNCTUATION CLOSING SPIRAL +11F50..11F59 ; valid # 15.0 KAWI DIGIT ZERO..KAWI DIGIT NINE +11F5A..11FAF ; disallowed # NA .. 11FB0 ; valid # 13.0 LISU LETTER YHA 11FB1..11FBF ; disallowed # NA .. 11FC0..11FF1 ; valid ; ; NV8 # 12.0 TAMIL FRACTION ONE THREE-HUNDRED-AND-TWENTIETH..TAMIL SIGN VAKAIYARAA @@ -6511,9 +6525,11 @@ FFFE..FFFF ; disallowed # 1.1 .. 13000..1342E ; valid # 5.2 EGYPTIAN HIEROGLYPH A001..EGYPTIAN HIEROGLYPH AA032 -1342F ; disallowed # NA +1342F ; valid # 15.0 EGYPTIAN HIEROGLYPH V011D 13430..13438 ; disallowed # 12.0 EGYPTIAN HIEROGLYPH VERTICAL JOINER..EGYPTIAN HIEROGLYPH END SEGMENT -13439..143FF ; disallowed # NA .. +13439..1343F ; disallowed # 15.0 EGYPTIAN HIEROGLYPH INSERT AT MIDDLE..EGYPTIAN HIEROGLYPH END WALLED ENCLOSURE +13440..13455 ; valid # 15.0 EGYPTIAN HIEROGLYPH MIRROR HORIZONTALLY..EGYPTIAN HIEROGLYPH MODIFIER DAMAGED +13456..143FF ; disallowed # NA .. 14400..14646 ; valid # 8.0 ANATOLIAN HIEROGLYPH A001..ANATOLIAN HIEROGLYPH A530 14647..167FF ; disallowed # NA .. 16800..16A38 ; valid # 6.0 BAMUM LETTER PHASE-A NGKUE MFON..BAMUM LETTER PHASE-F VUEQ @@ -6615,9 +6631,13 @@ FFFE..FFFF ; disallowed # 1.1 .. +1B123..1B131 ; disallowed # NA .. +1B132 ; valid # 15.0 HIRAGANA LETTER SMALL KO +1B133..1B14F ; disallowed # NA .. 1B150..1B152 ; valid # 12.0 HIRAGANA LETTER SMALL WI..HIRAGANA LETTER SMALL WO -1B153..1B163 ; disallowed # NA .. +1B153..1B154 ; disallowed # NA .. +1B155 ; valid # 15.0 KATAKANA LETTER SMALL KO +1B156..1B163 ; disallowed # NA .. 1B164..1B167 ; valid # 12.0 KATAKANA LETTER SMALL WI..KATAKANA LETTER SMALL N 1B168..1B16F ; disallowed # NA .. 1B170..1B2FB ; valid # 10.0 NUSHU CHARACTER-1B170..NUSHU CHARACTER-1B2FB @@ -6668,7 +6688,9 @@ FFFE..FFFF ; disallowed # 1.1 .. 1D200..1D245 ; valid ; ; NV8 # 4.1 GREEK VOCAL NOTATION SYMBOL-1..GREEK MUSICAL LEIMMA -1D246..1D2DF ; disallowed # NA .. +1D246..1D2BF ; disallowed # NA .. +1D2C0..1D2D3 ; valid ; ; NV8 # 15.0 KAKTOVIK NUMERAL ZERO..KAKTOVIK NUMERAL NINETEEN +1D2D4..1D2DF ; disallowed # NA .. 1D2E0..1D2F3 ; valid ; ; NV8 # 11.0 MAYAN NUMERAL ZERO..MAYAN NUMERAL NINETEEN 1D2F4..1D2FF ; disallowed # NA .. 1D300..1D356 ; valid ; ; NV8 # 4.0 MONOGRAM FOR EARTH..TETRAGRAM FOR FOSTERING @@ -7701,7 +7723,9 @@ FFFE..FFFF ; disallowed # 1.1 .. 1DF00..1DF1E ; valid # 14.0 LATIN SMALL LETTER FENG DIGRAPH WITH TRILL..LATIN SMALL LETTER S WITH CURL -1DF1F..1DFFF ; disallowed # NA .. +1DF1F..1DF24 ; disallowed # NA .. +1DF25..1DF2A ; valid # 15.0 LATIN SMALL LETTER D WITH MID-HEIGHT LEFT HOOK..LATIN SMALL LETTER T WITH MID-HEIGHT LEFT HOOK +1DF2B..1DFFF ; disallowed # NA .. 1E000..1E006 ; valid # 9.0 COMBINING GLAGOLITIC LETTER AZU..COMBINING GLAGOLITIC LETTER ZHIVETE 1E007 ; disallowed # NA 1E008..1E018 ; valid # 9.0 COMBINING GLAGOLITIC LETTER ZEMLJA..COMBINING GLAGOLITIC LETTER HERU @@ -7711,7 +7735,72 @@ FFFE..FFFF ; disallowed # 1.1 1E026..1E02A ; valid # 9.0 COMBINING GLAGOLITIC LETTER YO..COMBINING GLAGOLITIC LETTER FITA -1E02B..1E0FF ; disallowed # NA .. +1E02B..1E02F ; disallowed # NA .. +1E030 ; mapped ; 0430 # 15.0 MODIFIER LETTER CYRILLIC SMALL A +1E031 ; mapped ; 0431 # 15.0 MODIFIER LETTER CYRILLIC SMALL BE +1E032 ; mapped ; 0432 # 15.0 MODIFIER LETTER CYRILLIC SMALL VE +1E033 ; mapped ; 0433 # 15.0 MODIFIER LETTER CYRILLIC SMALL GHE +1E034 ; mapped ; 0434 # 15.0 MODIFIER LETTER CYRILLIC SMALL DE +1E035 ; mapped ; 0435 # 15.0 MODIFIER LETTER CYRILLIC SMALL IE +1E036 ; mapped ; 0436 # 15.0 MODIFIER LETTER CYRILLIC SMALL ZHE +1E037 ; mapped ; 0437 # 15.0 MODIFIER LETTER CYRILLIC SMALL ZE +1E038 ; mapped ; 0438 # 15.0 MODIFIER LETTER CYRILLIC SMALL I +1E039 ; mapped ; 043A # 15.0 MODIFIER LETTER CYRILLIC SMALL KA +1E03A ; mapped ; 043B # 15.0 MODIFIER LETTER CYRILLIC SMALL EL +1E03B ; mapped ; 043C # 15.0 MODIFIER LETTER CYRILLIC SMALL EM +1E03C ; mapped ; 043E # 15.0 MODIFIER LETTER CYRILLIC SMALL O +1E03D ; mapped ; 043F # 15.0 MODIFIER LETTER CYRILLIC SMALL PE +1E03E ; mapped ; 0440 # 15.0 MODIFIER LETTER CYRILLIC SMALL ER +1E03F ; mapped ; 0441 # 15.0 MODIFIER LETTER CYRILLIC SMALL ES +1E040 ; mapped ; 0442 # 15.0 MODIFIER LETTER CYRILLIC SMALL TE +1E041 ; mapped ; 0443 # 15.0 MODIFIER LETTER CYRILLIC SMALL U +1E042 ; mapped ; 0444 # 15.0 MODIFIER LETTER CYRILLIC SMALL EF +1E043 ; mapped ; 0445 # 15.0 MODIFIER LETTER CYRILLIC SMALL HA +1E044 ; mapped ; 0446 # 15.0 MODIFIER LETTER CYRILLIC SMALL TSE +1E045 ; mapped ; 0447 # 15.0 MODIFIER LETTER CYRILLIC SMALL CHE +1E046 ; mapped ; 0448 # 15.0 MODIFIER LETTER CYRILLIC SMALL SHA +1E047 ; mapped ; 044B # 15.0 MODIFIER LETTER CYRILLIC SMALL YERU +1E048 ; mapped ; 044D # 15.0 MODIFIER LETTER CYRILLIC SMALL E +1E049 ; mapped ; 044E # 15.0 MODIFIER LETTER CYRILLIC SMALL YU +1E04A ; mapped ; A689 # 15.0 MODIFIER LETTER CYRILLIC SMALL DZZE +1E04B ; mapped ; 04D9 # 15.0 MODIFIER LETTER CYRILLIC SMALL SCHWA +1E04C ; mapped ; 0456 # 15.0 MODIFIER LETTER CYRILLIC SMALL BYELORUSSIAN-UKRAINIAN I +1E04D ; mapped ; 0458 # 15.0 MODIFIER LETTER CYRILLIC SMALL JE +1E04E ; mapped ; 04E9 # 15.0 MODIFIER LETTER CYRILLIC SMALL BARRED O +1E04F ; mapped ; 04AF # 15.0 MODIFIER LETTER CYRILLIC SMALL STRAIGHT U +1E050 ; mapped ; 04CF # 15.0 MODIFIER LETTER CYRILLIC SMALL PALOCHKA +1E051 ; mapped ; 0430 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER A +1E052 ; mapped ; 0431 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER BE +1E053 ; mapped ; 0432 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER VE +1E054 ; mapped ; 0433 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER GHE +1E055 ; mapped ; 0434 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER DE +1E056 ; mapped ; 0435 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER IE +1E057 ; mapped ; 0436 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER ZHE +1E058 ; mapped ; 0437 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER ZE +1E059 ; mapped ; 0438 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER I +1E05A ; mapped ; 043A # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER KA +1E05B ; mapped ; 043B # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER EL +1E05C ; mapped ; 043E # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER O +1E05D ; mapped ; 043F # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER PE +1E05E ; mapped ; 0441 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER ES +1E05F ; mapped ; 0443 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER U +1E060 ; mapped ; 0444 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER EF +1E061 ; mapped ; 0445 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER HA +1E062 ; mapped ; 0446 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER TSE +1E063 ; mapped ; 0447 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER CHE +1E064 ; mapped ; 0448 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER SHA +1E065 ; mapped ; 044A # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER HARD SIGN +1E066 ; mapped ; 044B # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER YERU +1E067 ; mapped ; 0491 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER GHE WITH UPTURN +1E068 ; mapped ; 0456 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER BYELORUSSIAN-UKRAINIAN I +1E069 ; mapped ; 0455 # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER DZE +1E06A ; mapped ; 045F # 15.0 CYRILLIC SUBSCRIPT SMALL LETTER DZHE +1E06B ; mapped ; 04AB # 15.0 MODIFIER LETTER CYRILLIC SMALL ES WITH DESCENDER +1E06C ; mapped ; A651 # 15.0 MODIFIER LETTER CYRILLIC SMALL YERU WITH BACK YER +1E06D ; mapped ; 04B1 # 15.0 MODIFIER LETTER CYRILLIC SMALL STRAIGHT U WITH STROKE +1E06E..1E08E ; disallowed # NA .. +1E08F ; valid # 15.0 COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I +1E090..1E0FF ; disallowed # NA .. 1E100..1E12C ; valid # 12.0 NYIAKENG PUACHUE HMONG LETTER MA..NYIAKENG PUACHUE HMONG LETTER W 1E12D..1E12F ; disallowed # NA .. 1E130..1E13D ; valid # 12.0 NYIAKENG PUACHUE HMONG TONE-B..NYIAKENG PUACHUE HMONG SYLLABLE LENGTHENER @@ -7726,7 +7815,9 @@ FFFE..FFFF ; disallowed # 1.1 .. 1E2FF ; valid ; ; NV8 # 12.0 WANCHO NGUN SIGN -1E300..1E7DF ; disallowed # NA .. +1E300..1E4CF ; disallowed # NA .. +1E4D0..1E4F9 ; valid # 15.0 NAG MUNDARI LETTER O..NAG MUNDARI DIGIT NINE +1E4FA..1E7DF ; disallowed # NA .. 1E7E0..1E7E6 ; valid # 14.0 ETHIOPIC SYLLABLE HHYA..ETHIOPIC SYLLABLE HHYO 1E7E7 ; disallowed # NA 1E7E8..1E7EB ; valid # 14.0 ETHIOPIC SYLLABLE GURAGE HHWA..ETHIOPIC SYLLABLE HHWE @@ -8213,7 +8304,8 @@ FFFE..FFFF ; disallowed # 1.1 .. +1F6D8..1F6DB ; disallowed # NA .. +1F6DC ; valid ; ; NV8 # 15.0 WIRELESS 1F6DD..1F6DF ; valid ; ; NV8 # 14.0 PLAYGROUND SLIDE..RING BUOY 1F6E0..1F6EC ; valid ; ; NV8 # 7.0 HAMMER AND WRENCH..AIRPLANE ARRIVING 1F6ED..1F6EF ; disallowed # NA .. @@ -8225,10 +8317,13 @@ FFFE..FFFF ; disallowed # 1.1 .. 1F700..1F773 ; valid ; ; NV8 # 6.0 ALCHEMICAL SYMBOL FOR QUINTESSENCE..ALCHEMICAL SYMBOL FOR HALF OUNCE -1F774..1F77F ; disallowed # NA .. +1F774..1F776 ; valid ; ; NV8 # 15.0 LOT OF FORTUNE..LUNAR ECLIPSE +1F777..1F77A ; disallowed # NA .. +1F77B..1F77F ; valid ; ; NV8 # 15.0 HAUMEA..ORCUS 1F780..1F7D4 ; valid ; ; NV8 # 7.0 BLACK LEFT-POINTING ISOSCELES RIGHT TRIANGLE..HEAVY TWELVE POINTED PINWHEEL STAR 1F7D5..1F7D8 ; valid ; ; NV8 # 11.0 CIRCLED TRIANGLE..NEGATIVE CIRCLED SQUARE -1F7D9..1F7DF ; disallowed # NA .. +1F7D9 ; valid ; ; NV8 # 15.0 NINE POINTED WHITE STAR +1F7DA..1F7DF ; disallowed # NA .. 1F7E0..1F7EB ; valid ; ; NV8 # 12.0 LARGE ORANGE CIRCLE..LARGE BROWN SQUARE 1F7EC..1F7EF ; disallowed # NA .. 1F7F0 ; valid ; ; NV8 # 14.0 HEAVY EQUALS SIGN @@ -8295,30 +8390,37 @@ FFFE..FFFF ; disallowed # 1.1 .. 1FA70..1FA73 ; valid ; ; NV8 # 12.0 BALLET SHOES..SHORTS 1FA74 ; valid ; ; NV8 # 13.0 THONG SANDAL -1FA75..1FA77 ; disallowed # NA .. +1FA75..1FA77 ; valid ; ; NV8 # 15.0 LIGHT BLUE HEART..PINK HEART 1FA78..1FA7A ; valid ; ; NV8 # 12.0 DROP OF BLOOD..STETHOSCOPE 1FA7B..1FA7C ; valid ; ; NV8 # 14.0 X-RAY..CRUTCH 1FA7D..1FA7F ; disallowed # NA .. 1FA80..1FA82 ; valid ; ; NV8 # 12.0 YO-YO..PARACHUTE 1FA83..1FA86 ; valid ; ; NV8 # 13.0 BOOMERANG..NESTING DOLLS -1FA87..1FA8F ; disallowed # NA .. +1FA87..1FA88 ; valid ; ; NV8 # 15.0 MARACAS..FLUTE +1FA89..1FA8F ; disallowed # NA .. 1FA90..1FA95 ; valid ; ; NV8 # 12.0 RINGED PLANET..BANJO 1FA96..1FAA8 ; valid ; ; NV8 # 13.0 MILITARY HELMET..ROCK 1FAA9..1FAAC ; valid ; ; NV8 # 14.0 MIRROR BALL..HAMSA -1FAAD..1FAAF ; disallowed # NA .. +1FAAD..1FAAF ; valid ; ; NV8 # 15.0 FOLDING HAND FAN..KHANDA 1FAB0..1FAB6 ; valid ; ; NV8 # 13.0 FLY..FEATHER 1FAB7..1FABA ; valid ; ; NV8 # 14.0 LOTUS..NEST WITH EGGS -1FABB..1FABF ; disallowed # NA .. +1FABB..1FABD ; valid ; ; NV8 # 15.0 HYACINTH..WING +1FABE ; disallowed # NA +1FABF ; valid ; ; NV8 # 15.0 GOOSE 1FAC0..1FAC2 ; valid ; ; NV8 # 13.0 ANATOMICAL HEART..PEOPLE HUGGING 1FAC3..1FAC5 ; valid ; ; NV8 # 14.0 PREGNANT MAN..PERSON WITH CROWN -1FAC6..1FACF ; disallowed # NA .. +1FAC6..1FACD ; disallowed # NA .. +1FACE..1FACF ; valid ; ; NV8 # 15.0 MOOSE..DONKEY 1FAD0..1FAD6 ; valid ; ; NV8 # 13.0 BLUEBERRIES..TEAPOT 1FAD7..1FAD9 ; valid ; ; NV8 # 14.0 POURING LIQUID..JAR -1FADA..1FADF ; disallowed # NA .. +1FADA..1FADB ; valid ; ; NV8 # 15.0 GINGER ROOT..PEA POD +1FADC..1FADF ; disallowed # NA .. 1FAE0..1FAE7 ; valid ; ; NV8 # 14.0 MELTING FACE..BUBBLES -1FAE8..1FAEF ; disallowed # NA .. +1FAE8 ; valid ; ; NV8 # 15.0 SHAKING FACE +1FAE9..1FAEF ; disallowed # NA .. 1FAF0..1FAF6 ; valid ; ; NV8 # 14.0 HAND WITH INDEX FINGER AND THUMB CROSSED..HEART HANDS -1FAF7..1FAFF ; disallowed # NA .. +1FAF7..1FAF8 ; valid ; ; NV8 # 15.0 LEFTWARDS PUSHING HAND..RIGHTWARDS PUSHING HAND +1FAF9..1FAFF ; disallowed # NA .. 1FB00..1FB92 ; valid ; ; NV8 # 13.0 BLOCK SEXTANT-1..UPPER HALF INVERSE MEDIUM SHADE AND LOWER HALF BLOCK 1FB93 ; disallowed # NA 1FB94..1FBCA ; valid ; ; NV8 # 13.0 LEFT HALF INVERSE MEDIUM SHADE AND RIGHT HALF BLOCK..WHITE UP-POINTING CHEVRON @@ -8341,7 +8443,8 @@ FFFE..FFFF ; disallowed # 1.1 .. 2A700..2B734 ; valid # 5.2 CJK UNIFIED IDEOGRAPH-2A700..CJK UNIFIED IDEOGRAPH-2B734 2B735..2B738 ; valid # 14.0 CJK UNIFIED IDEOGRAPH-2B735..CJK UNIFIED IDEOGRAPH-2B738 -2B739..2B73F ; disallowed # NA .. +2B739 ; valid # 15.0 CJK UNIFIED IDEOGRAPH-2B739 +2B73A..2B73F ; disallowed # NA .. 2B740..2B81D ; valid # 6.0 CJK UNIFIED IDEOGRAPH-2B740..CJK UNIFIED IDEOGRAPH-2B81D 2B81E..2B81F ; disallowed # NA .. 2B820..2CEA1 ; valid # 8.0 CJK UNIFIED IDEOGRAPH-2B820..CJK UNIFIED IDEOGRAPH-2CEA1 @@ -8883,7 +8986,9 @@ FFFE..FFFF ; disallowed # 1.1 .. 2FFFE..2FFFF ; disallowed # 2.0 .. 30000..3134A ; valid # 13.0 CJK UNIFIED IDEOGRAPH-30000..CJK UNIFIED IDEOGRAPH-3134A -3134B..3FFFD ; disallowed # NA .. +3134B..3134F ; disallowed # NA .. +31350..323AF ; valid # 15.0 CJK UNIFIED IDEOGRAPH-31350..CJK UNIFIED IDEOGRAPH-323AF +323B0..3FFFD ; disallowed # NA .. 3FFFE..3FFFF ; disallowed # 2.0 .. 40000..4FFFD ; disallowed # NA .. 4FFFE..4FFFF ; disallowed # 2.0 .. diff --git a/admin/unidata/NormalizationTest.txt b/admin/unidata/NormalizationTest.txt index 302c35f37c7..e75b4801c9b 100644 --- a/admin/unidata/NormalizationTest.txt +++ b/admin/unidata/NormalizationTest.txt @@ -1,11 +1,11 @@ -# NormalizationTest-14.0.0.txt -# Date: 2021-05-28, 21:49:12 GMT -# © 2021 Unicode®, Inc. +# NormalizationTest-15.0.0.txt +# Date: 2022-04-02, 01:29:09 GMT +# © 2022 Unicode®, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. -# For terms of use, see http://www.unicode.org/terms_of_use.html +# For terms of use, see https://www.unicode.org/terms_of_use.html # # Unicode Character Database -# For documentation, see http://www.unicode.org/reports/tr44/ +# For documentation, see https://www.unicode.org/reports/tr44/ # # Normalization Test Suite # Format: @@ -16208,6 +16208,68 @@ FFEE;FFEE;FFEE;25CB;25CB; # (○; ○; ○; ○; ○; ) HALFWIDTH WHITE CIRCLE 1D7FD;1D7FD;1D7FD;0037;0037; # (𝟽; 𝟽; 𝟽; 7; 7; ) MATHEMATICAL MONOSPACE DIGIT SEVEN 1D7FE;1D7FE;1D7FE;0038;0038; # (𝟾; 𝟾; 𝟾; 8; 8; ) MATHEMATICAL MONOSPACE DIGIT EIGHT 1D7FF;1D7FF;1D7FF;0039;0039; # (𝟿; 𝟿; 𝟿; 9; 9; ) MATHEMATICAL MONOSPACE DIGIT NINE +1E030;1E030;1E030;0430;0430; # (𞀰; 𞀰; 𞀰; а; а; ) MODIFIER LETTER CYRILLIC SMALL A +1E031;1E031;1E031;0431;0431; # (𞀱; 𞀱; 𞀱; б; б; ) MODIFIER LETTER CYRILLIC SMALL BE +1E032;1E032;1E032;0432;0432; # (𞀲; 𞀲; 𞀲; в; в; ) MODIFIER LETTER CYRILLIC SMALL VE +1E033;1E033;1E033;0433;0433; # (𞀳; 𞀳; 𞀳; г; г; ) MODIFIER LETTER CYRILLIC SMALL GHE +1E034;1E034;1E034;0434;0434; # (𞀴; 𞀴; 𞀴; д; д; ) MODIFIER LETTER CYRILLIC SMALL DE +1E035;1E035;1E035;0435;0435; # (𞀵; 𞀵; 𞀵; е; е; ) MODIFIER LETTER CYRILLIC SMALL IE +1E036;1E036;1E036;0436;0436; # (𞀶; 𞀶; 𞀶; ж; ж; ) MODIFIER LETTER CYRILLIC SMALL ZHE +1E037;1E037;1E037;0437;0437; # (𞀷; 𞀷; 𞀷; з; з; ) MODIFIER LETTER CYRILLIC SMALL ZE +1E038;1E038;1E038;0438;0438; # (𞀸; 𞀸; 𞀸; и; и; ) MODIFIER LETTER CYRILLIC SMALL I +1E039;1E039;1E039;043A;043A; # (𞀹; 𞀹; 𞀹; к; к; ) MODIFIER LETTER CYRILLIC SMALL KA +1E03A;1E03A;1E03A;043B;043B; # (𞀺; 𞀺; 𞀺; л; л; ) MODIFIER LETTER CYRILLIC SMALL EL +1E03B;1E03B;1E03B;043C;043C; # (𞀻; 𞀻; 𞀻; м; м; ) MODIFIER LETTER CYRILLIC SMALL EM +1E03C;1E03C;1E03C;043E;043E; # (𞀼; 𞀼; 𞀼; о; о; ) MODIFIER LETTER CYRILLIC SMALL O +1E03D;1E03D;1E03D;043F;043F; # (𞀽; 𞀽; 𞀽; п; п; ) MODIFIER LETTER CYRILLIC SMALL PE +1E03E;1E03E;1E03E;0440;0440; # (𞀾; 𞀾; 𞀾; р; р; ) MODIFIER LETTER CYRILLIC SMALL ER +1E03F;1E03F;1E03F;0441;0441; # (𞀿; 𞀿; 𞀿; с; с; ) MODIFIER LETTER CYRILLIC SMALL ES +1E040;1E040;1E040;0442;0442; # (𞁀; 𞁀; 𞁀; т; т; ) MODIFIER LETTER CYRILLIC SMALL TE +1E041;1E041;1E041;0443;0443; # (𞁁; 𞁁; 𞁁; у; у; ) MODIFIER LETTER CYRILLIC SMALL U +1E042;1E042;1E042;0444;0444; # (𞁂; 𞁂; 𞁂; ф; ф; ) MODIFIER LETTER CYRILLIC SMALL EF +1E043;1E043;1E043;0445;0445; # (𞁃; 𞁃; 𞁃; х; х; ) MODIFIER LETTER CYRILLIC SMALL HA +1E044;1E044;1E044;0446;0446; # (𞁄; 𞁄; 𞁄; ц; ц; ) MODIFIER LETTER CYRILLIC SMALL TSE +1E045;1E045;1E045;0447;0447; # (𞁅; 𞁅; 𞁅; ч; ч; ) MODIFIER LETTER CYRILLIC SMALL CHE +1E046;1E046;1E046;0448;0448; # (𞁆; 𞁆; 𞁆; ш; ш; ) MODIFIER LETTER CYRILLIC SMALL SHA +1E047;1E047;1E047;044B;044B; # (𞁇; 𞁇; 𞁇; ы; ы; ) MODIFIER LETTER CYRILLIC SMALL YERU +1E048;1E048;1E048;044D;044D; # (𞁈; 𞁈; 𞁈; э; э; ) MODIFIER LETTER CYRILLIC SMALL E +1E049;1E049;1E049;044E;044E; # (𞁉; 𞁉; 𞁉; ю; ю; ) MODIFIER LETTER CYRILLIC SMALL YU +1E04A;1E04A;1E04A;A689;A689; # (𞁊; 𞁊; 𞁊; ꚉ; ꚉ; ) MODIFIER LETTER CYRILLIC SMALL DZZE +1E04B;1E04B;1E04B;04D9;04D9; # (𞁋; 𞁋; 𞁋; ә; ә; ) MODIFIER LETTER CYRILLIC SMALL SCHWA +1E04C;1E04C;1E04C;0456;0456; # (𞁌; 𞁌; 𞁌; і; і; ) MODIFIER LETTER CYRILLIC SMALL BYELORUSSIAN-UKRAINIAN I +1E04D;1E04D;1E04D;0458;0458; # (𞁍; 𞁍; 𞁍; ј; ј; ) MODIFIER LETTER CYRILLIC SMALL JE +1E04E;1E04E;1E04E;04E9;04E9; # (𞁎; 𞁎; 𞁎; ө; ө; ) MODIFIER LETTER CYRILLIC SMALL BARRED O +1E04F;1E04F;1E04F;04AF;04AF; # (𞁏; 𞁏; 𞁏; ү; ү; ) MODIFIER LETTER CYRILLIC SMALL STRAIGHT U +1E050;1E050;1E050;04CF;04CF; # (𞁐; 𞁐; 𞁐; ӏ; ӏ; ) MODIFIER LETTER CYRILLIC SMALL PALOCHKA +1E051;1E051;1E051;0430;0430; # (𞁑; 𞁑; 𞁑; а; а; ) CYRILLIC SUBSCRIPT SMALL LETTER A +1E052;1E052;1E052;0431;0431; # (𞁒; 𞁒; 𞁒; б; б; ) CYRILLIC SUBSCRIPT SMALL LETTER BE +1E053;1E053;1E053;0432;0432; # (𞁓; 𞁓; 𞁓; в; в; ) CYRILLIC SUBSCRIPT SMALL LETTER VE +1E054;1E054;1E054;0433;0433; # (𞁔; 𞁔; 𞁔; г; г; ) CYRILLIC SUBSCRIPT SMALL LETTER GHE +1E055;1E055;1E055;0434;0434; # (𞁕; 𞁕; 𞁕; д; д; ) CYRILLIC SUBSCRIPT SMALL LETTER DE +1E056;1E056;1E056;0435;0435; # (𞁖; 𞁖; 𞁖; е; е; ) CYRILLIC SUBSCRIPT SMALL LETTER IE +1E057;1E057;1E057;0436;0436; # (𞁗; 𞁗; 𞁗; ж; ж; ) CYRILLIC SUBSCRIPT SMALL LETTER ZHE +1E058;1E058;1E058;0437;0437; # (𞁘; 𞁘; 𞁘; з; з; ) CYRILLIC SUBSCRIPT SMALL LETTER ZE +1E059;1E059;1E059;0438;0438; # (𞁙; 𞁙; 𞁙; и; и; ) CYRILLIC SUBSCRIPT SMALL LETTER I +1E05A;1E05A;1E05A;043A;043A; # (𞁚; 𞁚; 𞁚; к; к; ) CYRILLIC SUBSCRIPT SMALL LETTER KA +1E05B;1E05B;1E05B;043B;043B; # (𞁛; 𞁛; 𞁛; л; л; ) CYRILLIC SUBSCRIPT SMALL LETTER EL +1E05C;1E05C;1E05C;043E;043E; # (𞁜; 𞁜; 𞁜; о; о; ) CYRILLIC SUBSCRIPT SMALL LETTER O +1E05D;1E05D;1E05D;043F;043F; # (𞁝; 𞁝; 𞁝; п; п; ) CYRILLIC SUBSCRIPT SMALL LETTER PE +1E05E;1E05E;1E05E;0441;0441; # (𞁞; 𞁞; 𞁞; с; с; ) CYRILLIC SUBSCRIPT SMALL LETTER ES +1E05F;1E05F;1E05F;0443;0443; # (𞁟; 𞁟; 𞁟; у; у; ) CYRILLIC SUBSCRIPT SMALL LETTER U +1E060;1E060;1E060;0444;0444; # (𞁠; 𞁠; 𞁠; ф; ф; ) CYRILLIC SUBSCRIPT SMALL LETTER EF +1E061;1E061;1E061;0445;0445; # (𞁡; 𞁡; 𞁡; х; х; ) CYRILLIC SUBSCRIPT SMALL LETTER HA +1E062;1E062;1E062;0446;0446; # (𞁢; 𞁢; 𞁢; ц; ц; ) CYRILLIC SUBSCRIPT SMALL LETTER TSE +1E063;1E063;1E063;0447;0447; # (𞁣; 𞁣; 𞁣; ч; ч; ) CYRILLIC SUBSCRIPT SMALL LETTER CHE +1E064;1E064;1E064;0448;0448; # (𞁤; 𞁤; 𞁤; ш; ш; ) CYRILLIC SUBSCRIPT SMALL LETTER SHA +1E065;1E065;1E065;044A;044A; # (𞁥; 𞁥; 𞁥; ъ; ъ; ) CYRILLIC SUBSCRIPT SMALL LETTER HARD SIGN +1E066;1E066;1E066;044B;044B; # (𞁦; 𞁦; 𞁦; ы; ы; ) CYRILLIC SUBSCRIPT SMALL LETTER YERU +1E067;1E067;1E067;0491;0491; # (𞁧; 𞁧; 𞁧; ґ; ґ; ) CYRILLIC SUBSCRIPT SMALL LETTER GHE WITH UPTURN +1E068;1E068;1E068;0456;0456; # (𞁨; 𞁨; 𞁨; і; і; ) CYRILLIC SUBSCRIPT SMALL LETTER BYELORUSSIAN-UKRAINIAN I +1E069;1E069;1E069;0455;0455; # (𞁩; 𞁩; 𞁩; ѕ; ѕ; ) CYRILLIC SUBSCRIPT SMALL LETTER DZE +1E06A;1E06A;1E06A;045F;045F; # (𞁪; 𞁪; 𞁪; џ; џ; ) CYRILLIC SUBSCRIPT SMALL LETTER DZHE +1E06B;1E06B;1E06B;04AB;04AB; # (𞁫; 𞁫; 𞁫; ҫ; ҫ; ) MODIFIER LETTER CYRILLIC SMALL ES WITH DESCENDER +1E06C;1E06C;1E06C;A651;A651; # (𞁬; 𞁬; 𞁬; ꙑ; ꙑ; ) MODIFIER LETTER CYRILLIC SMALL YERU WITH BACK YER +1E06D;1E06D;1E06D;04B1;04B1; # (𞁭; 𞁭; 𞁭; ұ; ұ; ) MODIFIER LETTER CYRILLIC SMALL STRAIGHT U WITH STROKE 1EE00;1EE00;1EE00;0627;0627; # (𞸀; 𞸀; 𞸀; ا; ا; ) ARABIC MATHEMATICAL ALEF 1EE01;1EE01;1EE01;0628;0628; # (𞸁; 𞸁; 𞸁; ب; ب; ) ARABIC MATHEMATICAL BEH 1EE02;1EE02;1EE02;062C;062C; # (𞸂; 𞸂; 𞸂; ج; ج; ) ARABIC MATHEMATICAL JEEM @@ -18496,6 +18558,12 @@ FFEE;FFEE;FFEE;25CB;25CB; # (○; ○; ○; ○; ○; ) HALFWIDTH WHITE CIRCLE 0061 10EAB 0315 0300 05AE 0062;0061 05AE 10EAB 0300 0315 0062;0061 05AE 10EAB 0300 0315 0062;0061 05AE 10EAB 0300 0315 0062;0061 05AE 10EAB 0300 0315 0062; # (a◌𐺫◌̕◌̀◌֮b; a◌֮◌𐺫◌̀◌̕b; a◌֮◌𐺫◌̀◌̕b; a◌֮◌𐺫◌̀◌̕b; a◌֮◌𐺫◌̀◌̕b; ) LATIN SMALL LETTER A, YEZIDI COMBINING HAMZA MARK, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B 0061 0315 0300 05AE 10EAC 0062;00E0 05AE 10EAC 0315 0062;0061 05AE 0300 10EAC 0315 0062;00E0 05AE 10EAC 0315 0062;0061 05AE 0300 10EAC 0315 0062; # (a◌̕◌̀◌֮◌𐺬b; à◌֮◌𐺬◌̕b; a◌֮◌̀◌𐺬◌̕b; à◌֮◌𐺬◌̕b; a◌֮◌̀◌𐺬◌̕b; ) LATIN SMALL LETTER A, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, YEZIDI COMBINING MADDA MARK, LATIN SMALL LETTER B 0061 10EAC 0315 0300 05AE 0062;0061 05AE 10EAC 0300 0315 0062;0061 05AE 10EAC 0300 0315 0062;0061 05AE 10EAC 0300 0315 0062;0061 05AE 10EAC 0300 0315 0062; # (a◌𐺬◌̕◌̀◌֮b; a◌֮◌𐺬◌̀◌̕b; a◌֮◌𐺬◌̀◌̕b; a◌֮◌𐺬◌̀◌̕b; a◌֮◌𐺬◌̀◌̕b; ) LATIN SMALL LETTER A, YEZIDI COMBINING MADDA MARK, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B +0061 059A 0316 1DFA 10EFD 0062;0061 1DFA 0316 10EFD 059A 0062;0061 1DFA 0316 10EFD 059A 0062;0061 1DFA 0316 10EFD 059A 0062;0061 1DFA 0316 10EFD 059A 0062; # (a◌֚◌̖◌᷺◌𐻽b; a◌᷺◌̖◌𐻽◌֚b; a◌᷺◌̖◌𐻽◌֚b; a◌᷺◌̖◌𐻽◌֚b; a◌᷺◌̖◌𐻽◌֚b; ) LATIN SMALL LETTER A, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, COMBINING DOT BELOW LEFT, ARABIC SMALL LOW WORD SAKTA, LATIN SMALL LETTER B +0061 10EFD 059A 0316 1DFA 0062;0061 1DFA 10EFD 0316 059A 0062;0061 1DFA 10EFD 0316 059A 0062;0061 1DFA 10EFD 0316 059A 0062;0061 1DFA 10EFD 0316 059A 0062; # (a◌𐻽◌֚◌̖◌᷺b; a◌᷺◌𐻽◌̖◌֚b; a◌᷺◌𐻽◌̖◌֚b; a◌᷺◌𐻽◌̖◌֚b; a◌᷺◌𐻽◌̖◌֚b; ) LATIN SMALL LETTER A, ARABIC SMALL LOW WORD SAKTA, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, COMBINING DOT BELOW LEFT, LATIN SMALL LETTER B +0061 059A 0316 1DFA 10EFE 0062;0061 1DFA 0316 10EFE 059A 0062;0061 1DFA 0316 10EFE 059A 0062;0061 1DFA 0316 10EFE 059A 0062;0061 1DFA 0316 10EFE 059A 0062; # (a◌֚◌̖◌᷺◌𐻾b; a◌᷺◌̖◌𐻾◌֚b; a◌᷺◌̖◌𐻾◌֚b; a◌᷺◌̖◌𐻾◌֚b; a◌᷺◌̖◌𐻾◌֚b; ) LATIN SMALL LETTER A, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, COMBINING DOT BELOW LEFT, ARABIC SMALL LOW WORD QASR, LATIN SMALL LETTER B +0061 10EFE 059A 0316 1DFA 0062;0061 1DFA 10EFE 0316 059A 0062;0061 1DFA 10EFE 0316 059A 0062;0061 1DFA 10EFE 0316 059A 0062;0061 1DFA 10EFE 0316 059A 0062; # (a◌𐻾◌֚◌̖◌᷺b; a◌᷺◌𐻾◌̖◌֚b; a◌᷺◌𐻾◌̖◌֚b; a◌᷺◌𐻾◌̖◌֚b; a◌᷺◌𐻾◌̖◌֚b; ) LATIN SMALL LETTER A, ARABIC SMALL LOW WORD QASR, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, COMBINING DOT BELOW LEFT, LATIN SMALL LETTER B +0061 059A 0316 1DFA 10EFF 0062;0061 1DFA 0316 10EFF 059A 0062;0061 1DFA 0316 10EFF 059A 0062;0061 1DFA 0316 10EFF 059A 0062;0061 1DFA 0316 10EFF 059A 0062; # (a◌֚◌̖◌᷺◌𐻿b; a◌᷺◌̖◌𐻿◌֚b; a◌᷺◌̖◌𐻿◌֚b; a◌᷺◌̖◌𐻿◌֚b; a◌᷺◌̖◌𐻿◌֚b; ) LATIN SMALL LETTER A, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, COMBINING DOT BELOW LEFT, ARABIC SMALL LOW WORD MADDA, LATIN SMALL LETTER B +0061 10EFF 059A 0316 1DFA 0062;0061 1DFA 10EFF 0316 059A 0062;0061 1DFA 10EFF 0316 059A 0062;0061 1DFA 10EFF 0316 059A 0062;0061 1DFA 10EFF 0316 059A 0062; # (a◌𐻿◌֚◌̖◌᷺b; a◌᷺◌𐻿◌̖◌֚b; a◌᷺◌𐻿◌̖◌֚b; a◌᷺◌𐻿◌̖◌֚b; a◌᷺◌𐻿◌̖◌֚b; ) LATIN SMALL LETTER A, ARABIC SMALL LOW WORD MADDA, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, COMBINING DOT BELOW LEFT, LATIN SMALL LETTER B 0061 059A 0316 1DFA 10F46 0062;0061 1DFA 0316 10F46 059A 0062;0061 1DFA 0316 10F46 059A 0062;0061 1DFA 0316 10F46 059A 0062;0061 1DFA 0316 10F46 059A 0062; # (a◌֚◌̖◌᷺◌𐽆b; a◌᷺◌̖◌𐽆◌֚b; a◌᷺◌̖◌𐽆◌֚b; a◌᷺◌̖◌𐽆◌֚b; a◌᷺◌̖◌𐽆◌֚b; ) LATIN SMALL LETTER A, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, COMBINING DOT BELOW LEFT, SOGDIAN COMBINING DOT BELOW, LATIN SMALL LETTER B 0061 10F46 059A 0316 1DFA 0062;0061 1DFA 10F46 0316 059A 0062;0061 1DFA 10F46 0316 059A 0062;0061 1DFA 10F46 0316 059A 0062;0061 1DFA 10F46 0316 059A 0062; # (a◌𐽆◌֚◌̖◌᷺b; a◌᷺◌𐽆◌̖◌֚b; a◌᷺◌𐽆◌̖◌֚b; a◌᷺◌𐽆◌̖◌֚b; a◌᷺◌𐽆◌̖◌֚b; ) LATIN SMALL LETTER A, SOGDIAN COMBINING DOT BELOW, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, COMBINING DOT BELOW LEFT, LATIN SMALL LETTER B 0061 059A 0316 1DFA 10F47 0062;0061 1DFA 0316 10F47 059A 0062;0061 1DFA 0316 10F47 059A 0062;0061 1DFA 0316 10F47 059A 0062;0061 1DFA 0316 10F47 059A 0062; # (a◌֚◌̖◌᷺◌𐽇b; a◌᷺◌̖◌𐽇◌֚b; a◌᷺◌̖◌𐽇◌֚b; a◌᷺◌̖◌𐽇◌֚b; a◌᷺◌̖◌𐽇◌֚b; ) LATIN SMALL LETTER A, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, COMBINING DOT BELOW LEFT, SOGDIAN COMBINING TWO DOTS BELOW, LATIN SMALL LETTER B @@ -18640,6 +18708,10 @@ FFEE;FFEE;FFEE;25CB;25CB; # (○; ○; ○; ○; ○; ) HALFWIDTH WHITE CIRCLE 0061 11D45 05B0 094D 3099 0062;0061 3099 11D45 094D 05B0 0062;0061 3099 11D45 094D 05B0 0062;0061 3099 11D45 094D 05B0 0062;0061 3099 11D45 094D 05B0 0062; # (a◌𑵅◌ְ◌्◌゙b; a◌゙◌𑵅◌्◌ְb; a◌゙◌𑵅◌्◌ְb; a◌゙◌𑵅◌्◌ְb; a◌゙◌𑵅◌्◌ְb; ) LATIN SMALL LETTER A, MASARAM GONDI VIRAMA, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B 0061 05B0 094D 3099 11D97 0062;0061 3099 094D 11D97 05B0 0062;0061 3099 094D 11D97 05B0 0062;0061 3099 094D 11D97 05B0 0062;0061 3099 094D 11D97 05B0 0062; # (a◌ְ◌्◌゙◌𑶗b; a◌゙◌्◌𑶗◌ְb; a◌゙◌्◌𑶗◌ְb; a◌゙◌्◌𑶗◌ְb; a◌゙◌्◌𑶗◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, GUNJALA GONDI VIRAMA, LATIN SMALL LETTER B 0061 11D97 05B0 094D 3099 0062;0061 3099 11D97 094D 05B0 0062;0061 3099 11D97 094D 05B0 0062;0061 3099 11D97 094D 05B0 0062;0061 3099 11D97 094D 05B0 0062; # (a◌𑶗◌ְ◌्◌゙b; a◌゙◌𑶗◌्◌ְb; a◌゙◌𑶗◌्◌ְb; a◌゙◌𑶗◌्◌ְb; a◌゙◌𑶗◌्◌ְb; ) LATIN SMALL LETTER A, GUNJALA GONDI VIRAMA, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B +0061 05B0 094D 3099 11F41 0062;0061 3099 094D 11F41 05B0 0062;0061 3099 094D 11F41 05B0 0062;0061 3099 094D 11F41 05B0 0062;0061 3099 094D 11F41 05B0 0062; # (a◌ְ◌्◌゙𑽁b; a◌゙◌्𑽁◌ְb; a◌゙◌्𑽁◌ְb; a◌゙◌्𑽁◌ְb; a◌゙◌्𑽁◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, KAWI SIGN KILLER, LATIN SMALL LETTER B +0061 11F41 05B0 094D 3099 0062;0061 3099 11F41 094D 05B0 0062;0061 3099 11F41 094D 05B0 0062;0061 3099 11F41 094D 05B0 0062;0061 3099 11F41 094D 05B0 0062; # (a𑽁◌ְ◌्◌゙b; a◌゙𑽁◌्◌ְb; a◌゙𑽁◌्◌ְb; a◌゙𑽁◌्◌ְb; a◌゙𑽁◌्◌ְb; ) LATIN SMALL LETTER A, KAWI SIGN KILLER, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B +0061 05B0 094D 3099 11F42 0062;0061 3099 094D 11F42 05B0 0062;0061 3099 094D 11F42 05B0 0062;0061 3099 094D 11F42 05B0 0062;0061 3099 094D 11F42 05B0 0062; # (a◌ְ◌्◌゙◌𑽂b; a◌゙◌्◌𑽂◌ְb; a◌゙◌्◌𑽂◌ְb; a◌゙◌्◌𑽂◌ְb; a◌゙◌्◌𑽂◌ְb; ) LATIN SMALL LETTER A, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, KAWI CONJOINER, LATIN SMALL LETTER B +0061 11F42 05B0 094D 3099 0062;0061 3099 11F42 094D 05B0 0062;0061 3099 11F42 094D 05B0 0062;0061 3099 11F42 094D 05B0 0062;0061 3099 11F42 094D 05B0 0062; # (a◌𑽂◌ְ◌्◌゙b; a◌゙◌𑽂◌्◌ְb; a◌゙◌𑽂◌्◌ְb; a◌゙◌𑽂◌्◌ְb; a◌゙◌𑽂◌्◌ְb; ) LATIN SMALL LETTER A, KAWI CONJOINER, HEBREW POINT SHEVA, DEVANAGARI SIGN VIRAMA, COMBINING KATAKANA-HIRAGANA VOICED SOUND MARK, LATIN SMALL LETTER B 0061 16FF0 0334 16AF0 0062;0061 0334 16AF0 16FF0 0062;0061 0334 16AF0 16FF0 0062;0061 0334 16AF0 16FF0 0062;0061 0334 16AF0 16FF0 0062; # (a𖿰◌̴◌𖫰b; a◌̴◌𖫰𖿰b; a◌̴◌𖫰𖿰b; a◌̴◌𖫰𖿰b; a◌̴◌𖫰𖿰b; ) LATIN SMALL LETTER A, VIETNAMESE ALTERNATE READING MARK CA, COMBINING TILDE OVERLAY, BASSA VAH COMBINING HIGH TONE, LATIN SMALL LETTER B 0061 16AF0 16FF0 0334 0062;0061 16AF0 0334 16FF0 0062;0061 16AF0 0334 16FF0 0062;0061 16AF0 0334 16FF0 0062;0061 16AF0 0334 16FF0 0062; # (a◌𖫰𖿰◌̴b; a◌𖫰◌̴𖿰b; a◌𖫰◌̴𖿰b; a◌𖫰◌̴𖿰b; a◌𖫰◌̴𖿰b; ) LATIN SMALL LETTER A, BASSA VAH COMBINING HIGH TONE, VIETNAMESE ALTERNATE READING MARK CA, COMBINING TILDE OVERLAY, LATIN SMALL LETTER B 0061 16FF0 0334 16AF1 0062;0061 0334 16AF1 16FF0 0062;0061 0334 16AF1 16FF0 0062;0061 0334 16AF1 16FF0 0062;0061 0334 16AF1 16FF0 0062; # (a𖿰◌̴◌𖫱b; a◌̴◌𖫱𖿰b; a◌̴◌𖫱𖿰b; a◌̴◌𖫱𖿰b; a◌̴◌𖫱𖿰b; ) LATIN SMALL LETTER A, VIETNAMESE ALTERNATE READING MARK CA, COMBINING TILDE OVERLAY, BASSA VAH COMBINING LOW TONE, LATIN SMALL LETTER B @@ -18812,6 +18884,8 @@ FFEE;FFEE;FFEE;25CB;25CB; # (○; ○; ○; ○; ○; ) HALFWIDTH WHITE CIRCLE 0061 1E029 0315 0300 05AE 0062;0061 05AE 1E029 0300 0315 0062;0061 05AE 1E029 0300 0315 0062;0061 05AE 1E029 0300 0315 0062;0061 05AE 1E029 0300 0315 0062; # (a◌𞀩◌̕◌̀◌֮b; a◌֮◌𞀩◌̀◌̕b; a◌֮◌𞀩◌̀◌̕b; a◌֮◌𞀩◌̀◌̕b; a◌֮◌𞀩◌̀◌̕b; ) LATIN SMALL LETTER A, COMBINING GLAGOLITIC LETTER IOTATED BIG YUS, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B 0061 0315 0300 05AE 1E02A 0062;00E0 05AE 1E02A 0315 0062;0061 05AE 0300 1E02A 0315 0062;00E0 05AE 1E02A 0315 0062;0061 05AE 0300 1E02A 0315 0062; # (a◌̕◌̀◌֮◌𞀪b; à◌֮◌𞀪◌̕b; a◌֮◌̀◌𞀪◌̕b; à◌֮◌𞀪◌̕b; a◌֮◌̀◌𞀪◌̕b; ) LATIN SMALL LETTER A, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, COMBINING GLAGOLITIC LETTER FITA, LATIN SMALL LETTER B 0061 1E02A 0315 0300 05AE 0062;0061 05AE 1E02A 0300 0315 0062;0061 05AE 1E02A 0300 0315 0062;0061 05AE 1E02A 0300 0315 0062;0061 05AE 1E02A 0300 0315 0062; # (a◌𞀪◌̕◌̀◌֮b; a◌֮◌𞀪◌̀◌̕b; a◌֮◌𞀪◌̀◌̕b; a◌֮◌𞀪◌̀◌̕b; a◌֮◌𞀪◌̀◌̕b; ) LATIN SMALL LETTER A, COMBINING GLAGOLITIC LETTER FITA, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B +0061 0315 0300 05AE 1E08F 0062;00E0 05AE 1E08F 0315 0062;0061 05AE 0300 1E08F 0315 0062;00E0 05AE 1E08F 0315 0062;0061 05AE 0300 1E08F 0315 0062; # (a◌̕◌̀◌֮◌𞂏b; à◌֮◌𞂏◌̕b; a◌֮◌̀◌𞂏◌̕b; à◌֮◌𞂏◌̕b; a◌֮◌̀◌𞂏◌̕b; ) LATIN SMALL LETTER A, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I, LATIN SMALL LETTER B +0061 1E08F 0315 0300 05AE 0062;0061 05AE 1E08F 0300 0315 0062;0061 05AE 1E08F 0300 0315 0062;0061 05AE 1E08F 0300 0315 0062;0061 05AE 1E08F 0300 0315 0062; # (a◌𞂏◌̕◌̀◌֮b; a◌֮◌𞂏◌̀◌̕b; a◌֮◌𞂏◌̀◌̕b; a◌֮◌𞂏◌̀◌̕b; a◌֮◌𞂏◌̀◌̕b; ) LATIN SMALL LETTER A, COMBINING CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B 0061 0315 0300 05AE 1E130 0062;00E0 05AE 1E130 0315 0062;0061 05AE 0300 1E130 0315 0062;00E0 05AE 1E130 0315 0062;0061 05AE 0300 1E130 0315 0062; # (a◌̕◌̀◌֮◌𞄰b; à◌֮◌𞄰◌̕b; a◌֮◌̀◌𞄰◌̕b; à◌֮◌𞄰◌̕b; a◌֮◌̀◌𞄰◌̕b; ) LATIN SMALL LETTER A, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, NYIAKENG PUACHUE HMONG TONE-B, LATIN SMALL LETTER B 0061 1E130 0315 0300 05AE 0062;0061 05AE 1E130 0300 0315 0062;0061 05AE 1E130 0300 0315 0062;0061 05AE 1E130 0300 0315 0062;0061 05AE 1E130 0300 0315 0062; # (a◌𞄰◌̕◌̀◌֮b; a◌֮◌𞄰◌̀◌̕b; a◌֮◌𞄰◌̀◌̕b; a◌֮◌𞄰◌̀◌̕b; a◌֮◌𞄰◌̀◌̕b; ) LATIN SMALL LETTER A, NYIAKENG PUACHUE HMONG TONE-B, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B 0061 0315 0300 05AE 1E131 0062;00E0 05AE 1E131 0315 0062;0061 05AE 0300 1E131 0315 0062;00E0 05AE 1E131 0315 0062;0061 05AE 0300 1E131 0315 0062; # (a◌̕◌̀◌֮◌𞄱b; à◌֮◌𞄱◌̕b; a◌֮◌̀◌𞄱◌̕b; à◌֮◌𞄱◌̕b; a◌֮◌̀◌𞄱◌̕b; ) LATIN SMALL LETTER A, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, NYIAKENG PUACHUE HMONG TONE-M, LATIN SMALL LETTER B @@ -18836,6 +18910,14 @@ FFEE;FFEE;FFEE;25CB;25CB; # (○; ○; ○; ○; ○; ) HALFWIDTH WHITE CIRCLE 0061 1E2EE 0315 0300 05AE 0062;0061 05AE 1E2EE 0300 0315 0062;0061 05AE 1E2EE 0300 0315 0062;0061 05AE 1E2EE 0300 0315 0062;0061 05AE 1E2EE 0300 0315 0062; # (a◌𞋮◌̕◌̀◌֮b; a◌֮◌𞋮◌̀◌̕b; a◌֮◌𞋮◌̀◌̕b; a◌֮◌𞋮◌̀◌̕b; a◌֮◌𞋮◌̀◌̕b; ) LATIN SMALL LETTER A, WANCHO TONE KOI, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B 0061 0315 0300 05AE 1E2EF 0062;00E0 05AE 1E2EF 0315 0062;0061 05AE 0300 1E2EF 0315 0062;00E0 05AE 1E2EF 0315 0062;0061 05AE 0300 1E2EF 0315 0062; # (a◌̕◌̀◌֮◌𞋯b; à◌֮◌𞋯◌̕b; a◌֮◌̀◌𞋯◌̕b; à◌֮◌𞋯◌̕b; a◌֮◌̀◌𞋯◌̕b; ) LATIN SMALL LETTER A, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, WANCHO TONE KOINI, LATIN SMALL LETTER B 0061 1E2EF 0315 0300 05AE 0062;0061 05AE 1E2EF 0300 0315 0062;0061 05AE 1E2EF 0300 0315 0062;0061 05AE 1E2EF 0300 0315 0062;0061 05AE 1E2EF 0300 0315 0062; # (a◌𞋯◌̕◌̀◌֮b; a◌֮◌𞋯◌̀◌̕b; a◌֮◌𞋯◌̀◌̕b; a◌֮◌𞋯◌̀◌̕b; a◌֮◌𞋯◌̀◌̕b; ) LATIN SMALL LETTER A, WANCHO TONE KOINI, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B +0061 035C 0315 0300 1E4EC 0062;00E0 0315 1E4EC 035C 0062;0061 0300 0315 1E4EC 035C 0062;00E0 0315 1E4EC 035C 0062;0061 0300 0315 1E4EC 035C 0062; # (a◌͜◌̕◌̀◌𞓬b; à◌̕◌𞓬◌͜b; a◌̀◌̕◌𞓬◌͜b; à◌̕◌𞓬◌͜b; a◌̀◌̕◌𞓬◌͜b; ) LATIN SMALL LETTER A, COMBINING DOUBLE BREVE BELOW, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, NAG MUNDARI SIGN MUHOR, LATIN SMALL LETTER B +0061 1E4EC 035C 0315 0300 0062;00E0 1E4EC 0315 035C 0062;0061 0300 1E4EC 0315 035C 0062;00E0 1E4EC 0315 035C 0062;0061 0300 1E4EC 0315 035C 0062; # (a◌𞓬◌͜◌̕◌̀b; à◌𞓬◌̕◌͜b; a◌̀◌𞓬◌̕◌͜b; à◌𞓬◌̕◌͜b; a◌̀◌𞓬◌̕◌͜b; ) LATIN SMALL LETTER A, NAG MUNDARI SIGN MUHOR, COMBINING DOUBLE BREVE BELOW, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, LATIN SMALL LETTER B +0061 035C 0315 0300 1E4ED 0062;00E0 0315 1E4ED 035C 0062;0061 0300 0315 1E4ED 035C 0062;00E0 0315 1E4ED 035C 0062;0061 0300 0315 1E4ED 035C 0062; # (a◌͜◌̕◌̀◌𞓭b; à◌̕◌𞓭◌͜b; a◌̀◌̕◌𞓭◌͜b; à◌̕◌𞓭◌͜b; a◌̀◌̕◌𞓭◌͜b; ) LATIN SMALL LETTER A, COMBINING DOUBLE BREVE BELOW, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, NAG MUNDARI SIGN TOYOR, LATIN SMALL LETTER B +0061 1E4ED 035C 0315 0300 0062;00E0 1E4ED 0315 035C 0062;0061 0300 1E4ED 0315 035C 0062;00E0 1E4ED 0315 035C 0062;0061 0300 1E4ED 0315 035C 0062; # (a◌𞓭◌͜◌̕◌̀b; à◌𞓭◌̕◌͜b; a◌̀◌𞓭◌̕◌͜b; à◌𞓭◌̕◌͜b; a◌̀◌𞓭◌̕◌͜b; ) LATIN SMALL LETTER A, NAG MUNDARI SIGN TOYOR, COMBINING DOUBLE BREVE BELOW, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, LATIN SMALL LETTER B +0061 059A 0316 1DFA 1E4EE 0062;0061 1DFA 0316 1E4EE 059A 0062;0061 1DFA 0316 1E4EE 059A 0062;0061 1DFA 0316 1E4EE 059A 0062;0061 1DFA 0316 1E4EE 059A 0062; # (a◌֚◌̖◌᷺◌𞓮b; a◌᷺◌̖◌𞓮◌֚b; a◌᷺◌̖◌𞓮◌֚b; a◌᷺◌̖◌𞓮◌֚b; a◌᷺◌̖◌𞓮◌֚b; ) LATIN SMALL LETTER A, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, COMBINING DOT BELOW LEFT, NAG MUNDARI SIGN IKIR, LATIN SMALL LETTER B +0061 1E4EE 059A 0316 1DFA 0062;0061 1DFA 1E4EE 0316 059A 0062;0061 1DFA 1E4EE 0316 059A 0062;0061 1DFA 1E4EE 0316 059A 0062;0061 1DFA 1E4EE 0316 059A 0062; # (a◌𞓮◌֚◌̖◌᷺b; a◌᷺◌𞓮◌̖◌֚b; a◌᷺◌𞓮◌̖◌֚b; a◌᷺◌𞓮◌̖◌֚b; a◌᷺◌𞓮◌̖◌֚b; ) LATIN SMALL LETTER A, NAG MUNDARI SIGN IKIR, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, COMBINING DOT BELOW LEFT, LATIN SMALL LETTER B +0061 0315 0300 05AE 1E4EF 0062;00E0 05AE 1E4EF 0315 0062;0061 05AE 0300 1E4EF 0315 0062;00E0 05AE 1E4EF 0315 0062;0061 05AE 0300 1E4EF 0315 0062; # (a◌̕◌̀◌֮◌𞓯b; à◌֮◌𞓯◌̕b; a◌֮◌̀◌𞓯◌̕b; à◌֮◌𞓯◌̕b; a◌֮◌̀◌𞓯◌̕b; ) LATIN SMALL LETTER A, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, NAG MUNDARI SIGN SUTUH, LATIN SMALL LETTER B +0061 1E4EF 0315 0300 05AE 0062;0061 05AE 1E4EF 0300 0315 0062;0061 05AE 1E4EF 0300 0315 0062;0061 05AE 1E4EF 0300 0315 0062;0061 05AE 1E4EF 0300 0315 0062; # (a◌𞓯◌̕◌̀◌֮b; a◌֮◌𞓯◌̀◌̕b; a◌֮◌𞓯◌̀◌̕b; a◌֮◌𞓯◌̀◌̕b; a◌֮◌𞓯◌̀◌̕b; ) LATIN SMALL LETTER A, NAG MUNDARI SIGN SUTUH, COMBINING COMMA ABOVE RIGHT, COMBINING GRAVE ACCENT, HEBREW ACCENT ZINOR, LATIN SMALL LETTER B 0061 059A 0316 1DFA 1E8D0 0062;0061 1DFA 0316 1E8D0 059A 0062;0061 1DFA 0316 1E8D0 059A 0062;0061 1DFA 0316 1E8D0 059A 0062;0061 1DFA 0316 1E8D0 059A 0062; # (a◌֚◌̖◌᷺◌𞣐b; a◌᷺◌̖◌𞣐◌֚b; a◌᷺◌̖◌𞣐◌֚b; a◌᷺◌̖◌𞣐◌֚b; a◌᷺◌̖◌𞣐◌֚b; ) LATIN SMALL LETTER A, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, COMBINING DOT BELOW LEFT, MENDE KIKAKUI COMBINING NUMBER TEENS, LATIN SMALL LETTER B 0061 1E8D0 059A 0316 1DFA 0062;0061 1DFA 1E8D0 0316 059A 0062;0061 1DFA 1E8D0 0316 059A 0062;0061 1DFA 1E8D0 0316 059A 0062;0061 1DFA 1E8D0 0316 059A 0062; # (a◌𞣐◌֚◌̖◌᷺b; a◌᷺◌𞣐◌̖◌֚b; a◌᷺◌𞣐◌̖◌֚b; a◌᷺◌𞣐◌̖◌֚b; a◌᷺◌𞣐◌̖◌֚b; ) LATIN SMALL LETTER A, MENDE KIKAKUI COMBINING NUMBER TEENS, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, COMBINING DOT BELOW LEFT, LATIN SMALL LETTER B 0061 059A 0316 1DFA 1E8D1 0062;0061 1DFA 0316 1E8D1 059A 0062;0061 1DFA 0316 1E8D1 059A 0062;0061 1DFA 0316 1E8D1 059A 0062;0061 1DFA 0316 1E8D1 059A 0062; # (a◌֚◌̖◌᷺◌𞣑b; a◌᷺◌̖◌𞣑◌֚b; a◌᷺◌̖◌𞣑◌֚b; a◌᷺◌̖◌𞣑◌֚b; a◌᷺◌̖◌𞣑◌֚b; ) LATIN SMALL LETTER A, HEBREW ACCENT YETIV, COMBINING GRAVE ACCENT BELOW, COMBINING DOT BELOW LEFT, MENDE KIKAKUI COMBINING NUMBER TENS, LATIN SMALL LETTER B diff --git a/admin/unidata/PropertyValueAliases.txt b/admin/unidata/PropertyValueAliases.txt index bdc13857dcb..9346fcf03ee 100644 --- a/admin/unidata/PropertyValueAliases.txt +++ b/admin/unidata/PropertyValueAliases.txt @@ -1,11 +1,11 @@ -# PropertyValueAliases-14.0.0.txt -# Date: 2021-05-10, 21:08:53 GMT -# © 2021 Unicode®, Inc. +# PropertyValueAliases-15.0.0.txt +# Date: 2022-08-05, 23:42:17 GMT +# © 2022 Unicode®, Inc. # Unicode and the Unicode Logo are registered trademarks of Unicode, Inc. in the U.S. and other countries. -# For terms of use, see http://www.unicode.org/terms_of_use.html +# For terms of use, see https://www.unicode.org/terms_of_use.html # # Unicode Character Database -# For documentation, see http://www.unicode.org/reports/tr44/ +# For documentation, see https://www.unicode.org/reports/tr44/ # # This file contains aliases for property values used in the UCD. # These names can be used for XML formats of UCD data, for regular-expression @@ -90,6 +90,7 @@ age; 12.0 ; V12_0 age; 12.1 ; V12_1 age; 13.0 ; V13_0 age; 14.0 ; V14_0 +age; 15.0 ; V15_0 age; NA ; Unassigned # Alphabetic (Alpha) @@ -135,7 +136,6 @@ Bidi_M; Y ; Yes ; T # Bidi_Mirroring_Glyph (bmg) -# @missing: 0000..10FFFF; Bidi_Mirroring_Glyph; # Bidi_Paired_Bracket (bpb) @@ -162,6 +162,7 @@ blk; Ancient_Symbols ; Ancient_Symbols blk; Arabic ; Arabic blk; Arabic_Ext_A ; Arabic_Extended_A blk; Arabic_Ext_B ; Arabic_Extended_B +blk; Arabic_Ext_C ; Arabic_Extended_C blk; Arabic_Math ; Arabic_Mathematical_Alphabetic_Symbols blk; Arabic_PF_A ; Arabic_Presentation_Forms_A ; Arabic_Presentation_Forms-A blk; Arabic_PF_B ; Arabic_Presentation_Forms_B @@ -206,6 +207,7 @@ blk; CJK_Ext_D ; CJK_Unified_Ideographs_Extension_D blk; CJK_Ext_E ; CJK_Unified_Ideographs_Extension_E blk; CJK_Ext_F ; CJK_Unified_Ideographs_Extension_F blk; CJK_Ext_G ; CJK_Unified_Ideographs_Extension_G +blk; CJK_Ext_H ; CJK_Unified_Ideographs_Extension_H blk; CJK_Radicals_Sup ; CJK_Radicals_Supplement blk; CJK_Strokes ; CJK_Strokes blk; CJK_Symbols ; CJK_Symbols_And_Punctuation @@ -223,10 +225,12 @@ blk; Cyrillic ; Cyrillic blk; Cyrillic_Ext_A ; Cyrillic_Extended_A blk; Cyrillic_Ext_B ; Cyrillic_Extended_B blk; Cyrillic_Ext_C ; Cyrillic_Extended_C +blk; Cyrillic_Ext_D ; Cyrillic_Extended_D blk; Cyrillic_Sup ; Cyrillic_Supplement ; Cyrillic_Supplementary blk; Deseret ; Deseret blk; Devanagari ; Devanagari blk; Devanagari_Ext ; Devanagari_Extended +blk; Devanagari_Ext_A ; Devanagari_Extended_A blk; Diacriticals ; Combining_Diacritical_Marks blk; Diacriticals_Ext ; Combining_Diacritical_Marks_Extended blk; Diacriticals_For_Symbols ; Combining_Diacritical_Marks_For_Symbols; Combining_Marks_For_Symbols @@ -288,6 +292,7 @@ blk; Jamo_Ext_A ; Hangul_Jamo_Extended_A blk; Jamo_Ext_B ; Hangul_Jamo_Extended_B blk; Javanese ; Javanese blk; Kaithi ; Kaithi +blk; Kaktovik_Numerals ; Kaktovik_Numerals blk; Kana_Ext_A ; Kana_Extended_A blk; Kana_Ext_B ; Kana_Extended_B blk; Kana_Sup ; Kana_Supplement @@ -296,6 +301,7 @@ blk; Kangxi ; Kangxi_Radicals blk; Kannada ; Kannada blk; Katakana ; Katakana blk; Katakana_Ext ; Katakana_Phonetic_Extensions +blk; Kawi ; Kawi blk; Kayah_Li ; Kayah_Li blk; Kharoshthi ; Kharoshthi blk; Khitan_Small_Script ; Khitan_Small_Script @@ -360,6 +366,7 @@ blk; Myanmar ; Myanmar blk; Myanmar_Ext_A ; Myanmar_Extended_A blk; Myanmar_Ext_B ; Myanmar_Extended_B blk; Nabataean ; Nabataean +blk; Nag_Mundari ; Nag_Mundari blk; Nandinagari ; Nandinagari blk; NB ; No_Block blk; New_Tai_Lue ; New_Tai_Lue @@ -663,7 +670,6 @@ EPres; Y ; Yes ; T # Equivalent_Unified_Ideograph (EqUIdeo) -# @missing: 0000..10FFFF; Equivalent_Unified_Ideograph; # Expands_On_NFC (XO_NFC) @@ -1143,7 +1149,6 @@ NFD_QC; Y ; Yes # NFKC_Casefold (NFKC_CF) -# @missing: 0000..10FFFF; NFKC_Casefold; # NFKC_Quick_Check (NFKC_QC) @@ -1313,6 +1318,7 @@ sc ; Ital ; Old_Italic sc ; Java ; Javanese sc ; Kali ; Kayah_Li sc ; Kana ; Katakana +sc ; Kawi ; Kawi sc ; Khar ; Kharoshthi sc ; Khmr ; Khmer sc ; Khoj ; Khojki @@ -1345,6 +1351,7 @@ sc ; Mroo ; Mro sc ; Mtei ; Meetei_Mayek sc ; Mult ; Multani sc ; Mymr ; Myanmar +sc ; Nagm ; Nag_Mundari sc ; Nand ; Nandinagari sc ; Narb ; Old_North_Arabian sc ; Nbat ; Nabataean @@ -1418,7 +1425,6 @@ sc ; Zzzz ; Unknown # Script_Extensions (scx) -# @missing: 0000..10FFFF; Script_Extensions;