From 048a2dabfc4aab33d9097bce2971839e051f9d0d Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sun, 12 Feb 2023 07:47:09 +0100 Subject: [PATCH 01/29] ; Fix typo --- doc/lispref/internals.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index e1a4613875c..6a8aaf8ebaf 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi @@ -2550,7 +2550,7 @@ variable names have underscores replaced with dashes. For instance, @code{mode_line_format} stores the value of @code{mode-line-format}. @item overlays -The inveral tree containing this buffer's overlays. +The interval tree containing this buffer's overlays. @item last_selected_window This is the last window that was selected with this buffer in it, or @code{nil} From 7287b7b53a17f9b2d1b474466106806a9d57af47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulrich=20M=C3=BCller?= Date: Thu, 9 Feb 2023 10:58:48 +0100 Subject: [PATCH 02/29] Support webkit2gtk-4.1 * configure.ac: Check for webkit2gtk API version 4.1 first, then fall back to 4.0. --- configure.ac | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 645082c9746..bc7e61048c3 100644 --- a/configure.ac +++ b/configure.ac @@ -3613,8 +3613,12 @@ XWIDGETS_OBJ= if test "$with_xwidgets" != "no"; then if test "$USE_GTK_TOOLKIT" = "GTK3" && test "$window_system" != "none"; then WEBKIT_REQUIRED=2.12 - WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED" + WEBKIT_MODULES="webkit2gtk-4.1 >= $WEBKIT_REQUIRED" EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES]) + if test "$HAVE_WEBKIT" = "no"; then + WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED" + EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES]) + fi HAVE_XWIDGETS=$HAVE_WEBKIT XWIDGETS_OBJ="xwidget.o" if test "$HAVE_X_WINDOWS" = "yes" && test "${with_cairo}" = "no"; then From 86ca7df6a345f743f381c67bb0d14879b2858f13 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 12 Feb 2023 14:05:44 +0200 Subject: [PATCH 03/29] ; Mention Hunspell private-dictionary misfeature in doc strings * lisp/textmodes/ispell.el (ispell-personal-dictionary) (ispell-local-pdict): Mention Hunspell misfeatures in doc strings. (Bug#61190) --- lisp/textmodes/ispell.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 3da6effbcfe..bb2bcfd8052 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el @@ -318,7 +318,9 @@ window system by evaluating the following on startup to set this variable: ;;;###autoload (defcustom ispell-personal-dictionary nil "File name of your personal spelling dictionary, or nil. -If nil, the default personal dictionary for your spelling checker is used." +If nil, the default personal dictionary for your spelling checker is used. +Due to a misfeature of Hunspell, if the value is an absolute file name, the +file by that name must already exist for Hunspell to be able to use it." :type '(choice file (const :tag "default" nil))) @@ -1730,7 +1732,10 @@ If you specify a personal dictionary for the current buffer which is different from the current personal dictionary, the effect is similar to calling \\[ispell-change-dictionary]. This variable is automatically set when defined in the file with either `ispell-pdict-keyword' or the -local variable syntax.") +local variable syntax. + +Due to a misfeature of Hunspell, if the value is an absolute file name, the +file by that name must already exist for Hunspell to be able to use it.") ;;;###autoload(put 'ispell-local-pdict 'safe-local-variable 'stringp) From 3d17aee13d9fa02f6b4cc03be7f323a48d480f09 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sun, 12 Feb 2023 13:10:04 +0100 Subject: [PATCH 04/29] ; Fix installation of dependencies for VC packages * lisp/emacs-lisp/package-vc.el (package-vc-install-dependencies): Maintain a list of package-desc objects instead of package names to install. --- lisp/emacs-lisp/package-vc.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 33bd0bfd5cd..1bc5c883161 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -426,8 +426,8 @@ version of that package." ((let* ((pac package-archive-contents) (desc (cadr (assoc (car pkg) pac)))) (if desc - (let ((reqs (package-desc-reqs pkg))) - (push pkg to-install) + (let ((reqs (package-desc-reqs desc))) + (push desc to-install) (mapc #'search reqs)) (push pkg missing)))))) (version-order (a b) From 8bc1b7d0b27176e1d9039aec40d6e6f4d50f34b7 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 12 Feb 2023 14:20:48 +0200 Subject: [PATCH 05/29] Avoid warning about 'load-path' in non-interactive sessions * lisp/startup.el (command-line): Emit the warning about 'user-emacs-directory' in 'load-path' only in interactive sessions. (Bug#61014) --- lisp/startup.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/startup.el b/lisp/startup.el index bb6250d3968..e5ec15eebea 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1596,7 +1596,8 @@ please check its value") ;; or EMACSLOADPATH, so we basically always have to check. (let (warned) (dolist (dir load-path) - (and (not warned) + (and (not noninteractive) + (not warned) (stringp dir) (string-equal (file-name-as-directory (expand-file-name dir)) (expand-file-name user-emacs-directory)) From d4fc70129786f0c90f76e1868203d63a59f3f92d Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sun, 12 Feb 2023 13:25:54 +0100 Subject: [PATCH 06/29] Tolerate missing elpa-packages.eld files * lisp/emacs-lisp/package-vc.el (package-vc--download-and-read-archives): Replace 'condition-case-unless-debug' with a regular 'condition-case'. It appears a few people using third-party archives that don't serve package specifications have been having issues with package-vc, when toggle-on-error is enabled. In their case, package-vc would raise an error in its first invocation, but it would go on working normally afterwards. As this behaviour is confusing and the user can't do much about a missing elpa-packages.eld to begin with, we satisfy ourselves with printing out a message and continuing on. --- lisp/emacs-lisp/package-vc.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 1bc5c883161..a3d5200f0f8 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -269,9 +269,9 @@ Populate `package-vc--archive-spec-alist' with the result. If optional argument ASYNC is non-nil, perform the downloads asynchronously." (dolist (archive package-archives) - (condition-case-unless-debug nil + (condition-case err (package--download-one-archive archive "elpa-packages.eld" async) - (error (message "Failed to download `%s' archive." (car archive)))))) + (error (message "Failed to download `%s' archive: %S" (car archive) err))))) (add-hook 'package-read-archive-hook #'package-vc--read-archive-data 20) From 2da05876edb5bc8ec0f39ac679c806930e16e5c7 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sun, 12 Feb 2023 14:29:26 +0100 Subject: [PATCH 07/29] ; Use the right name when specifying VC packages * lisp/emacs-lisp/package-vc.el (package-vc-install-selected-packages): Generate dummy package descriptors in here, if necessary. (package-vc--unpack): Remove dummy-descriptor generation. --- lisp/emacs-lisp/package-vc.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index a3d5200f0f8..bf49f274bfd 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el @@ -134,7 +134,10 @@ the `clone' function." (package-vc-install name spec)) ((listp spec) (package-vc--archives-initialize) - (package-vc--unpack (cadr pkg-descs) spec))))))) + (package-vc--unpack + (or (cadr (assoc name package-archive-contents)) + (package-desc-create :name name :kind 'vc)) + spec))))))) ;;;###autoload (defcustom package-vc-selected-packages '() @@ -600,8 +603,6 @@ PKG-SPEC is a package specification, a property list describing how to fetch and build the package. See `package-vc--archive-spec-alist' for details. The optional argument REV specifies a specific revision to checkout. This overrides the `:branch' attribute in PKG-SPEC." - (unless pkg-desc - (setq pkg-desc (package-desc-create :name (car pkg-spec) :kind 'vc))) (pcase-let* (((map :lisp-dir) pkg-spec) (name (package-desc-name pkg-desc)) (dirname (package-desc-full-name pkg-desc)) From eb2b0931cf1258b875b031f81a3685eda8ddf5cb Mon Sep 17 00:00:00 2001 From: Theodor Thornhill Date: Sun, 12 Feb 2023 18:57:40 +0100 Subject: [PATCH 08/29] Add lambda_expression to c-ts-common-indent-type-regexp-alist * lisp/progmodes/java-ts-mode.el (java-ts-mode): Tweak regexp. --- lisp/progmodes/java-ts-mode.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el index dc651c11a00..e15da7110f1 100644 --- a/lisp/progmodes/java-ts-mode.el +++ b/lisp/progmodes/java-ts-mode.el @@ -309,6 +309,7 @@ Return nil if there is no name or if NODE is not a defun node." "constructor_body" "annotation_type_body" "interface_body" + "lambda_expression" "enum_body" "switch_block" "record_declaration_body" From dde023b63ab82c38d33815409de5552f5bf349d1 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sun, 12 Feb 2023 19:06:50 +0000 Subject: [PATCH 09/29] * src/.gdbinit (nextcons): Amend $.u.cdr to $.u.s.u.cdr --- src/.gdbinit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/.gdbinit b/src/.gdbinit index c96c2b597bd..c97e78559f1 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -926,7 +926,7 @@ Print the contents of $ as an Emacs Lisp cons. end define nextcons - p $.u.cdr + p $.u.s.u.cdr xcons end document nextcons From e0b60120a1c3433fe332bff56b5b7483b0424d5c Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sun, 12 Feb 2023 20:22:10 +0100 Subject: [PATCH 10/29] Support Tramp multi-hop completion * lisp/net/tramp.el (tramp-completion-handle-expand-file-name) (tramp-completion-handle-file-exists-p) (tramp-completion-handle-file-name-directory): Support multi-hop completion. * test/lisp/net/tramp-tests.el (tramp-test26-interactive-file-name-completion): Fix test. --- lisp/net/tramp.el | 41 +++++++++++++++++++++--------------- test/lisp/net/tramp-tests.el | 37 ++++++++++++++++++++++---------- 2 files changed, 50 insertions(+), 28 deletions(-) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 1cda8fc4c61..115048d59db 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2961,6 +2961,8 @@ not in completion mode." (concat dir filename)) ((string-match-p (rx bos (regexp tramp-prefix-regexp) + (* (regexp tramp-remote-file-name-spec-regexp) + (regexp tramp-postfix-hop-regexp)) (? (regexp tramp-method-regexp) (regexp tramp-postfix-method-regexp) (? (regexp tramp-user-regexp) (regexp tramp-postfix-user-regexp))) eos) @@ -2984,6 +2986,8 @@ not in completion mode." (string-match (rx (regexp tramp-prefix-regexp) + (* (regexp tramp-remote-file-name-spec-regexp) + (regexp tramp-postfix-hop-regexp)) (group (regexp tramp-method-regexp)) (? (regexp tramp-postfix-method-regexp)) eos) @@ -2993,6 +2997,8 @@ not in completion mode." ((string-match (rx (regexp tramp-prefix-regexp) + (* (regexp tramp-remote-file-name-spec-regexp) + (regexp tramp-postfix-hop-regexp)) (group (regexp tramp-remote-file-name-spec-regexp)) eos) filename) @@ -3249,30 +3255,31 @@ PARTIAL-USER must match USER, PARTIAL-HOST must match HOST." ;; method. In the `separate' file name syntax, we return "/[" when ;; `filename' is "/[string" w/o a trailing method separator "/". (cond - ((and (not (string-empty-p tramp-method-regexp)) - (string-match + ((string-match + (rx (group (regexp tramp-prefix-regexp) + (* (regexp tramp-remote-file-name-spec-regexp) + (regexp tramp-postfix-hop-regexp))) + (? (regexp tramp-completion-method-regexp)) eos) + filename) + (match-string 1 filename)) + ((and (string-match (rx (group (regexp tramp-prefix-regexp) + (* (regexp tramp-remote-file-name-spec-regexp) + (regexp tramp-postfix-hop-regexp)) (group (regexp tramp-method-regexp)) (regexp tramp-postfix-method-regexp) (? (regexp tramp-user-regexp) - (regexp tramp-postfix-user-regexp)))) + (regexp tramp-postfix-user-regexp))) + (? (| (regexp tramp-host-regexp) + (: (regexp tramp-prefix-ipv6-regexp) + (? (regexp tramp-ipv6-regexp) + (? (regexp tramp-postfix-ipv6-regexp)))))) + eos) filename) ;; Is it a valid method? - (assoc (match-string 2 filename) tramp-methods)) - (match-string 1 filename)) - ((and (string-empty-p tramp-method-regexp) - (string-match - (rx (group - (regexp tramp-prefix-regexp) - (? (regexp tramp-user-regexp) - (regexp tramp-postfix-user-regexp)))) - filename)) - (match-string 1 filename)) - ((string-match - (rx (group (regexp tramp-prefix-regexp)) - (regexp tramp-completion-method-regexp) eos) - filename) + (or (tramp-string-empty-or-nil-p (match-string 2 filename)) + (assoc (match-string 2 filename) tramp-methods))) (match-string 1 filename)) (t (tramp-run-real-handler #'file-name-directory (list filename))))) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 33afe820c58..51fc07117c5 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -4638,7 +4638,6 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ;; This test is inspired by Bug#51386, Bug#52758, Bug#53513, Bug#54042 ;; and Bug#60505. -;; TODO: Add tests for user names and multi-hop file names. (ert-deftest tramp-test26-interactive-file-name-completion () "Check interactive completion with different `completion-styles'." (tramp-cleanup-connection tramp-test-vec nil 'keep-password) @@ -4649,12 +4648,15 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (let ((method (file-remote-p ert-remote-temporary-file-directory 'method)) (user (file-remote-p ert-remote-temporary-file-directory 'user)) (host (file-remote-p ert-remote-temporary-file-directory 'host)) + (hop (file-remote-p ert-remote-temporary-file-directory 'hop)) (orig-syntax tramp-syntax) (non-essential t) (inhibit-message t)) (when (and (stringp host) (string-match tramp-host-with-port-regexp host)) (setq host (match-string 1 host))) + ;; (trace-function #'tramp-completion-file-name-handler) + ;; (trace-function #'completion-file-name-table) (unwind-protect (dolist (syntax (if (tramp--test-expensive-test-p) (tramp-syntax-values) `(,orig-syntax))) @@ -4689,25 +4691,29 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (ipv6-postfix (and (string-match-p tramp-ipv6-regexp host) tramp-postfix-ipv6-format)) + ;; The hop string fits only the initial syntax. + (hop (and (eq tramp-syntax orig-syntax) hop)) test result completions) (dolist (test-and-result - ;; These are triples (TEST-STRING SINGLE-RESULT - ;; COMPLETION-RESULT). + ;; These are triples (TEST-STRING RESULT-CHECK + ;; COMPLETION-CHECK). (append ;; Complete method name. (unless (string-empty-p tramp-method-regexp) `((,(concat - tramp-prefix-format - (substring-no-properties method 0 2)) + tramp-prefix-format hop + (substring-no-properties + method 0 (min 2 (length method)))) ,(concat tramp-prefix-format method-string) ,method-string))) ;; Complete user name. (unless (tramp-string-empty-or-nil-p user) `((,(concat - tramp-prefix-format method-string - (substring-no-properties user 0 2)) + tramp-prefix-format hop method-string + (substring-no-properties + user 0 (min 2 (length user)))) ,(concat tramp-prefix-format method-string user tramp-postfix-user-format) @@ -4716,8 +4722,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ;; Complete host name. (unless (tramp-string-empty-or-nil-p host) `((,(concat - tramp-prefix-format method-string - ipv6-prefix (substring-no-properties host 0 2)) + tramp-prefix-format hop method-string + ipv6-prefix + (substring-no-properties + host 0 (min 2 (length host)))) ,(concat tramp-prefix-format method-string ipv6-prefix host @@ -4729,9 +4737,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (unless (or (tramp-string-empty-or-nil-p user) (tramp-string-empty-or-nil-p host)) `((,(concat - tramp-prefix-format method-string + tramp-prefix-format hop method-string user tramp-postfix-user-format - ipv6-prefix (substring-no-properties host 0 2)) + ipv6-prefix + (substring-no-properties + host 0 (min 2 (length host)))) ,(concat tramp-prefix-format method-string user tramp-postfix-user-format @@ -4742,12 +4752,14 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ipv6-postfix tramp-postfix-host-format)))))) (ignore-errors (kill-buffer "*Completions*")) + ;; (and (bufferp trace-buffer) (kill-buffer trace-buffer)) (discard-input) (setq test (car test-and-result) unread-command-events (mapcar #'identity (concat test "\t\t\n")) completions nil result (read-file-name "Prompt: ")) + (if (not (get-buffer "*Completions*")) (progn ;; (tramp--test-message @@ -4776,6 +4788,9 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (should (member (caddr test-and-result) completions))))))) ;; Cleanup. + ;; (tramp--test-message "%s" (tramp-get-buffer-string trace-buffer)) + ;; (untrace-function #'tramp-completion-file-name-handler) + ;; (untrace-function #'completion-file-name-table) (tramp-change-syntax orig-syntax))))) (ert-deftest tramp-test27-load () From 8280d721d7c0f6fb2e04f23128c0d2cccf2be1d5 Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sun, 12 Feb 2023 19:06:50 +0000 Subject: [PATCH 11/29] * src/.gdbinit (nextcons): Amend $.u.cdr to $.u.s.u.cdr (bug#61453). (cherry picked from commit dde023b63ab82c38d33815409de5552f5bf349d1) --- src/.gdbinit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/.gdbinit b/src/.gdbinit index c96c2b597bd..c97e78559f1 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -926,7 +926,7 @@ Print the contents of $ as an Emacs Lisp cons. end define nextcons - p $.u.cdr + p $.u.s.u.cdr xcons end document nextcons From fe2ea5ddd8da91c8a0f3064f1447fc4fbbda68ab Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Sun, 12 Feb 2023 15:43:07 -0500 Subject: [PATCH 12/29] Update to Org 9.6.1-31-gaf1bb1 --- doc/misc/org.org | 16 +++++++------- lisp/org/ob-eval.el | 2 +- lisp/org/ob-sql.el | 2 +- lisp/org/org-agenda.el | 2 +- lisp/org/org-compat.el | 12 ++++++----- lisp/org/org-element.el | 45 ++++++++++++++++++++++++++-------------- lisp/org/org-footnote.el | 2 +- lisp/org/org-version.el | 2 +- lisp/org/org.el | 12 +++++++---- 9 files changed, 58 insertions(+), 37 deletions(-) diff --git a/doc/misc/org.org b/doc/misc/org.org index 14699e77395..ad889a5c622 100644 --- a/doc/misc/org.org +++ b/doc/misc/org.org @@ -5291,7 +5291,7 @@ The following commands help to work with properties: Set a property in the current entry. Both the property and the value can be inserted using completion. -- {{{kbd(S-RIGHT)}}} (~org-property-next-allowed-values~), {{{kbd(S-LEFT)}}} (~org-property-previous-allowed-value~) :: +- {{{kbd(S-RIGHT)}}} (~org-property-next-allowed-value~), {{{kbd(S-LEFT)}}} (~org-property-previous-allowed-value~) :: #+kindex: S-RIGHT #+kindex: S-LEFT @@ -10252,9 +10252,9 @@ the other commands, point needs to be in the desired line. Unmark entry for bulk action. -- {{{kbd(U)}}} (~org-agenda-bulk-remove-all-marks~) :: +- {{{kbd(U)}}} (~org-agenda-bulk-unmark-all~) :: #+kindex: U - #+findex: org-agenda-bulk-remove-all-marks + #+findex: org-agenda-bulk-unmark-all Unmark all marked entries for bulk action. @@ -11692,9 +11692,9 @@ When the variable ~org-export-dispatch-use-expert-ui~ is set to a non-~nil~ value, Org prompts in the minibuffer. To switch back to the hierarchical menu, press {{{kbd(?)}}}. -- {{{kbd(C-c C-e)}}} (~org-export~) :: +- {{{kbd(C-c C-e)}}} (~org-export-dispatch~) :: #+kindex: C-c C-e - #+findex: org-export + #+findex: org-export-dispatch Invokes the export dispatcher interface. The options show default settings. The {{{kbd(C-u)}}} prefix argument preserves options from @@ -12232,7 +12232,7 @@ with the custom ID =theory=, you can use The following command allows navigating to the included document: -- {{{kbd(C-c ')}}} (~org-edit~special~) :: +- {{{kbd(C-c ')}}} (~org-edit-special~) :: #+kindex: C-c ' #+findex: org-edit-special @@ -14363,10 +14363,10 @@ executable. Without it, export cannot finish. :DESCRIPTION: Invoking export. :END: -- {{{kbd(C-c C-e o o)}}} (~org-export-to-odt~) :: +- {{{kbd(C-c C-e o o)}}} (~org-odt-export-to-odt~) :: #+kindex: C-c C-e o o - #+findex: org-export-to-odt + #+findex: org-odt-export-to-odt Export as OpenDocument Text file. #+cindex: @samp{EXPORT_FILE_NAME}, property diff --git a/lisp/org/ob-eval.el b/lisp/org/ob-eval.el index 6f6edb949cc..07e53077253 100644 --- a/lisp/org/ob-eval.el +++ b/lisp/org/ob-eval.el @@ -59,7 +59,7 @@ Writes QUERY into a temp-buffer that is processed with (let ((error-buffer (get-buffer-create " *Org-Babel Error*")) exit-code) (with-current-buffer error-buffer (erase-buffer)) (with-temp-buffer - (insert query) + (insert query "\n") (setq exit-code (org-babel--shell-command-on-region command error-buffer)) diff --git a/lisp/org/ob-sql.el b/lisp/org/ob-sql.el index 39a4573a54e..f73e7003f6d 100644 --- a/lisp/org/ob-sql.el +++ b/lisp/org/ob-sql.el @@ -234,7 +234,7 @@ database connections." (:database . sql-database))) (mapped-name (cdr (assq name name-mapping)))) (cadr (assq mapped-name - (cdr (assoc dbconnection sql-connection-alist)))))))) + (cdr (assoc-string dbconnection sql-connection-alist t)))))))) (defun org-babel-execute:sql (body params) "Execute a block of Sql code with Babel. diff --git a/lisp/org/org-agenda.el b/lisp/org/org-agenda.el index 63107e8e6a4..3db33c4d63e 100644 --- a/lisp/org/org-agenda.el +++ b/lisp/org/org-agenda.el @@ -8211,7 +8211,7 @@ filter." (if (and org-agenda-filtered-by-category org-agenda-category-filter) (org-agenda-filter-show-all-cat) - (let ((cat (org-no-properties (org-get-at-eol 'org-category 1)))) + (let ((cat (org-no-properties (org-agenda-get-category)))) (cond ((and cat strip) (org-agenda-filter-apply diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index 6c50852553c..d5bf2191ae7 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -196,11 +196,13 @@ removed." ;;; Emacs < 27.1 compatibility -(unless (fboundp 'combine-change-calls) - ;; A stub when `combine-change-calls' was not yet there. - (defmacro combine-change-calls (_beg _end &rest body) - (declare (debug (form form def-body)) (indent 2)) - `(progn ,@body))) +(if (version< emacs-version "29") + ;; A stub when `combine-change-calls' was not yet there or had + ;; critical bugs (see Emacs bug#60467). + (defmacro org-combine-change-calls (_beg _end &rest body) + (declare (debug (form form def-body)) (indent 2)) + `(progn ,@body)) + (defalias 'org-combine-change-calls 'combine-change-calls)) (if (version< emacs-version "27.1") (defsubst org-replace-buffer-contents (source &optional _max-secs _max-costs) diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el index 389acf82500..4f4eebfcc2d 100644 --- a/lisp/org/org-element.el +++ b/lisp/org/org-element.el @@ -7406,14 +7406,16 @@ the cache." (org-element-at-point to-pos) (cl-macrolet ((cache-root ;; Use the most optimal version of cache available. - () `(if (memq granularity '(headline headline+inlinetask)) - (org-element--headline-cache-root) - (org-element--cache-root))) + () `(org-with-base-buffer nil + (if (memq granularity '(headline headline+inlinetask)) + (org-element--headline-cache-root) + (org-element--cache-root)))) (cache-size ;; Use the most optimal version of cache available. - () `(if (memq granularity '(headline headline+inlinetask)) - org-element--headline-cache-size - org-element--cache-size)) + () `(org-with-base-buffer nil + (if (memq granularity '(headline headline+inlinetask)) + org-element--headline-cache-size + org-element--cache-size))) (cache-walk-restart ;; Restart tree traversal after AVL tree re-balance. () `(when node @@ -7443,8 +7445,9 @@ the cache." ;; Avoid extra staff like timer cancels et al ;; and only call `org-element--cache-sync-requests' when ;; there are pending requests. - (when org-element--cache-sync-requests - (org-element--cache-sync (current-buffer))) + (org-with-base-buffer nil + (when org-element--cache-sync-requests + (org-element--cache-sync (current-buffer)))) ;; Call `org-element--parse-to' directly avoiding any ;; kind of `org-element-at-point' overheads. (if restrict-elements @@ -7515,8 +7518,9 @@ the cache." tmpnext-start)) ;; Check if cache does not have gaps. (cache-gapless-p - () `(eq org-element--cache-change-tic - (alist-get granularity org-element--cache-gapless)))) + () `(org-with-base-buffer nil + (eq org-element--cache-change-tic + (alist-get granularity org-element--cache-gapless))))) ;; The core algorithm is simple walk along binary tree. However, ;; instead of checking all the tree elements from first to last ;; (like in `avl-tree-mapcar'), we begin from FROM-POS skipping @@ -7644,7 +7648,9 @@ the cache." ;; In the process, we may alter the buffer, ;; so also keep track of the cache state. (progn - (setq modified-tic org-element--cache-change-tic) + (setq modified-tic + (org-with-base-buffer nil + org-element--cache-change-tic)) (setq cache-size (cache-size)) ;; When NEXT-RE/FAIL-RE is provided, skip to ;; next regexp match after :begin of the current @@ -7678,7 +7684,7 @@ the cache." ;; ;; Call FUNC. FUNC may move point. (setq org-element-cache-map-continue-from nil) - (if org-element--cache-map-statistics + (if (org-with-base-buffer nil org-element--cache-map-statistics) (progn (setq before-time (float-time)) (push (funcall func data) result) @@ -7697,7 +7703,15 @@ the cache." (when org-element-cache-map-continue-from (goto-char org-element-cache-map-continue-from)) (when (> (point) start) - (move-start-to-next-match nil)) + (move-start-to-next-match nil) + ;; (point) inside matching element. + ;; Go further. + (when (> (point) start) + (setq data (element-match-at-point)) + (if (not data) + (cache-walk-abort) + (goto-char (next-element-start)) + (move-start-to-next-match next-element-re)))) ;; Drop nil. (unless (car result) (pop result))) ;; If FUNC did not move the point and we @@ -7710,8 +7724,9 @@ the cache." start)) (setq start nil)) ;; Check if the buffer has been modified. - (unless (and (eq modified-tic org-element--cache-change-tic) - (eq cache-size (cache-size))) + (unless (org-with-base-buffer nil + (and (eq modified-tic org-element--cache-change-tic) + (eq cache-size (cache-size)))) ;; START may no longer be valid, update ;; it to beginning of real element. ;; Upon modification, START may lay diff --git a/lisp/org/org-footnote.el b/lisp/org/org-footnote.el index c83026d1d8f..6bdd0b32fed 100644 --- a/lisp/org/org-footnote.el +++ b/lisp/org/org-footnote.el @@ -853,7 +853,7 @@ to `org-footnote-section'. Inline definitions are ignored." ;; Insert un-referenced footnote definitions at the end. ;; Combine all insertions into one to create a single cache ;; update call. - (combine-change-calls (point) (point) + (org-combine-change-calls (point) (point) (pcase-dolist (`(,label . ,definition) definitions) (unless (member label inserted) (insert "\n" definition "\n")))))))))) diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index 8372a0be4a5..5f587fb3fd8 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el @@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made." (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." - (let ((org-git-version "release_9.6.1-23-gc45a05")) + (let ((org-git-version "release_9.6.1-31-gaf1bb1")) org-git-version)) (provide 'org-version) diff --git a/lisp/org/org.el b/lisp/org/org.el index 1b829d837c7..9a4f7803cf4 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -723,6 +723,10 @@ defined in org-duration.el.") (set-default-toplevel-value var value) (when (featurep 'org) (org-load-modules-maybe 'force) + ;; FIXME: We can't have all the requires at top-level due to + ;; circular dependencies. Yet, this function might sometimes be + ;; called when 'org-element is not loaded. + (require 'org-element) (org-element-cache-reset 'all))) (defcustom org-modules '(ol-doi ol-w3m ol-bbdb ol-bibtex ol-docview ol-gnus ol-info ol-irc ol-mhe ol-rmail ol-eww) @@ -6556,7 +6560,7 @@ See also `org-promote'." (interactive) (save-excursion (org-back-to-heading t) - (combine-change-calls (point) (save-excursion (org-end-of-subtree t)) + (org-combine-change-calls (point) (save-excursion (org-end-of-subtree t)) (org-with-limited-levels (org-map-tree 'org-promote)))) (org-fix-position-after-promote)) @@ -6566,7 +6570,7 @@ See `org-demote' and `org-promote'." (interactive) (save-excursion (org-back-to-heading t) - (combine-change-calls (point) (save-excursion (org-end-of-subtree t)) + (org-combine-change-calls (point) (save-excursion (org-end-of-subtree t)) (org-with-limited-levels (org-map-tree 'org-demote)))) (org-fix-position-after-promote)) @@ -7135,7 +7139,7 @@ When REMOVE is non-nil, remove the subtree from the clipboard." (setq beg (point)) ;; Avoid re-parsing cache elements when i.e. level 1 heading ;; is inserted and then promoted. - (combine-change-calls beg beg + (org-combine-change-calls beg beg (when (fboundp 'org-id-paste-tracker) (org-id-paste-tracker txt)) (insert txt) (unless (string-suffix-p "\n" txt) (insert "\n")) @@ -18844,7 +18848,7 @@ Alignment is done according to `org-property-format', which see." (when (save-excursion (beginning-of-line) (looking-at org-property-re)) - (combine-change-calls (match-beginning 0) (match-end 0) + (org-combine-change-calls (match-beginning 0) (match-end 0) (let ((newtext (concat (match-string 4) (org-trim (format org-property-format (match-string 1) (match-string 3)))))) From f49caaa892576e5fa95373c38e6a99904249551c Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 12 Feb 2023 21:07:45 +0000 Subject: [PATCH 13/29] ; * src/pdumper.c (dump_buffer): Update hash. This follows commit 8f3091defb3 of 2023-02-12 "; Fix typo in buffer.h". --- src/pdumper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pdumper.c b/src/pdumper.c index 800fc2e9d05..4809fb5dce7 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -2748,7 +2748,7 @@ dump_hash_table (struct dump_context *ctx, static dump_off dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer) { -#if CHECK_STRUCTS && !defined HASH_buffer_DB34E5D09F +#if CHECK_STRUCTS && !defined HASH_buffer_85D317CE74 # error "buffer changed. See CHECK_STRUCTS comment in config.h." #endif struct buffer munged_buffer = *in_buffer; From f2114e8d89feed154a1c523c925ff2fb9fa9ba9a Mon Sep 17 00:00:00 2001 From: Yuan Fu Date: Sun, 12 Feb 2023 19:49:47 -0800 Subject: [PATCH 14/29] Fix indentation for closing bracket in c-ts-mode (bug#61398) * lisp/progmodes/c-ts-mode.el: (c-ts-mode--indent-styles): Move the rule earlier. (c-ts-base-mode): Add move block type. * test/lisp/progmodes/c-ts-mode-resources/indent.erts: New tests. --- lisp/progmodes/c-ts-mode.el | 11 +++++--- .../progmodes/c-ts-mode-resources/indent.erts | 27 +++++++++++++++++++ 2 files changed, 35 insertions(+), 3 deletions(-) diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index b898f7d9ee3..af7aa1c3a0e 100644 --- a/lisp/progmodes/c-ts-mode.el +++ b/lisp/progmodes/c-ts-mode.el @@ -272,6 +272,11 @@ MODE is either `c' or `cpp'." ;; Indent the body of namespace definitions. ((parent-is "declaration_list") parent-bol c-ts-mode-indent-offset))) + ;; Closing bracket. This should be before initializer_list + ;; (and probably others) rule because that rule (and other + ;; similar rules) will match the closing bracket. (Bug#61398) + ((node-is "}") point-min c-ts-common-statement-offset) + ;; int[5] a = { 0, 0, 0, 0 }; ((parent-is "initializer_list") parent-bol c-ts-mode-indent-offset) ;; Statement in enum. @@ -281,8 +286,6 @@ MODE is either `c' or `cpp'." ;; Statement in {} blocks. ((parent-is "compound_statement") point-min c-ts-common-statement-offset) - ;; Closing bracket. - ((node-is "}") point-min c-ts-common-statement-offset) ;; Opening bracket. ((node-is "compound_statement") point-min c-ts-common-statement-offset) ;; Bug#61291. @@ -768,7 +771,9 @@ the semicolon. This function skips the semicolon." (setq-local c-ts-common-indent-type-regexp-alist `((block . ,(rx (or "compound_statement" "field_declaration_list" - "enumerator_list"))) + "enumerator_list" + "initializer_list" + "field_declaration_list"))) (if . "if_statement") (else . ("if_statement" . "alternative")) (do . "do_statement") diff --git a/test/lisp/progmodes/c-ts-mode-resources/indent.erts b/test/lisp/progmodes/c-ts-mode-resources/indent.erts index 21b84c2e7e3..05d59c10a42 100644 --- a/test/lisp/progmodes/c-ts-mode-resources/indent.erts +++ b/test/lisp/progmodes/c-ts-mode-resources/indent.erts @@ -182,6 +182,20 @@ else if (false) return 3; =-=-= +Name: Initializer List (Bug#61398) + +=-= +int main() +{ + const char *emoticons[][2] = + { + {":-)", "SLIGHTLY SMILING FACE"}, + {";-)", "WINKING FACE"}, + {":-(", "SLIGHTLY FROWNING FACE"}, + }; +} +=-=-= + Name: Multiline Block Comments 1 (bug#60270) =-= @@ -327,3 +341,16 @@ void foo( } } =-=-= + +Name: Initializer List (Linux Style) (Bug#61398) + +=-= +int main() +{ + const char *emoticons[][2] = { + {":-)", "SLIGHTLY SMILING FACE"}, + {";-)", "WINKING FACE"}, + {":-(", "SLIGHTLY FROWNING FACE"}, + }; +} +=-=-= From a3edacd3f547195740304139cb68aaa94d7b18ee Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 13 Feb 2023 15:51:48 +0100 Subject: [PATCH 15/29] Add new user option password-colon-equivalents * lisp/international/mule-conf.el (password-colon-equivalents): New defcustom. * lisp/comint.el (comint-password-prompt-regexp): * lisp/eshell/esh-mode.el (eshell-password-prompt-regexp): Use it. * lisp/net/tramp-compat.el (tramp-compat-password-colon-equivalents): New variable. * lisp/net/tramp.el (tramp-password-prompt-regexp): Use it. --- lisp/comint.el | 3 ++- lisp/eshell/esh-mode.el | 5 ++++- lisp/international/mule-conf.el | 13 +++++++++++++ lisp/net/tramp-compat.el | 13 +++++++++++++ lisp/net/tramp.el | 9 +++++---- 5 files changed, 37 insertions(+), 6 deletions(-) diff --git a/lisp/comint.el b/lisp/comint.el index c5589324a14..9d2c245247f 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -383,7 +383,8 @@ This variable is buffer-local." "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)" "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?" ;; "[[:alpha:]]" used to be "for", which fails to match non-English. - "\\(?: [[:alpha:]]+ .+\\)?[[:blank:]]*[::៖][[:space:]]*\\'" + "\\(?: [[:alpha:]]+ .+\\)?[[:blank:]]*" + "[" (apply #'string password-colon-equivalents) "][[:space:]]*\\'" ;; The ccrypt encryption dialog doesn't end with a colon, so ;; treat it specially. "\\|^Enter encryption key: (repeat) *\\'" diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el index 46c3c2fa175..1b8f5ff8018 100644 --- a/lisp/eshell/esh-mode.el +++ b/lisp/eshell/esh-mode.el @@ -172,7 +172,10 @@ inserted. They return the string as it should be inserted." :type 'hook) (defcustom eshell-password-prompt-regexp - (format "\\(%s\\)[^::៖]*[::៖]\\s *\\'" (regexp-opt password-word-equivalents)) + (format "%s[^%s]*[%s]\\s *\\'" + (regexp-opt password-word-equivalents t) + (apply #'string password-colon-equivalents) + (apply #'string password-colon-equivalents)) "Regexp matching prompts for passwords in the inferior process. This is used by `eshell-watch-for-password-prompt'." :type 'regexp diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index 979e685e32a..30376b5bc19 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el @@ -1734,6 +1734,19 @@ included; callers should bind `case-fold-search' to t." :version "27.1" :group 'processes) +;; (describe-char-fold-equivalences ?:) +;; The last entry is taken from history. +(defcustom password-colon-equivalents + '(?\N{COLON} + ?\N{FULLWIDTH COLON} + ?\N{SMALL COLON} + ?\N{PRESENTATION FORM FOR VERTICAL COLON} + ?\N{KHMER SIGN CAMNUC PII KUUH}) + "List of characters equivalent to trailing colon in \"password\" prompts." + :type '(repeat character) + :version "30.1" + :group 'processes) + ;; The old code-pages library is obsoleted by coding systems based on ;; the charsets defined in this file but might be required by user ;; code. diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 01f1c38988c..420d6cadb9c 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -275,6 +275,19 @@ Add the extension of F, if existing." (autoload 'netrc-parse "netrc") (netrc-parse file)))) +;; User option `password-colon-equivalents' is new in Emacs 30.1. +(if (boundp 'password-colon-equivalents) + (defvaralias + 'tramp-compat-password-colon-equivalents + 'password-colon-equivalents) + (defvar tramp-compat-password-colon-equivalents + '(?\N{COLON} + ?\N{FULLWIDTH COLON} + ?\N{SMALL COLON} + ?\N{PRESENTATION FORM FOR VERTICAL COLON} + ?\N{KHMER SIGN CAMNUC PII KUUH}) + "List of characters equivalent to trailing colon in \"password\" prompts.")) + (dolist (elt (all-completions "tramp-compat-" obarray 'functionp)) (put (intern elt) 'tramp-suppress-trace t)) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 115048d59db..9fa9866aec8 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -641,10 +641,11 @@ This regexp must match both `tramp-initial-end-of-output' and :type 'regexp) (defcustom tramp-password-prompt-regexp - (rx - bol (* nonl) - (group (regexp (regexp-opt password-word-equivalents))) - (* nonl) (any "::៖") (? "\^@") (* blank)) + (rx-to-string + `(: bol (* nonl) + (group (| . ,password-word-equivalents)) + (* nonl) (any . ,tramp-compat-password-colon-equivalents) + (? "\^@") (* blank))) "Regexp matching password-like prompts. The regexp should match at end of buffer. From 8aef401b4f66a64ddfa9390590fb2cae1f96d522 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Sun, 12 Feb 2023 12:33:27 +0100 Subject: [PATCH 16/29] LAP optimiser: more stack reduction hoisting Hoisting stack reduction ops allows them to coalesce and/or cancel out pushing ops, and for useful operations to sink and combine, such as not + goto-if-[not-]nil. * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Add the rule UNARY discardN-preserve-tos --> discardN-preserve-tos UNARY where UNARY pops and pushes one value. Generalise the rule const discardN-preserve-tos --> discardN const to any 0-ary op, not just const: varref, point, etc. --- lisp/emacs-lisp/byte-opt.el | 71 +++++++++++++++++++++++-------------- 1 file changed, 45 insertions(+), 26 deletions(-) diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 833e88887f9..1fa8e8bdf8b 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -2042,6 +2042,22 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." (let ((side-effect-free (if byte-compile-delete-errors byte-compile-side-effect-free-ops byte-compile-side-effect-and-error-free-ops)) + ;; Ops taking and produce a single value on the stack. + (unary-ops '( byte-not byte-length byte-list1 byte-nreverse + byte-car byte-cdr byte-car-safe byte-cdr-safe + byte-symbolp byte-consp byte-stringp + byte-listp byte-integerp byte-numberp + byte-add1 byte-sub1 byte-negate + ;; There are more of these but the list is + ;; getting long and the gain is typically small. + )) + ;; Ops producing a single result without looking at the stack. + (producer-ops '( byte-constant byte-varref + byte-point byte-point-max byte-point-min + byte-following-char byte-preceding-char + byte-current-column + byte-eolp byte-eobp byte-bolp byte-bobp + byte-current-buffer byte-widen)) (add-depth 0) (keep-going 'first-time) ;; Create a cons cell as head of the list so that removing the first @@ -2421,12 +2437,7 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." ;; const, varref, point etc. ;; ((and (eq (car (nth 2 rest)) 'byte-return) - (memq (car lap1) '( byte-constant byte-varref - byte-point byte-point-max byte-point-min - byte-following-char byte-preceding-char - byte-current-column - byte-eolp byte-eobp byte-bolp byte-bobp - byte-current-buffer byte-widen)) + (memq (car lap1) producer-ops) (or (memq (car lap0) '( byte-discard byte-discardN byte-discardN-preserve-tos byte-stack-set)) @@ -2438,26 +2449,15 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." lap0 lap1 (nth 2 rest) lap1 (nth 2 rest))) ;; - ;; discardN-preserve-tos OP return --> OP return - ;; dup OP return --> OP return - ;; where OP is 1->1 in stack use, like `not'. + ;; (discardN-preserve-tos|dup) UNARY return --> UNARY return + ;; where UNARY takes and produces a single value on the stack ;; ;; FIXME: ideally we should run this backwards, so that we could do ;; discardN-preserve-tos OP1...OPn return -> OP1..OPn return ;; but that would require a different approach. ;; ((and (eq (car (nth 2 rest)) 'byte-return) - (memq (car lap1) - '( byte-not - byte-symbolp byte-consp byte-stringp - byte-listp byte-integerp byte-numberp - byte-list1 - byte-car byte-cdr byte-car-safe byte-cdr-safe - byte-length - byte-add1 byte-sub1 byte-negate byte-nreverse - ;; There are more of these but the list is - ;; getting long and the gain is small. - )) + (memq (car lap1) unary-ops) (or (memq (car lap0) '(byte-discardN-preserve-tos byte-dup)) (and (eq (car lap0) 'byte-stack-set) (eql (cdr lap0) 1)))) @@ -2785,14 +2785,32 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." (push newjmp (cdr rest))) t))))) - ;; - ;; const discardN-preserve-tos ==> discardN const - ;; const stack-set(1) ==> discard const - ;; - ((and (eq (car lap0) 'byte-constant) + ;; + ;; UNARY discardN-preserve-tos --> discardN-preserve-tos UNARY + ;; where UNARY takes and produces a single value on the stack + ;; + ((and (memq (car lap0) unary-ops) (or (eq (car lap1) 'byte-discardN-preserve-tos) (and (eq (car lap1) 'byte-stack-set) - (eql (cdr lap1) 1)))) + (eql (cdr lap1) 1))) + ;; unless followed by return (which will eat the discard) + (not (eq (car lap2) 'byte-return))) + (setq keep-going t) + (byte-compile-log-lap " %s %s\t-->\t%s %s" lap0 lap1 lap1 lap0) + (setcar rest lap1) + (setcar (cdr rest) lap0)) + + ;; + ;; PRODUCER discardN-preserve-tos(X) --> discard(X) PRODUCER + ;; where PRODUCER pushes a result without looking at the stack: + ;; const, varref, point etc. + ;; + ((and (memq (car lap0) producer-ops) + (or (eq (car lap1) 'byte-discardN-preserve-tos) + (and (eq (car lap1) 'byte-stack-set) + (eql (cdr lap1) 1))) + ;; unless followed by return (which will eat the discard) + (not (eq (car lap2) 'byte-return))) (setq keep-going t) (let ((newdiscard (if (eql (cdr lap1) 1) (cons 'byte-discard nil) @@ -2801,6 +2819,7 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." " %s %s\t-->\t%s %s" lap0 lap1 newdiscard lap0) (setf (car rest) newdiscard) (setf (cadr rest) lap0))) + (t ;; If no rule matched, advance and try again. (setq prev (cdr prev)))))))) From a124cfd4418c054736fc1c56834191258507caf2 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Mon, 13 Feb 2023 18:40:55 +0100 Subject: [PATCH 17/29] ; Fix previous mule-conf change --- lisp/international/mule-conf.el | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index 30376b5bc19..a83eeb08525 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el @@ -1737,11 +1737,12 @@ included; callers should bind `case-fold-search' to t." ;; (describe-char-fold-equivalences ?:) ;; The last entry is taken from history. (defcustom password-colon-equivalents - '(?\N{COLON} - ?\N{FULLWIDTH COLON} - ?\N{SMALL COLON} - ?\N{PRESENTATION FORM FOR VERTICAL COLON} - ?\N{KHMER SIGN CAMNUC PII KUUH}) + '(?\u003a ; ?\N{COLON} + ?\uff1a ; ?\N{FULLWIDTH COLON} + ?\ufe55 ; ?\N{SMALL COLON} + ?\ufe13 ; ?\N{PRESENTATION FORM FOR VERTICAL COLON} + ?\u17d6 ; ?\N{KHMER SIGN CAMNUC PII KUUH}) + ) "List of characters equivalent to trailing colon in \"password\" prompts." :type '(repeat character) :version "30.1" From df5c1c9370ca3c6a6e119278ef6bb1e3bca4d578 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 13 Feb 2023 19:53:05 +0200 Subject: [PATCH 18/29] ; * etc/NEWS: Move treesit-related functions and variables to Lisp Changes. --- etc/NEWS | 89 ++++++++++++++++++++++++++++++-------------------------- 1 file changed, 47 insertions(+), 42 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index d3eafaadf19..2d63593ff17 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -71,50 +71,9 @@ mistaken compositions, this will now work as well. This works like 'kill-matching-buffers', but without asking for confirmation. -+++ -** New helper variable 'transpose-sexps-function'. -Emacs now can set this variable to customize the behavior of the -'transpose-sexps' function. - -+++ -** New function 'transpose-sexps-default-function'. -The previous implementation is moved into its own function, to be -bound by 'transpose-sexps-function'. - -** New function 'treesit-transpose-sexps'. -Tree-sitter now unconditionally sets 'transpose-sexps-function' for all -tree-sitter enabled modes. This functionality utilizes the new -'transpose-sexps-function'. - -** Commands and variables to move by program statements - -*** New variable 'forward-sentence-function'. -Major modes can now set this variable to customize the behavior of the -'forward-sentence' command. - -*** New function 'forward-sentence-default-function'. -The previous implementation of 'forward-sentence' is moved into its -own function, to be bound by 'forward-sentence-function'. - -*** New buffer-local variable 'treesit-sentence-type-regexp'. -Similarly to 'treesit-defun-type-regexp', this variable is used to -define "sentences" in tree-sitter enabled modes. - -*** New function 'treesit-forward-sentence'. -All tree-sitter enabled modes that define 'treesit-sentence-type-regexp' -now set 'forward-sentence-function' to call 'treesit-forward-sentence'. - -*** New buffer-local variable 'treesit-sexp-type-regexp'. -Similarly to 'treesit-defun-type-regexp', this variable is used to -define "sexps" in tree-sitter enabled modes. - -*** New function 'treesit-forward-sexp'. -Tree-sitter conditionally sets 'forward-sexp-function' for major modes -that have defined 'treesit-sexp-type-regexp' to enable sexp-related -motion commands. - * Changes in Specialized Modes and Packages in Emacs 30.1 + --- ** Variable order and truncation can now be configured in 'gdb-many-windows'. The new user option 'gdb-locals-table-row-config' allows users to @@ -240,6 +199,52 @@ This user option has been obsoleted in Emacs 27, use * Lisp Changes in Emacs 30.1 +** Functions and variables to transpose sexps + ++++ +*** New helper variable 'transpose-sexps-function'. +Emacs now can set this variable to customize the behavior of the +'transpose-sexps' function. + ++++ +*** New function 'transpose-sexps-default-function'. +The previous implementation is moved into its own function, to be +bound by 'transpose-sexps-function'. + +*** New function 'treesit-transpose-sexps'. +Tree-sitter now unconditionally sets 'transpose-sexps-function' for all +tree-sitter enabled modes. This functionality utilizes the new +'transpose-sexps-function'. + +** Functions and variables to move by program statements + +*** New variable 'forward-sentence-function'. +Major modes can now set this variable to customize the behavior of the +'forward-sentence' command. + +*** New function 'forward-sentence-default-function'. +The previous implementation of 'forward-sentence' is moved into its +own function, to be bound by 'forward-sentence-function'. + +*** New buffer-local variable 'treesit-sentence-type-regexp'. +Similarly to 'treesit-defun-type-regexp', this variable is used to +define "sentences" in tree-sitter enabled modes. + +*** New function 'treesit-forward-sentence'. +All tree-sitter enabled modes that define 'treesit-sentence-type-regexp' +now set 'forward-sentence-function' to call 'treesit-forward-sentence'. + +** Functions and variables to move by program sexps + +*** New buffer-local variable 'treesit-sexp-type-regexp'. +Similarly to 'treesit-defun-type-regexp', this variable is used to +define "sexps" in tree-sitter enabled modes. + +*** New function 'treesit-forward-sexp'. +Tree-sitter conditionally sets 'forward-sexp-function' for major modes +that have defined 'treesit-sexp-type-regexp' to enable sexp-related +motion commands. + ** New or changed byte-compilation warnings --- From 5284af27ee5250c631ff4ee2f3d8682f0c5df8bc Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 12 Feb 2023 17:30:46 -0800 Subject: [PATCH 19/29] Improve insert-file-contents checking * src/fileio.c (Finsert_file_contents): Check BEG, END, REPLACE for validity before launching into opening files etc. --- src/fileio.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index c672e0f7baf..64337abdaef 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3908,7 +3908,6 @@ by calling `format-decode', which see. */) int fd; ptrdiff_t inserted = 0; ptrdiff_t how_much; - off_t beg_offset, end_offset; int unprocessed; specpdl_ref count = SPECPDL_INDEX (); Lisp_Object handler, val, insval, orig_filename, old_undo; @@ -3970,6 +3969,17 @@ by calling `format-decode', which see. */) goto handled; } + if (!NILP (visit)) + { + if (!NILP (beg) || !NILP (end)) + error ("Attempt to visit less than an entire file"); + if (BEG < Z && NILP (replace)) + error ("Cannot do file visiting in a non-empty buffer"); + } + + off_t beg_offset = !NILP (beg) ? file_offset (beg) : 0; + off_t end_offset = !NILP (end) ? file_offset (end) : -1; + orig_filename = filename; filename = ENCODE_FILE (filename); @@ -4030,22 +4040,7 @@ by calling `format-decode', which see. */) build_string ("not a regular file"), orig_filename); } - if (!NILP (visit)) - { - if (!NILP (beg) || !NILP (end)) - error ("Attempt to visit less than an entire file"); - if (BEG < Z && NILP (replace)) - error ("Cannot do file visiting in a non-empty buffer"); - } - - if (!NILP (beg)) - beg_offset = file_offset (beg); - else - beg_offset = 0; - - if (!NILP (end)) - end_offset = file_offset (end); - else + if (end_offset < 0) { if (!regular) end_offset = TYPE_MAXIMUM (off_t); From b0842671e750be08356425e2fc38251e7b08d5d7 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 12 Feb 2023 17:52:46 -0800 Subject: [PATCH 20/29] Improve insert-file-contents on non-regular files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * src/fileio.c (Finsert_file_contents): If the file is not a regular file, check REPLACE and VISIT before doing further syscalls that won’t matter in this case. --- src/fileio.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 64337abdaef..751b8ec573c 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4022,7 +4022,6 @@ by calling `format-decode', which see. */) if (!S_ISREG (st.st_mode)) { regular = false; - seekable = lseek (fd, 0, SEEK_CUR) < 0; if (! NILP (visit)) { @@ -4030,14 +4029,15 @@ by calling `format-decode', which see. */) goto notfound; } + if (!NILP (replace)) + xsignal2 (Qfile_error, + build_string ("not a regular file"), orig_filename); + + seekable = lseek (fd, 0, SEEK_CUR) < 0; if (!NILP (beg) && !seekable) xsignal2 (Qfile_error, build_string ("cannot use a start position in a non-seekable file/device"), orig_filename); - - if (!NILP (replace)) - xsignal2 (Qfile_error, - build_string ("not a regular file"), orig_filename); } if (end_offset < 0) From ccc092115172f15c9135771f90d0000f8bf21614 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 13 Feb 2023 08:51:45 -0800 Subject: [PATCH 21/29] =?UTF-8?q?Don=E2=80=99t=20scan=20text=20twice=20to?= =?UTF-8?q?=20guess=20coding=20system?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * src/fileio.c (Finsert_file_contents): If the file shrank below 4 KiB, don’t read duplicate text into READ_BUF. This also removes a use of SEEK_END, which Linux /proc file systems do not support (not that we should get here with /proc). --- src/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fileio.c b/src/fileio.c index 751b8ec573c..47177be0f4d 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4119,7 +4119,7 @@ by calling `format-decode', which see. */) if (nread == 1024) { int ntail; - if (lseek (fd, - (1024 * 3), SEEK_END) < 0) + if (lseek (fd, st.st_size - 1024 * 3, SEEK_CUR) < 0) report_file_error ("Setting file position", orig_filename); ntail = emacs_read_quit (fd, read_buf + nread, 1024 * 3); From bae5fa5d9a8ef8c41fbb3408eea441a2ee14d1db Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 13 Feb 2023 08:53:52 -0800 Subject: [PATCH 22/29] Fix src/fileio.c comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * src/fileio.c (Finsert_file_contents): Fix comment. Since the code relies on st_size, it’s limited to regular files, not to seekable files. --- src/fileio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fileio.c b/src/fileio.c index 47177be0f4d..ee30db8b49b 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -4101,7 +4101,7 @@ by calling `format-decode', which see. */) else { /* Don't try looking inside a file for a coding system - specification if it is not seekable. */ + specification if it is not a regular file. */ if (regular && !NILP (Vset_auto_coding_function)) { /* Find a coding system specified in the heading two From b950b46f514989442fdd9937a0e96d53a3affa88 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 13 Feb 2023 12:32:11 -0800 Subject: [PATCH 23/29] Fix insert-file-contents on /proc files This should fix Bug#9800 (2011-10-19). * src/fileio.c (Finsert_file_contents): Do not trust st_size even on regular files, as the file might be a Linux /proc file, or it might be growing. Instead, always read to EOF when END is nil. --- src/fileio.c | 57 +++++++++++++++++++++++----------------------------- 1 file changed, 25 insertions(+), 32 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index ee30db8b49b..b80f8d61de4 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3907,7 +3907,6 @@ by calling `format-decode', which see. */) struct timespec mtime; int fd; ptrdiff_t inserted = 0; - ptrdiff_t how_much; int unprocessed; specpdl_ref count = SPECPDL_INDEX (); Lisp_Object handler, val, insval, orig_filename, old_undo; @@ -3920,7 +3919,8 @@ by calling `format-decode', which see. */) bool replace_handled = false; bool set_coding_system = false; Lisp_Object coding_system; - bool read_quit = false; + /* Negative if read error, 0 if OK so far, positive if quit. */ + ptrdiff_t read_quit = 0; /* If the undo log only contains the insertion, there's no point keeping it. It's typically when we first fill a file-buffer. */ bool empty_undo_list_p @@ -4404,7 +4404,7 @@ by calling `format-decode', which see. */) ptrdiff_t bufpos; unsigned char *decoded; ptrdiff_t temp; - ptrdiff_t this = 0; + ptrdiff_t this; specpdl_ref this_count = SPECPDL_INDEX (); bool multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); @@ -4580,8 +4580,12 @@ by calling `format-decode', which see. */) } move_gap_both (PT, PT_BYTE); - if (GAP_SIZE < total) - make_gap (total - GAP_SIZE); + + /* Ensure the gap is at least one byte larger than needed for the + estimated file size, so that in the usual case we read to EOF + without reallocating. */ + if (GAP_SIZE <= total) + make_gap (total - GAP_SIZE + 1); if (beg_offset != 0 || !NILP (replace)) { @@ -4589,12 +4593,6 @@ by calling `format-decode', which see. */) report_file_error ("Setting file position", orig_filename); } - /* In the following loop, HOW_MUCH contains the total bytes read so - far for a regular file, and not changed for a special file. But, - before exiting the loop, it is set to a negative value if I/O - error occurs. */ - how_much = 0; - /* Total bytes inserted. */ inserted = 0; @@ -4603,23 +4601,26 @@ by calling `format-decode', which see. */) { ptrdiff_t gap_size = GAP_SIZE; - while (how_much < total) + while (NILP (end) || inserted < total) { - /* `try' is reserved in some compilers (Microsoft C). */ - ptrdiff_t trytry = min (total - how_much, READ_BUF_SIZE); ptrdiff_t this; + if (gap_size == 0) + { + /* The size estimate was wrong. Make the gap 50% larger. */ + make_gap (GAP_SIZE >> 1); + gap_size = GAP_SIZE - inserted; + } + + /* 'try' is reserved in some compilers (Microsoft C). */ + ptrdiff_t trytry = min (gap_size, READ_BUF_SIZE); + if (!NILP (end)) + trytry = min (trytry, total - inserted); + if (!seekable && NILP (end)) { Lisp_Object nbytes; - /* Maybe make more room. */ - if (gap_size < trytry) - { - make_gap (trytry - gap_size); - gap_size = GAP_SIZE - inserted; - } - /* Read from the file, capturing `quit'. When an error occurs, end the loop, and arrange for a quit to be signaled after decoding the text we read. */ @@ -4630,7 +4631,7 @@ by calling `format-decode', which see. */) if (NILP (nbytes)) { - read_quit = true; + read_quit = 1; break; } @@ -4649,19 +4650,11 @@ by calling `format-decode', which see. */) if (this <= 0) { - how_much = this; + read_quit = this; break; } gap_size -= this; - - /* For a regular file, where TOTAL is the real size, - count HOW_MUCH to compare with it. - For a special file, where TOTAL is just a buffer size, - so don't bother counting in HOW_MUCH. - (INSERTED is where we count the number of characters inserted.) */ - if (seekable || !NILP (end)) - how_much += this; inserted += this; } } @@ -4682,7 +4675,7 @@ by calling `format-decode', which see. */) emacs_close (fd); clear_unwind_protect (fd_index); - if (how_much < 0) + if (read_quit < 0) report_file_error ("Read error", orig_filename); notfound: From e6043641d300030aaf1f2deb7b1e6c4dfbed8629 Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Tue, 14 Feb 2023 12:34:48 +0100 Subject: [PATCH 24/29] * src/comp.c (Fcomp__compile_ctxt_to_file): Don't create output file twice --- src/comp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/comp.c b/src/comp.c index ba549155925..7d2987605d9 100644 --- a/src/comp.c +++ b/src/comp.c @@ -4991,7 +4991,8 @@ DEFUN ("comp--compile-ctxt-to-file", Fcomp__compile_ctxt_to_file, format_string ("%s_libgccjit_repro.c", SSDATA (ebase_name))); Lisp_Object tmp_file = - Fmake_temp_file_internal (base_name, Qnil, build_string (".eln.tmp"), Qnil); + Fmake_temp_file_internal (base_name, make_fixnum (0), + build_string (".eln.tmp"), Qnil); Lisp_Object encoded_tmp_file = ENCODE_FILE (tmp_file); #ifdef WINDOWSNT encoded_tmp_file = ansi_encode_filename (encoded_tmp_file); From 0960ce4b5780f53e405dc7f10ded3f4502f453b8 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Tue, 14 Feb 2023 14:18:38 +0100 Subject: [PATCH 25/29] ; Fix typo in comment in mule-conf change --- lisp/international/mule-conf.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index a83eeb08525..a27aaf9e522 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el @@ -1741,7 +1741,7 @@ included; callers should bind `case-fold-search' to t." ?\uff1a ; ?\N{FULLWIDTH COLON} ?\ufe55 ; ?\N{SMALL COLON} ?\ufe13 ; ?\N{PRESENTATION FORM FOR VERTICAL COLON} - ?\u17d6 ; ?\N{KHMER SIGN CAMNUC PII KUUH}) + ?\u17d6 ; ?\N{KHMER SIGN CAMNUC PII KUUH} ) "List of characters equivalent to trailing colon in \"password\" prompts." :type '(repeat character) From 864bf5dda4a0f84041d30165a995f2160d1e92f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Engdeg=C3=A5rd?= Date: Tue, 14 Feb 2023 17:06:49 +0100 Subject: [PATCH 26/29] Fix recent LAP optimiser error * lisp/emacs-lisp/byte-opt.el (byte-optimize-lapcode): Fix a flaw in the dup (varset|varbind|stack-set) discard -> (varset|varbind|stack-set) rule: don't match stack-set(1) which is dealt with elsewhere, and generalise to discard(N). --- lisp/emacs-lisp/byte-opt.el | 56 +++++++++++++++++++++---------------- 1 file changed, 32 insertions(+), 24 deletions(-) diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 1fa8e8bdf8b..b578b99954c 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -2167,31 +2167,39 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." ;; be larger than necessary. (setq add-depth 1)) t))))) - ;; - ;; dup varset-X discard --> varset-X - ;; dup varbind-X discard --> varbind-X - ;; dup stack-set-X discard --> stack-set-X-1 - ;; (the varbind variant can emerge from other optimizations) - ;; - ((and (eq 'byte-dup (car lap0)) - (eq 'byte-discard (car lap2)) - (memq (car lap1) '(byte-varset byte-varbind - byte-stack-set))) - (setq keep-going t) + ;; + ;; dup varset discard(N) --> varset discard(N-1) + ;; dup varbind discard(N) --> varbind discard(N-1) + ;; dup stack-set(M) discard(N) --> stack-set(M-1) discard(N-1), M>1 + ;; (the varbind variant can emerge from other optimizations) + ;; + ((and (eq 'byte-dup (car lap0)) + (memq (car lap2) '(byte-discard byte-discardN)) + (or (memq (car lap1) '(byte-varset byte-varbind)) + (and (eq (car lap1) 'byte-stack-set) + (> (cdr lap1) 1)))) (setcdr prev (cdr rest)) ; remove dup - (setcdr (cdr rest) (cdddr rest)) ; remove discard - (cond ((not (eq (car lap1) 'byte-stack-set)) - (byte-compile-log-lap " %s %s %s\t-->\t%s" - lap0 lap1 lap2 lap1)) - ((eql (cdr lap1) 1) - (byte-compile-log-lap " %s %s %s\t-->\t" - lap0 lap1 lap2)) - (t - (let ((n (1- (cdr lap1)))) - (byte-compile-log-lap " %s %s %s\t-->\t%s" - lap0 lap1 lap2 - (cons (car lap1) n)) - (setcdr lap1 n))))) + (let ((new1 (if (eq (car lap1) 'byte-stack-set) + (cons 'byte-stack-set (1- (cdr lap1))) + lap1)) + (n (if (eq (car lap2) 'byte-discard) 1 (cdr lap2)))) + (setcar (cdr rest) new1) + (cl-assert (> n 0)) + (cond + ((> n 1) + (let ((new2 (if (> n 2) + (cons 'byte-discardN (1- n)) + (cons 'byte-discard nil)))) + (byte-compile-log-lap " %s %s %s\t-->\t%s %s" + lap0 lap1 lap2 new1 new2) + (setcar (cddr rest) new2))) + (t + (byte-compile-log-lap " %s %s %s\t-->\t%s" + lap0 lap1 lap2 new1) + ;; discard(0) = nop, remove + (setcdr (cdr rest) (cdddr rest))))) + (setq keep-going t)) + ;; ;; not goto-X-if-nil --> goto-X-if-non-nil ;; not goto-X-if-non-nil --> goto-X-if-nil From 82133dea0d021eb2e395d9265f0cfe58822f2c57 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 14 Feb 2023 18:51:44 +0100 Subject: [PATCH 27/29] Tramp cleanup * lisp/net/tramp.el: * lisp/net/tramp-integration.el: * lisp/net/tramp-sh.el: Use `string-join'. * test/lisp/net/tramp-tests.el: Use `string-join'. --- lisp/net/tramp-integration.el | 20 +++++++------------- lisp/net/tramp-sh.el | 24 +++++++++--------------- lisp/net/tramp.el | 10 ++++------ test/lisp/net/tramp-tests.el | 10 ++++------ 4 files changed, 24 insertions(+), 40 deletions(-) diff --git a/lisp/net/tramp-integration.el b/lisp/net/tramp-integration.el index c7877c9824d..3ef4b55acd3 100644 --- a/lisp/net/tramp-integration.el +++ b/lisp/net/tramp-integration.el @@ -133,7 +133,7 @@ been set up by `rfn-eshadow-setup-minibuffer'." ;; Use `path-separator' as it does eshell. (setq eshell-path-env (if (file-remote-p default-directory) - (mapconcat #'identity (butlast (exec-path)) path-separator) + (string-join (butlast (exec-path)) path-separator) (getenv "PATH")))) (with-eval-after-load 'esh-util @@ -345,8 +345,7 @@ NAME must be equal to `tramp-current-connection'." (defconst tramp-bsd-process-attributes-ps-args `("-acxww" "-o" - ,(mapconcat - #'identity + ,(string-join '("pid" "euid" "user" @@ -355,8 +354,7 @@ NAME must be equal to `tramp-current-connection'." "comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") ",") "-o" - ,(mapconcat - #'identity + ,(string-join '("state" "ppid" "pgid" @@ -419,8 +417,7 @@ See `tramp-process-attributes-ps-format'.") ;; Tested with BusyBox v1.24.1. (defconst tramp-busybox-process-attributes-ps-args `("-o" - ,(mapconcat - #'identity + ,(string-join '("pid" "user" "group" @@ -428,8 +425,7 @@ See `tramp-process-attributes-ps-format'.") ",") "-o" "stat=abcde" "-o" - ,(mapconcat - #'identity + ,(string-join '("ppid" "pgid" "tty" @@ -472,8 +468,7 @@ See `tramp-process-attributes-ps-format'.") (defconst tramp-darwin-process-attributes-ps-args `("-acxww" "-o" - ,(mapconcat - #'identity + ,(string-join '("pid" "uid" "user" @@ -482,8 +477,7 @@ See `tramp-process-attributes-ps-format'.") ",") "-o" "state=abcde" "-o" - ,(mapconcat - #'identity + ,(string-join '("ppid" "pgid" "sess" diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index d1f723e9807..7a6c9658aa9 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -2392,8 +2392,7 @@ The method used must be an out-of-band method." v 'file-error "Cannot find remote listener: %s" remote-copy-program)) (setq remote-copy-program - (mapconcat - #'identity + (string-join (append (list remote-copy-program) remote-copy-args (list (if v1 (concat "<" source) (concat ">" target)) "&")) @@ -3010,8 +3009,7 @@ implementation will be used." ;; We must also disable buffering, ;; otherwise strings larger than 4096 ;; bytes, sent by the process, could - ;; block, see termios(3) and - ;; . + ;; block, see termios(3) and Bug#61341. ;; FIXME: Shall we rather use "stty raw"? (if (tramp-check-remote-uname v "Darwin") (tramp-send-command @@ -3118,8 +3116,7 @@ implementation will be used." (format "%s %s %s" (tramp-get-method-parameter vec 'tramp-remote-shell) - (mapconcat - #'identity + (string-join (tramp-get-method-parameter vec 'tramp-remote-shell-args) " ") (tramp-shell-quote-argument (format "kill -%d $$" i)))) @@ -4972,7 +4969,7 @@ Goes through the list `tramp-inline-compress-commands'." (tramp-call-process vec1 tramp-encoding-shell nil t nil tramp-encoding-command-switch - (mapconcat #'identity command " ")) + (string-join command " ")) (goto-char (point-min)) (not (search-forward "remotecommand" nil 'noerror))))) @@ -4991,11 +4988,11 @@ Goes through the list `tramp-inline-compress-commands'." found string) (with-temp-buffer ;; Check hostkey of VEC2, seen from VEC1. - (tramp-send-command vec1 (mapconcat #'identity command " ")) + (tramp-send-command vec1 (string-join command " ")) ;; Check hostkey of VEC2, seen locally. (tramp-call-process vec1 tramp-encoding-shell nil t nil tramp-encoding-command-switch - (mapconcat #'identity command " ")) + (string-join command " ")) (goto-char (point-min)) (while (and (not found) (not (eobp))) (setq string @@ -5219,8 +5216,7 @@ connection if a previous connection has died for some reason." ;; Replace `login-args' place holders. (setq command - (mapconcat - #'identity + (string-join (append ;; We do not want to see the trailing local ;; prompt in `start-file-process'. @@ -5521,12 +5517,10 @@ Nonexistent directories are removed from spec." (format "%s %s %s 'echo %s \\\"$PATH\\\"'" (tramp-get-method-parameter vec 'tramp-remote-shell) - (mapconcat - #'identity + (string-join (tramp-get-method-parameter vec 'tramp-remote-shell-login) " ") - (mapconcat - #'identity + (string-join (tramp-get-method-parameter vec 'tramp-remote-shell-args) " ") (tramp-shell-quote-argument tramp-end-of-heredoc)) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 9fa9866aec8..95b42fb1c43 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4527,8 +4527,7 @@ Return it as number of seconds. Used in `tramp-process-attributes-ps-format'." (defconst tramp-process-attributes-ps-args `("-eww" "-o" - ,(mapconcat - #'identity + ,(string-join '("pid" "euid" "euser" @@ -5002,7 +5001,7 @@ substitution. SPEC-LIST is a list of char/value pairs used for (if (consp (tramp-get-method-parameter v 'tramp-direct-async)) (append (tramp-get-method-parameter v 'tramp-direct-async) - `(,(mapconcat #'identity command " "))) + `(,(string-join command " "))) command))) ;; Check for `tramp-sh-file-name-handler', because something @@ -5898,8 +5897,7 @@ the remote host use line-endings as defined in the variable (let ((inhibit-read-only t)) (delete-region (point-min) (point-max))) ;; Replace "\n" by `tramp-rsh-end-of-line'. (setq string - (mapconcat - #'identity (split-string string "\n") tramp-rsh-end-of-line)) + (string-join (split-string string "\n") tramp-rsh-end-of-line)) (unless (or (string-empty-p string) (string-equal (substring string -1) tramp-rsh-end-of-line)) (setq string (concat string tramp-rsh-end-of-line))) @@ -6597,7 +6595,7 @@ verbosity of 6." (apply #'process-lines program args) (error (tramp-error vec (car err) (cdr err))))) - (tramp-message vec 6 "\n%s" (mapconcat #'identity result "\n")) + (tramp-message vec 6 "\n%s" (string-join result "\n")) result)) (defun tramp-process-running-p (process-name) diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 51fc07117c5..d29e48c0774 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -5542,7 +5542,7 @@ If UNSTABLE is non-nil, the test is tagged as `:unstable'." ;; (tramp--test-message "%s" attributes) (should (equal (cdr (assq 'comm attributes)) (car command))) (should (equal (cdr (assq 'args attributes)) - (mapconcat #'identity command " "))))) + (string-join command " "))))) ;; Cleanup. (ignore-errors (delete-process proc))))) @@ -6103,8 +6103,7 @@ INPUT, if non-nil, is a string sent to the process." ;; We make a super long `tramp-remote-path'. (make-directory tmp-name) (should (file-directory-p tmp-name)) - (while (tramp-compat-length< - (mapconcat #'identity orig-exec-path ":") 5000) + (while (tramp-compat-length< (string-join orig-exec-path ":") 5000) (let ((dir (make-temp-file (file-name-as-directory tmp-name) 'dir))) (should (file-directory-p dir)) (setq tramp-remote-path @@ -6126,8 +6125,7 @@ INPUT, if non-nil, is a string sent to the process." tramp-test-vec "pipe-buf" 4096)) ;; The last element of `exec-path' is `exec-directory'. (should - (string-equal - path (mapconcat #'identity (butlast orig-exec-path) ":")))) + (string-equal path (string-join (butlast orig-exec-path) ":")))) ;; The shell "sh" shall always exist. (should (executable-find "sh" 'remote))) @@ -7182,7 +7180,7 @@ This requires restrictions of file name syntax." ;; Simplify test in order to speed up. (apply #'tramp--test-check-files (if (tramp--test-expensive-test-p) - files (list (mapconcat #'identity files "")))))) + files (list (string-join files "")))))) (tramp--test-deftest-with-stat tramp-test41-special-characters) From af94369f90a5d3ad44dcc80d205665ccb2d41995 Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Wed, 1 Feb 2023 20:25:16 +0100 Subject: [PATCH 28/29] Rewrite emoji's usage of transient * lisp/international/emoji.el: (emoji--done-derived): Remove variable. (emoji-insert, emoji-recent, emoji-search, emoji-list-select): Define using 'transient-define-prefix'. Use a base suffix group whose value is calculated dynamically. (emoji--setup-prefix, emoji--setup-suffixes, emoji-group-description): New functions used to dynamically calculate suffixes. (emoji--narrow): New suffix class, used to pass state to recursive, narrowed invocations of the prefix command the user initially invoked. (emoji-insert-glyph): New suffix command that is used for all glyphs that have no derivations. Previously a separate command was define for each glyph. (emoji--fontify-glyph): Replace 'inhibit-derived' argument with 'done-derived' argument. (emoji--define-transient): Remove function. (emoji--layout): New function, replacing 'emoji--define-transient'. Return the suffixes in 'define-transient-prefix' format. Unlike the replaced function, do not define any new commands, instead use either the current prefix command or 'emoji-insert-glyph'. (emoji--recent-transient): Remove function. (emoji--char-sequence): New function. (emoji--add-recent): Remove all text properties from glyph. (emoji--choose-emoji): Remove function. --- lisp/international/emoji.el | 264 +++++++++++++++++------------------- 1 file changed, 124 insertions(+), 140 deletions(-) diff --git a/lisp/international/emoji.el b/lisp/international/emoji.el index bcd4aac4f29..b920582fee0 100644 --- a/lisp/international/emoji.el +++ b/lisp/international/emoji.el @@ -68,38 +68,86 @@ representing names. For instance: (defvar emoji--all-bases nil) (defvar emoji--derived nil) (defvar emoji--names (make-hash-table :test #'equal)) -(defvar emoji--done-derived nil) (define-multisession-variable emoji--recent (list "😀" "😖")) (defvar emoji--insert-buffer) -;;;###autoload -(defun emoji-insert () +;;;###autoload (autoload 'emoji-insert "emoji" nil t) +(transient-define-prefix emoji-insert () "Choose and insert an emoji glyph." + :variable-pitch t + [:class transient-columns + :setup-children emoji--setup-suffixes + :description emoji--group-description] (interactive "*") (emoji--init) - (unless (fboundp 'emoji--command-Emoji) - (emoji--define-transient)) - (funcall (intern "emoji--command-Emoji"))) + (emoji--setup-prefix 'emoji-insert "Emoji" nil + `(("Recent" ,@(multisession-value emoji--recent)) + ,@emoji--labels))) -;;;###autoload -(defun emoji-recent () +;;;###autoload (autoload 'emoji-recent "emoji" nil t) +(transient-define-prefix emoji-recent () "Choose and insert one of the recently-used emoji glyphs." + :variable-pitch t + [:class transient-columns + :setup-children emoji--setup-suffixes + :description emoji--group-description] (interactive "*") (emoji--init) - (unless (fboundp 'emoji--command-Emoji) - (emoji--define-transient)) - (funcall (emoji--define-transient - (cons "Recent" (multisession-value emoji--recent)) t))) + (emoji--setup-prefix 'emoji-recent "Recent" t + (multisession-value emoji--recent))) -;;;###autoload -(defun emoji-search () +;;;###autoload (autoload 'emoji-search "emoji" nil t) +(transient-define-prefix emoji-search () "Choose and insert an emoji glyph by typing its Unicode name. This command prompts for an emoji name, with completion, and inserts it. It recognizes the Unicode Standard names of emoji, and also consults the `emoji-alternate-names' alist." + :variable-pitch t + [:class transient-columns + :setup-children emoji--setup-suffixes + :description emoji--group-description] (interactive "*") (emoji--init) - (emoji--choose-emoji)) + (pcase-let ((`(,glyph . ,derived) (emoji--read-emoji))) + (if derived + (emoji--setup-prefix 'emoji-search "Choose Emoji" + (list glyph) + (cons glyph derived)) + (emoji--add-recent glyph) + (insert glyph)))) + +(defun emoji--setup-prefix (command title done-derived spec) + (transient-setup + command nil nil + :scope (if (eq transient-current-command command) + (cons (oref (transient-suffix-object) title) + (oref (transient-suffix-object) done-derived)) + (cons title done-derived)) + :value (if (eq transient-current-command command) + (oref (transient-suffix-object) children) + spec))) + +(defun emoji--setup-suffixes (_) + (transient-parse-suffixes + (oref transient--prefix command) + (pcase-let ((`(,title . ,done-derived) (oref transient--prefix scope))) + (emoji--layout (oref transient--prefix command) title + (oref transient--prefix value) done-derived)))) + +(defun emoji--group-description () + (car (oref transient--prefix scope))) + +(defclass emoji--narrow (transient-suffix) + ((title :initarg :title) + (done-derived :initarg :done-derived) + (children :initarg :children))) + +(transient-define-suffix emoji-insert-glyph () + "Insert the emoji you selected." + (interactive nil not-a-mode) + (let ((glyph (oref (transient-suffix-object) description))) + (emoji--add-recent glyph) + (insert glyph))) ;;;###autoload (defun emoji-list () @@ -179,11 +227,10 @@ the name is not known." 'help-echo (emoji--name glyph)))) (insert "\n\n")))) -(defun emoji--fontify-glyph (glyph &optional inhibit-derived) +(defun emoji--fontify-glyph (glyph &optional done-derived) (propertize glyph 'face - (if (and (not inhibit-derived) - (or (null emoji--done-derived) - (not (gethash glyph emoji--done-derived))) + (if (and (not (or (eq done-derived t) + (member glyph done-derived))) (gethash glyph emoji--derived)) ;; If this emoji has derivations, use a special face ;; to tell the user. @@ -206,33 +253,30 @@ the name is not known." :interactive nil (setq-local truncate-lines t)) -(defun emoji-list-select (event) +;;;###autoload (autoload 'emoji-list-select "emoji" nil t) +(transient-define-prefix emoji-list-select (event) "Select the emoji under point." + :variable-pitch t + [:class transient-columns + :setup-children emoji--setup-suffixes + :description emoji--group-description] (interactive (list last-nonmenu-event) emoji-list-mode) (mouse-set-point event) (let ((glyph (get-text-property (point) 'emoji-glyph))) (unless glyph (error "No emoji under point")) - (let ((derived (gethash glyph emoji--derived)) - (end-func - (lambda () - (let ((buf emoji--insert-buffer)) - (quit-window) - (if (buffer-live-p buf) - (switch-to-buffer buf) - (error "Buffer disappeared")))))) - (if (not derived) - ;; Glyph without derivations. - (progn - (emoji--add-recent glyph) - (funcall end-func) - (insert glyph)) - ;; Pop up a transient to choose between derivations. - (let ((emoji--done-derived (make-hash-table :test #'equal))) - (setf (gethash glyph emoji--done-derived) t) - (funcall - (emoji--define-transient (cons "Choose Emoji" (cons glyph derived)) - nil end-func))))))) + (let ((buf emoji--insert-buffer)) + (quit-window) + (if (buffer-live-p buf) + (switch-to-buffer buf) + (error "Buffer disappeared"))) + (let ((derived (gethash glyph emoji--derived))) + (if derived + (emoji--setup-prefix 'emoji-list-select "Choose Emoji" + (list glyph) + (cons glyph derived)) + (emoji--add-recent glyph) + (insert glyph))))) (defun emoji-list-help () "Display the name of the emoji at point." @@ -476,97 +520,51 @@ the name is not known." (setq parent elem)) (nconc elem (list glyph))))) -(defun emoji--define-transient (&optional alist inhibit-derived - end-function) - (unless alist - (setq alist (cons "Emoji" emoji--labels))) - (let* ((mname (pop alist)) - (name (intern (format "emoji--command-%s" mname))) - (emoji--done-derived (or emoji--done-derived - (make-hash-table :test #'equal))) - (has-subs (consp (cadr alist))) - (layout - (if has-subs - ;; Define sub-maps. - (cl-loop for entry in - (emoji--compute-prefix - (if (equal mname "Emoji") - (cons (list "Recent") alist) - alist)) - collect (list - (car entry) - (emoji--compute-name (cdr entry)) - (if (equal (cadr entry) "Recent") - (emoji--recent-transient end-function) - (emoji--define-transient - (cons (concat mname " > " (cadr entry)) - (cddr entry)))))) - ;; Insert an emoji. - (cl-loop for glyph in alist - for i in (append (number-sequence ?a ?z) - (number-sequence ?A ?Z) - (number-sequence ?0 ?9) - (number-sequence ?! ?/)) - collect (let ((this-glyph glyph)) - (list - (string i) - (emoji--fontify-glyph - glyph inhibit-derived) - (let ((derived - (and (not inhibit-derived) - (not (gethash glyph - emoji--done-derived)) - (gethash glyph emoji--derived)))) - (if derived - ;; We have a derived glyph, so add - ;; another level. - (progn - (setf (gethash glyph - emoji--done-derived) - t) - (emoji--define-transient - (cons (concat mname " " glyph) - (cons glyph derived)) - t end-function)) - ;; Insert the emoji. - (lambda () - (interactive nil not-a-mode) - ;; Allow switching to the correct - ;; buffer. - (when end-function - (funcall end-function)) - (emoji--add-recent this-glyph) - (insert this-glyph))))))))) - (args (apply #'vector mname - (emoji--columnize layout - (if has-subs 2 8))))) - ;; There's probably a better way to do this... - (setf (symbol-function name) - (lambda () - (interactive nil not-a-mode) - (transient-setup name))) - (pcase-let ((`(,class ,slots ,suffixes ,docstr ,_body) - (transient--expand-define-args (list args)))) - (put name 'interactive-only t) - (put name 'function-documentation docstr) - (put name 'transient--prefix - (apply (or class 'transient-prefix) :command name - (cons :variable-pitch (cons t slots)))) - (put name 'transient--layout - (transient-parse-suffixes name suffixes))) - name)) +(defun emoji--layout (command title spec done-derived) + (let ((has-subs (consp (cadr spec)))) + (emoji--columnize + (if has-subs + (cl-loop for (key desc . glyphs) in (emoji--compute-prefix spec) + collect + (list key + (emoji--compute-name (cons desc glyphs)) + command + :class 'emoji--narrow + :title (concat title " > " desc) + :done-derived (or (string-suffix-p "Recent" desc) + done-derived) + :children glyphs)) + (cl-loop for glyph in spec + for char in (emoji--char-sequence) + for key = (string char) + for derived = (and (not (or (eq done-derived t) + (member glyph done-derived))) + (gethash glyph emoji--derived)) + collect + (if derived + (list key + (emoji--fontify-glyph glyph done-derived) + command + :class 'emoji--narrow + :title (concat title " " glyph) + :done-derived (or (eq done-derived t) + (cons glyph done-derived)) + :children (cons glyph derived)) + (list key + (emoji--fontify-glyph glyph done-derived) + 'emoji-insert-glyph)))) + (if has-subs 2 8)))) -(defun emoji--recent-transient (end-function) - "Create a function to display a dynamically generated menu." - (lambda () - (interactive) - (funcall (emoji--define-transient - (cons "Recent" (multisession-value emoji--recent)) - t end-function)))) +(defun emoji--char-sequence () + (append (number-sequence ?a ?z) + (number-sequence ?A ?Z) + (number-sequence ?0 ?9) + (number-sequence ?! ?/))) (defun emoji--add-recent (glyph) "Add GLYPH to the set of recently used emojis." (let ((recent (multisession-value emoji--recent))) + (set-text-properties 0 (length glyph) nil glyph) (setq recent (delete glyph recent)) (push glyph recent) ;; Shorten the list. @@ -684,20 +682,6 @@ We prefer the earliest unique letter." (gethash name emoji--all-bases)))) (cons glyph (gethash glyph emoji--derived)))))) -(defun emoji--choose-emoji () - (pcase-let ((`(,glyph . ,derived) (emoji--read-emoji))) - (if (not derived) - ;; Simple glyph with no derivations. - (progn - (emoji--add-recent glyph) - (insert glyph)) - ;; Choose a derived version. - (let ((emoji--done-derived (make-hash-table :test #'equal))) - (setf (gethash glyph emoji--done-derived) t) - (funcall - (emoji--define-transient - (cons "Choose Emoji" (cons glyph derived)))))))) - (defvar-keymap emoji-zoom-map "+" #'emoji-zoom-increase "-" #'emoji-zoom-decrease) From 51e3f91f50da43f18706410bf6cd096684379daa Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Wed, 15 Feb 2023 05:08:07 +0100 Subject: [PATCH 29/29] ; Auto-commit of loaddefs files. --- lisp/ldefs-boot.el | 123 +++++++++++++++++++++++++++------------------ 1 file changed, 74 insertions(+), 49 deletions(-) diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 73d47804e5d..404bad56a59 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -2780,7 +2780,7 @@ it is disabled. ;;; Generated autoloads from emacs-lisp/byte-opt.el -(register-definition-prefixes "byte-opt" '("byte-" "disassemble-offset")) +(register-definition-prefixes "byte-opt" '("byte" "disassemble-offset")) ;;; Generated autoloads from emacs-lisp/bytecomp.el @@ -2921,7 +2921,7 @@ and corresponding effects. ;;; Generated autoloads from progmodes/c-ts-common.el -(register-definition-prefixes "c-ts-common" '("c-ts-")) +(register-definition-prefixes "c-ts-common" '("c-ts-common-")) ;;; Generated autoloads from progmodes/c-ts-mode.el @@ -7881,36 +7881,53 @@ Display-Line-Numbers mode. (fn &optional ARG)" t) (defvar header-line-indent "" "\ -String to indent at the start if the header line. -This is used in `header-line-indent-mode', and buffers that have -this switched on should have a `header-line-format' that look like: +String of spaces to indent the beginning of header-line due to line numbers. +This is intended to be used in `header-line-format', and requires +the `header-line-indent-mode' to be turned on, in order for the width +of this string to be kept updated when the line-number width changes +on display. An example of a `header-line-format' that uses this +variable might look like this: (\"\" header-line-indent THE-REST...) +where THE-REST is the format string which produces the actual text +of the header-line. Also see `header-line-indent-width'.") (defvar header-line-indent-width 0 "\ -The width of the current line numbers displayed. -This is updated when `header-line-indent-mode' is switched on. - +The width of the current line number display in the window. +This is measured in units of the frame's canonical columns. +This is updated when `header-line-indent-mode' is switched on, +and is intended for use in `:align-to' display specifications +that are part of `header-line-format', when portions of header-line +text should be aligned to respective parts of buffer text. Also see `header-line-indent'.") (autoload 'header-line-indent-mode "display-line-numbers" "\ -Mode to indent the header line in `display-line-numbers-mode' buffers. +Minor mode to help with alignment of header line when line numbers are shown. -This means that the header line will be kept indented so that it -has blank space that's as wide as the displayed line numbers in -the buffer. +This minor mode should be turned on in buffers which display header-line +that needs to be aligned with buffer text when `display-line-numbers-mode' +is turned on in the buffer. -Buffers that have this switched on should have a -`header-line-format' that look like: +Buffers that have this switched on should have a `header-line-format' +that uses the `header-line-indent' or the `header-line-indent-width' +variables, which this mode will keep up-to-date with the current +display of line numbers. For example, a `header-line-format' that +looks like this: (\"\" header-line-indent THE-REST...) -The `header-line-indent-width' variable is also kept updated, and -has the width of `header-line-format'. This can be used, for -instance, in `:align-to' specs, like: +will make sure the text produced by THE-REST (which should be +a header-line format string) is always indented to be aligned on +display with the first column of buffer text. + +The `header-line-indent-width' variable is also kept updated, +and can be used, for instance, in `:align-to' specs as part +of `header-line-format', like this: (space :align-to (+ header-line-indent-width 10)) +See also `line-number-display-width'. + This is a minor mode. If called interactively, toggle the `Header-Line-Indent mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable @@ -9741,15 +9758,9 @@ Emerge two RCS revisions of a file, with another revision as ancestor. ;;; Generated autoloads from international/emoji.el -(autoload 'emoji-insert "emoji" "\ -Choose and insert an emoji glyph." t) -(autoload 'emoji-recent "emoji" "\ -Choose and insert one of the recently-used emoji glyphs." t) -(autoload 'emoji-search "emoji" "\ -Choose and insert an emoji glyph by typing its Unicode name. -This command prompts for an emoji name, with completion, and -inserts it. It recognizes the Unicode Standard names of emoji, -and also consults the `emoji-alternate-names' alist." t) + (autoload 'emoji-insert "emoji" nil t) + (autoload 'emoji-recent "emoji" nil t) + (autoload 'emoji-search "emoji" nil t) (autoload 'emoji-list "emoji" "\ List emojis and insert the one that's selected. Select the emoji by typing \\\\[emoji-list-select] on its picture. @@ -9765,6 +9776,11 @@ If called from Lisp, return the name as a string; return nil if the name is not known. (fn GLYPH &optional INTERACTIVE)" t) + (autoload 'emoji-list-select "emoji" nil t) +(autoload 'emoji--init "emoji" "\ + + +(fn &optional FORCE INHIBIT-ADJUST)") (autoload 'emoji-zoom-increase "emoji" "\ Increase the size of the character under point. FACTOR is the multiplication factor for the size. @@ -15821,7 +15837,7 @@ it is disabled. ;;; Generated autoloads from progmodes/hideshow.el -(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 "{\\|<[^/>]*?" "}\\|]*[^/]>" "