diff options
| author | Po Lu | 2023-02-15 12:24:22 +0800 |
|---|---|---|
| committer | Po Lu | 2023-02-15 12:24:22 +0800 |
| commit | a62fa69ec9ee847bd0031f3e39a36d00305d3fba (patch) | |
| tree | d5f03a4823ac88a1386d7017904f32be1ce5c481 | |
| parent | a158c1d5b964fda36f752998cef076d581dc4df4 (diff) | |
| parent | 51e3f91f50da43f18706410bf6cd096684379daa (diff) | |
| download | emacs-a62fa69ec9ee847bd0031f3e39a36d00305d3fba.tar.gz emacs-a62fa69ec9ee847bd0031f3e39a36d00305d3fba.zip | |
Merge remote-tracking branch 'origin/master' into feature/android
33 files changed, 600 insertions, 465 deletions
diff --git a/configure.ac b/configure.ac index fc95bcd09b6..b4fed263cf5 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -4185,8 +4185,12 @@ XWIDGETS_OBJ= | |||
| 4185 | if test "$with_xwidgets" != "no"; then | 4185 | if test "$with_xwidgets" != "no"; then |
| 4186 | if test "$USE_GTK_TOOLKIT" = "GTK3" && test "$window_system" != "none"; then | 4186 | if test "$USE_GTK_TOOLKIT" = "GTK3" && test "$window_system" != "none"; then |
| 4187 | WEBKIT_REQUIRED=2.12 | 4187 | WEBKIT_REQUIRED=2.12 |
| 4188 | WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED" | 4188 | WEBKIT_MODULES="webkit2gtk-4.1 >= $WEBKIT_REQUIRED" |
| 4189 | EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES]) | 4189 | EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES]) |
| 4190 | if test "$HAVE_WEBKIT" = "no"; then | ||
| 4191 | WEBKIT_MODULES="webkit2gtk-4.0 >= $WEBKIT_REQUIRED" | ||
| 4192 | EMACS_CHECK_MODULES([WEBKIT], [$WEBKIT_MODULES]) | ||
| 4193 | fi | ||
| 4190 | HAVE_XWIDGETS=$HAVE_WEBKIT | 4194 | HAVE_XWIDGETS=$HAVE_WEBKIT |
| 4191 | XWIDGETS_OBJ="xwidget.o" | 4195 | XWIDGETS_OBJ="xwidget.o" |
| 4192 | if test "$HAVE_X_WINDOWS" = "yes" && test "${with_cairo}" = "no"; then | 4196 | if test "$HAVE_X_WINDOWS" = "yes" && test "${with_cairo}" = "no"; then |
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi index deb1021283f..55f07e86f76 100644 --- a/doc/lispref/internals.texi +++ b/doc/lispref/internals.texi | |||
| @@ -2553,7 +2553,7 @@ variable names have underscores replaced with dashes. For instance, | |||
| 2553 | @code{mode_line_format} stores the value of @code{mode-line-format}. | 2553 | @code{mode_line_format} stores the value of @code{mode-line-format}. |
| 2554 | 2554 | ||
| 2555 | @item overlays | 2555 | @item overlays |
| 2556 | The inveral tree containing this buffer's overlays. | 2556 | The interval tree containing this buffer's overlays. |
| 2557 | 2557 | ||
| 2558 | @item last_selected_window | 2558 | @item last_selected_window |
| 2559 | This is the last window that was selected with this buffer in it, or @code{nil} | 2559 | This is the last window that was selected with this buffer in it, or @code{nil} |
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: | |||
| 5291 | Set a property in the current entry. Both the property and the | 5291 | Set a property in the current entry. Both the property and the |
| 5292 | value can be inserted using completion. | 5292 | value can be inserted using completion. |
| 5293 | 5293 | ||
| 5294 | - {{{kbd(S-RIGHT)}}} (~org-property-next-allowed-values~), {{{kbd(S-LEFT)}}} (~org-property-previous-allowed-value~) :: | 5294 | - {{{kbd(S-RIGHT)}}} (~org-property-next-allowed-value~), {{{kbd(S-LEFT)}}} (~org-property-previous-allowed-value~) :: |
| 5295 | 5295 | ||
| 5296 | #+kindex: S-RIGHT | 5296 | #+kindex: S-RIGHT |
| 5297 | #+kindex: S-LEFT | 5297 | #+kindex: S-LEFT |
| @@ -10252,9 +10252,9 @@ the other commands, point needs to be in the desired line. | |||
| 10252 | 10252 | ||
| 10253 | Unmark entry for bulk action. | 10253 | Unmark entry for bulk action. |
| 10254 | 10254 | ||
| 10255 | - {{{kbd(U)}}} (~org-agenda-bulk-remove-all-marks~) :: | 10255 | - {{{kbd(U)}}} (~org-agenda-bulk-unmark-all~) :: |
| 10256 | #+kindex: U | 10256 | #+kindex: U |
| 10257 | #+findex: org-agenda-bulk-remove-all-marks | 10257 | #+findex: org-agenda-bulk-unmark-all |
| 10258 | 10258 | ||
| 10259 | Unmark all marked entries for bulk action. | 10259 | Unmark all marked entries for bulk action. |
| 10260 | 10260 | ||
| @@ -11692,9 +11692,9 @@ When the variable ~org-export-dispatch-use-expert-ui~ is set to | |||
| 11692 | a non-~nil~ value, Org prompts in the minibuffer. To switch back to | 11692 | a non-~nil~ value, Org prompts in the minibuffer. To switch back to |
| 11693 | the hierarchical menu, press {{{kbd(?)}}}. | 11693 | the hierarchical menu, press {{{kbd(?)}}}. |
| 11694 | 11694 | ||
| 11695 | - {{{kbd(C-c C-e)}}} (~org-export~) :: | 11695 | - {{{kbd(C-c C-e)}}} (~org-export-dispatch~) :: |
| 11696 | #+kindex: C-c C-e | 11696 | #+kindex: C-c C-e |
| 11697 | #+findex: org-export | 11697 | #+findex: org-export-dispatch |
| 11698 | 11698 | ||
| 11699 | Invokes the export dispatcher interface. The options show default | 11699 | Invokes the export dispatcher interface. The options show default |
| 11700 | settings. The {{{kbd(C-u)}}} prefix argument preserves options from | 11700 | settings. The {{{kbd(C-u)}}} prefix argument preserves options from |
| @@ -12232,7 +12232,7 @@ with the custom ID =theory=, you can use | |||
| 12232 | 12232 | ||
| 12233 | The following command allows navigating to the included document: | 12233 | The following command allows navigating to the included document: |
| 12234 | 12234 | ||
| 12235 | - {{{kbd(C-c ')}}} (~org-edit~special~) :: | 12235 | - {{{kbd(C-c ')}}} (~org-edit-special~) :: |
| 12236 | #+kindex: C-c ' | 12236 | #+kindex: C-c ' |
| 12237 | #+findex: org-edit-special | 12237 | #+findex: org-edit-special |
| 12238 | 12238 | ||
| @@ -14363,10 +14363,10 @@ executable. Without it, export cannot finish. | |||
| 14363 | :DESCRIPTION: Invoking export. | 14363 | :DESCRIPTION: Invoking export. |
| 14364 | :END: | 14364 | :END: |
| 14365 | 14365 | ||
| 14366 | - {{{kbd(C-c C-e o o)}}} (~org-export-to-odt~) :: | 14366 | - {{{kbd(C-c C-e o o)}}} (~org-odt-export-to-odt~) :: |
| 14367 | 14367 | ||
| 14368 | #+kindex: C-c C-e o o | 14368 | #+kindex: C-c C-e o o |
| 14369 | #+findex: org-export-to-odt | 14369 | #+findex: org-odt-export-to-odt |
| 14370 | Export as OpenDocument Text file. | 14370 | Export as OpenDocument Text file. |
| 14371 | 14371 | ||
| 14372 | #+cindex: @samp{EXPORT_FILE_NAME}, property | 14372 | #+cindex: @samp{EXPORT_FILE_NAME}, property |
| @@ -83,50 +83,9 @@ mistaken compositions, this will now work as well. | |||
| 83 | This works like 'kill-matching-buffers', but without asking for | 83 | This works like 'kill-matching-buffers', but without asking for |
| 84 | confirmation. | 84 | confirmation. |
| 85 | 85 | ||
| 86 | +++ | ||
| 87 | ** New helper variable 'transpose-sexps-function'. | ||
| 88 | Emacs now can set this variable to customize the behavior of the | ||
| 89 | 'transpose-sexps' function. | ||
| 90 | |||
| 91 | +++ | ||
| 92 | ** New function 'transpose-sexps-default-function'. | ||
| 93 | The previous implementation is moved into its own function, to be | ||
| 94 | bound by 'transpose-sexps-function'. | ||
| 95 | |||
| 96 | ** New function 'treesit-transpose-sexps'. | ||
| 97 | Tree-sitter now unconditionally sets 'transpose-sexps-function' for all | ||
| 98 | tree-sitter enabled modes. This functionality utilizes the new | ||
| 99 | 'transpose-sexps-function'. | ||
| 100 | |||
| 101 | ** Commands and variables to move by program statements | ||
| 102 | |||
| 103 | *** New variable 'forward-sentence-function'. | ||
| 104 | Major modes can now set this variable to customize the behavior of the | ||
| 105 | 'forward-sentence' command. | ||
| 106 | |||
| 107 | *** New function 'forward-sentence-default-function'. | ||
| 108 | The previous implementation of 'forward-sentence' is moved into its | ||
| 109 | own function, to be bound by 'forward-sentence-function'. | ||
| 110 | |||
| 111 | *** New buffer-local variable 'treesit-sentence-type-regexp'. | ||
| 112 | Similarly to 'treesit-defun-type-regexp', this variable is used to | ||
| 113 | define "sentences" in tree-sitter enabled modes. | ||
| 114 | |||
| 115 | *** New function 'treesit-forward-sentence'. | ||
| 116 | All tree-sitter enabled modes that define 'treesit-sentence-type-regexp' | ||
| 117 | now set 'forward-sentence-function' to call 'treesit-forward-sentence'. | ||
| 118 | |||
| 119 | *** New buffer-local variable 'treesit-sexp-type-regexp'. | ||
| 120 | Similarly to 'treesit-defun-type-regexp', this variable is used to | ||
| 121 | define "sexps" in tree-sitter enabled modes. | ||
| 122 | |||
| 123 | *** New function 'treesit-forward-sexp'. | ||
| 124 | Tree-sitter conditionally sets 'forward-sexp-function' for major modes | ||
| 125 | that have defined 'treesit-sexp-type-regexp' to enable sexp-related | ||
| 126 | motion commands. | ||
| 127 | |||
| 128 | 86 | ||
| 129 | * Changes in Specialized Modes and Packages in Emacs 30.1 | 87 | * Changes in Specialized Modes and Packages in Emacs 30.1 |
| 88 | |||
| 130 | --- | 89 | --- |
| 131 | ** Variable order and truncation can now be configured in 'gdb-many-windows'. | 90 | ** Variable order and truncation can now be configured in 'gdb-many-windows'. |
| 132 | The new user option 'gdb-locals-table-row-config' allows users to | 91 | The new user option 'gdb-locals-table-row-config' allows users to |
| @@ -265,11 +224,59 @@ these built in programs in a subprocess. | |||
| 265 | When a 'touchscreen-begin' or 'touchscreen-end' event is passed as the | 224 | When a 'touchscreen-begin' or 'touchscreen-end' event is passed as the |
| 266 | POSITION argument, it will behave as if that event was a mouse event. | 225 | POSITION argument, it will behave as if that event was a mouse event. |
| 267 | 226 | ||
| 227 | +++ | ||
| 268 | ** New functions for handling touch screen events. | 228 | ** New functions for handling touch screen events. |
| 269 | The new functions 'touch-screen-track-tap' and | 229 | The new functions 'touch-screen-track-tap' and |
| 270 | 'touch-screen-track-drag' handle tracking common touch screen gestures | 230 | 'touch-screen-track-drag' handle tracking common touch screen gestures |
| 271 | from within a command. | 231 | from within a command. |
| 272 | 232 | ||
| 233 | ** Functions and variables to transpose sexps | ||
| 234 | |||
| 235 | +++ | ||
| 236 | *** New helper variable 'transpose-sexps-function'. | ||
| 237 | Emacs now can set this variable to customize the behavior of the | ||
| 238 | 'transpose-sexps' function. | ||
| 239 | |||
| 240 | +++ | ||
| 241 | *** New function 'transpose-sexps-default-function'. | ||
| 242 | The previous implementation is moved into its own function, to be | ||
| 243 | bound by 'transpose-sexps-function'. | ||
| 244 | |||
| 245 | *** New function 'treesit-transpose-sexps'. | ||
| 246 | Tree-sitter now unconditionally sets 'transpose-sexps-function' for all | ||
| 247 | tree-sitter enabled modes. This functionality utilizes the new | ||
| 248 | 'transpose-sexps-function'. | ||
| 249 | |||
| 250 | ** Functions and variables to move by program statements | ||
| 251 | |||
| 252 | *** New variable 'forward-sentence-function'. | ||
| 253 | Major modes can now set this variable to customize the behavior of the | ||
| 254 | 'forward-sentence' command. | ||
| 255 | |||
| 256 | *** New function 'forward-sentence-default-function'. | ||
| 257 | The previous implementation of 'forward-sentence' is moved into its | ||
| 258 | own function, to be bound by 'forward-sentence-function'. | ||
| 259 | |||
| 260 | *** New buffer-local variable 'treesit-sentence-type-regexp'. | ||
| 261 | Similarly to 'treesit-defun-type-regexp', this variable is used to | ||
| 262 | define "sentences" in tree-sitter enabled modes. | ||
| 263 | |||
| 264 | *** New function 'treesit-forward-sentence'. | ||
| 265 | All tree-sitter enabled modes that define 'treesit-sentence-type-regexp' | ||
| 266 | now set 'forward-sentence-function' to call 'treesit-forward-sentence'. | ||
| 267 | |||
| 268 | ** Functions and variables to move by program sexps | ||
| 269 | |||
| 270 | *** New buffer-local variable 'treesit-sexp-type-regexp'. | ||
| 271 | Similarly to 'treesit-defun-type-regexp', this variable is used to | ||
| 272 | define "sexps" in tree-sitter enabled modes. | ||
| 273 | |||
| 274 | *** New function 'treesit-forward-sexp'. | ||
| 275 | Tree-sitter conditionally sets 'forward-sexp-function' for major modes | ||
| 276 | that have defined 'treesit-sexp-type-regexp' to enable sexp-related | ||
| 277 | motion commands. | ||
| 278 | >>>>>>> origin/master | ||
| 279 | |||
| 273 | ** New or changed byte-compilation warnings | 280 | ** New or changed byte-compilation warnings |
| 274 | 281 | ||
| 275 | --- | 282 | --- |
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." | |||
| 383 | "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)" | 383 | "\\(?:" (regexp-opt password-word-equivalents) "\\|Response\\)" |
| 384 | "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?" | 384 | "\\(?:\\(?:, try\\)? *again\\| (empty for no passphrase)\\| (again)\\)?" |
| 385 | ;; "[[:alpha:]]" used to be "for", which fails to match non-English. | 385 | ;; "[[:alpha:]]" used to be "for", which fails to match non-English. |
| 386 | "\\(?: [[:alpha:]]+ .+\\)?[[:blank:]]*[::៖][[:space:]]*\\'" | 386 | "\\(?: [[:alpha:]]+ .+\\)?[[:blank:]]*" |
| 387 | "[" (apply #'string password-colon-equivalents) "][[:space:]]*\\'" | ||
| 387 | ;; The ccrypt encryption dialog doesn't end with a colon, so | 388 | ;; The ccrypt encryption dialog doesn't end with a colon, so |
| 388 | ;; treat it specially. | 389 | ;; treat it specially. |
| 389 | "\\|^Enter encryption key: (repeat) *\\'" | 390 | "\\|^Enter encryption key: (repeat) *\\'" |
diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 833e88887f9..b578b99954c 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." | |||
| 2042 | (let ((side-effect-free (if byte-compile-delete-errors | 2042 | (let ((side-effect-free (if byte-compile-delete-errors |
| 2043 | byte-compile-side-effect-free-ops | 2043 | byte-compile-side-effect-free-ops |
| 2044 | byte-compile-side-effect-and-error-free-ops)) | 2044 | byte-compile-side-effect-and-error-free-ops)) |
| 2045 | ;; Ops taking and produce a single value on the stack. | ||
| 2046 | (unary-ops '( byte-not byte-length byte-list1 byte-nreverse | ||
| 2047 | byte-car byte-cdr byte-car-safe byte-cdr-safe | ||
| 2048 | byte-symbolp byte-consp byte-stringp | ||
| 2049 | byte-listp byte-integerp byte-numberp | ||
| 2050 | byte-add1 byte-sub1 byte-negate | ||
| 2051 | ;; There are more of these but the list is | ||
| 2052 | ;; getting long and the gain is typically small. | ||
| 2053 | )) | ||
| 2054 | ;; Ops producing a single result without looking at the stack. | ||
| 2055 | (producer-ops '( byte-constant byte-varref | ||
| 2056 | byte-point byte-point-max byte-point-min | ||
| 2057 | byte-following-char byte-preceding-char | ||
| 2058 | byte-current-column | ||
| 2059 | byte-eolp byte-eobp byte-bolp byte-bobp | ||
| 2060 | byte-current-buffer byte-widen)) | ||
| 2045 | (add-depth 0) | 2061 | (add-depth 0) |
| 2046 | (keep-going 'first-time) | 2062 | (keep-going 'first-time) |
| 2047 | ;; Create a cons cell as head of the list so that removing the first | 2063 | ;; Create a cons cell as head of the list so that removing the first |
| @@ -2151,31 +2167,39 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." | |||
| 2151 | ;; be larger than necessary. | 2167 | ;; be larger than necessary. |
| 2152 | (setq add-depth 1)) | 2168 | (setq add-depth 1)) |
| 2153 | t))))) | 2169 | t))))) |
| 2154 | ;; | 2170 | ;; |
| 2155 | ;; dup varset-X discard --> varset-X | 2171 | ;; dup varset discard(N) --> varset discard(N-1) |
| 2156 | ;; dup varbind-X discard --> varbind-X | 2172 | ;; dup varbind discard(N) --> varbind discard(N-1) |
| 2157 | ;; dup stack-set-X discard --> stack-set-X-1 | 2173 | ;; dup stack-set(M) discard(N) --> stack-set(M-1) discard(N-1), M>1 |
| 2158 | ;; (the varbind variant can emerge from other optimizations) | 2174 | ;; (the varbind variant can emerge from other optimizations) |
| 2159 | ;; | 2175 | ;; |
| 2160 | ((and (eq 'byte-dup (car lap0)) | 2176 | ((and (eq 'byte-dup (car lap0)) |
| 2161 | (eq 'byte-discard (car lap2)) | 2177 | (memq (car lap2) '(byte-discard byte-discardN)) |
| 2162 | (memq (car lap1) '(byte-varset byte-varbind | 2178 | (or (memq (car lap1) '(byte-varset byte-varbind)) |
| 2163 | byte-stack-set))) | 2179 | (and (eq (car lap1) 'byte-stack-set) |
| 2164 | (setq keep-going t) | 2180 | (> (cdr lap1) 1)))) |
| 2165 | (setcdr prev (cdr rest)) ; remove dup | 2181 | (setcdr prev (cdr rest)) ; remove dup |
| 2166 | (setcdr (cdr rest) (cdddr rest)) ; remove discard | 2182 | (let ((new1 (if (eq (car lap1) 'byte-stack-set) |
| 2167 | (cond ((not (eq (car lap1) 'byte-stack-set)) | 2183 | (cons 'byte-stack-set (1- (cdr lap1))) |
| 2168 | (byte-compile-log-lap " %s %s %s\t-->\t%s" | 2184 | lap1)) |
| 2169 | lap0 lap1 lap2 lap1)) | 2185 | (n (if (eq (car lap2) 'byte-discard) 1 (cdr lap2)))) |
| 2170 | ((eql (cdr lap1) 1) | 2186 | (setcar (cdr rest) new1) |
| 2171 | (byte-compile-log-lap " %s %s %s\t-->\t<deleted>" | 2187 | (cl-assert (> n 0)) |
| 2172 | lap0 lap1 lap2)) | 2188 | (cond |
| 2173 | (t | 2189 | ((> n 1) |
| 2174 | (let ((n (1- (cdr lap1)))) | 2190 | (let ((new2 (if (> n 2) |
| 2175 | (byte-compile-log-lap " %s %s %s\t-->\t%s" | 2191 | (cons 'byte-discardN (1- n)) |
| 2176 | lap0 lap1 lap2 | 2192 | (cons 'byte-discard nil)))) |
| 2177 | (cons (car lap1) n)) | 2193 | (byte-compile-log-lap " %s %s %s\t-->\t%s %s" |
| 2178 | (setcdr lap1 n))))) | 2194 | lap0 lap1 lap2 new1 new2) |
| 2195 | (setcar (cddr rest) new2))) | ||
| 2196 | (t | ||
| 2197 | (byte-compile-log-lap " %s %s %s\t-->\t%s" | ||
| 2198 | lap0 lap1 lap2 new1) | ||
| 2199 | ;; discard(0) = nop, remove | ||
| 2200 | (setcdr (cdr rest) (cdddr rest))))) | ||
| 2201 | (setq keep-going t)) | ||
| 2202 | |||
| 2179 | ;; | 2203 | ;; |
| 2180 | ;; not goto-X-if-nil --> goto-X-if-non-nil | 2204 | ;; not goto-X-if-nil --> goto-X-if-non-nil |
| 2181 | ;; not goto-X-if-non-nil --> goto-X-if-nil | 2205 | ;; not goto-X-if-non-nil --> goto-X-if-nil |
| @@ -2421,12 +2445,7 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." | |||
| 2421 | ;; const, varref, point etc. | 2445 | ;; const, varref, point etc. |
| 2422 | ;; | 2446 | ;; |
| 2423 | ((and (eq (car (nth 2 rest)) 'byte-return) | 2447 | ((and (eq (car (nth 2 rest)) 'byte-return) |
| 2424 | (memq (car lap1) '( byte-constant byte-varref | 2448 | (memq (car lap1) producer-ops) |
| 2425 | byte-point byte-point-max byte-point-min | ||
| 2426 | byte-following-char byte-preceding-char | ||
| 2427 | byte-current-column | ||
| 2428 | byte-eolp byte-eobp byte-bolp byte-bobp | ||
| 2429 | byte-current-buffer byte-widen)) | ||
| 2430 | (or (memq (car lap0) '( byte-discard byte-discardN | 2449 | (or (memq (car lap0) '( byte-discard byte-discardN |
| 2431 | byte-discardN-preserve-tos | 2450 | byte-discardN-preserve-tos |
| 2432 | byte-stack-set)) | 2451 | byte-stack-set)) |
| @@ -2438,26 +2457,15 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." | |||
| 2438 | lap0 lap1 (nth 2 rest) lap1 (nth 2 rest))) | 2457 | lap0 lap1 (nth 2 rest) lap1 (nth 2 rest))) |
| 2439 | 2458 | ||
| 2440 | ;; | 2459 | ;; |
| 2441 | ;; discardN-preserve-tos OP return --> OP return | 2460 | ;; (discardN-preserve-tos|dup) UNARY return --> UNARY return |
| 2442 | ;; dup OP return --> OP return | 2461 | ;; where UNARY takes and produces a single value on the stack |
| 2443 | ;; where OP is 1->1 in stack use, like `not'. | ||
| 2444 | ;; | 2462 | ;; |
| 2445 | ;; FIXME: ideally we should run this backwards, so that we could do | 2463 | ;; FIXME: ideally we should run this backwards, so that we could do |
| 2446 | ;; discardN-preserve-tos OP1...OPn return -> OP1..OPn return | 2464 | ;; discardN-preserve-tos OP1...OPn return -> OP1..OPn return |
| 2447 | ;; but that would require a different approach. | 2465 | ;; but that would require a different approach. |
| 2448 | ;; | 2466 | ;; |
| 2449 | ((and (eq (car (nth 2 rest)) 'byte-return) | 2467 | ((and (eq (car (nth 2 rest)) 'byte-return) |
| 2450 | (memq (car lap1) | 2468 | (memq (car lap1) unary-ops) |
| 2451 | '( byte-not | ||
| 2452 | byte-symbolp byte-consp byte-stringp | ||
| 2453 | byte-listp byte-integerp byte-numberp | ||
| 2454 | byte-list1 | ||
| 2455 | byte-car byte-cdr byte-car-safe byte-cdr-safe | ||
| 2456 | byte-length | ||
| 2457 | byte-add1 byte-sub1 byte-negate byte-nreverse | ||
| 2458 | ;; There are more of these but the list is | ||
| 2459 | ;; getting long and the gain is small. | ||
| 2460 | )) | ||
| 2461 | (or (memq (car lap0) '(byte-discardN-preserve-tos byte-dup)) | 2469 | (or (memq (car lap0) '(byte-discardN-preserve-tos byte-dup)) |
| 2462 | (and (eq (car lap0) 'byte-stack-set) | 2470 | (and (eq (car lap0) 'byte-stack-set) |
| 2463 | (eql (cdr lap0) 1)))) | 2471 | (eql (cdr lap0) 1)))) |
| @@ -2785,14 +2793,32 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." | |||
| 2785 | (push newjmp (cdr rest))) | 2793 | (push newjmp (cdr rest))) |
| 2786 | t))))) | 2794 | t))))) |
| 2787 | 2795 | ||
| 2796 | ;; | ||
| 2797 | ;; UNARY discardN-preserve-tos --> discardN-preserve-tos UNARY | ||
| 2798 | ;; where UNARY takes and produces a single value on the stack | ||
| 2799 | ;; | ||
| 2800 | ((and (memq (car lap0) unary-ops) | ||
| 2801 | (or (eq (car lap1) 'byte-discardN-preserve-tos) | ||
| 2802 | (and (eq (car lap1) 'byte-stack-set) | ||
| 2803 | (eql (cdr lap1) 1))) | ||
| 2804 | ;; unless followed by return (which will eat the discard) | ||
| 2805 | (not (eq (car lap2) 'byte-return))) | ||
| 2806 | (setq keep-going t) | ||
| 2807 | (byte-compile-log-lap " %s %s\t-->\t%s %s" lap0 lap1 lap1 lap0) | ||
| 2808 | (setcar rest lap1) | ||
| 2809 | (setcar (cdr rest) lap0)) | ||
| 2810 | |||
| 2788 | ;; | 2811 | ;; |
| 2789 | ;; const discardN-preserve-tos ==> discardN const | 2812 | ;; PRODUCER discardN-preserve-tos(X) --> discard(X) PRODUCER |
| 2790 | ;; const stack-set(1) ==> discard const | 2813 | ;; where PRODUCER pushes a result without looking at the stack: |
| 2814 | ;; const, varref, point etc. | ||
| 2791 | ;; | 2815 | ;; |
| 2792 | ((and (eq (car lap0) 'byte-constant) | 2816 | ((and (memq (car lap0) producer-ops) |
| 2793 | (or (eq (car lap1) 'byte-discardN-preserve-tos) | 2817 | (or (eq (car lap1) 'byte-discardN-preserve-tos) |
| 2794 | (and (eq (car lap1) 'byte-stack-set) | 2818 | (and (eq (car lap1) 'byte-stack-set) |
| 2795 | (eql (cdr lap1) 1)))) | 2819 | (eql (cdr lap1) 1))) |
| 2820 | ;; unless followed by return (which will eat the discard) | ||
| 2821 | (not (eq (car lap2) 'byte-return))) | ||
| 2796 | (setq keep-going t) | 2822 | (setq keep-going t) |
| 2797 | (let ((newdiscard (if (eql (cdr lap1) 1) | 2823 | (let ((newdiscard (if (eql (cdr lap1) 1) |
| 2798 | (cons 'byte-discard nil) | 2824 | (cons 'byte-discard nil) |
| @@ -2801,6 +2827,7 @@ If FOR-EFFECT is non-nil, the return value is assumed to be of no importance." | |||
| 2801 | " %s %s\t-->\t%s %s" lap0 lap1 newdiscard lap0) | 2827 | " %s %s\t-->\t%s %s" lap0 lap1 newdiscard lap0) |
| 2802 | (setf (car rest) newdiscard) | 2828 | (setf (car rest) newdiscard) |
| 2803 | (setf (cadr rest) lap0))) | 2829 | (setf (cadr rest) lap0))) |
| 2830 | |||
| 2804 | (t | 2831 | (t |
| 2805 | ;; If no rule matched, advance and try again. | 2832 | ;; If no rule matched, advance and try again. |
| 2806 | (setq prev (cdr prev)))))))) | 2833 | (setq prev (cdr prev)))))))) |
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el index 33bd0bfd5cd..bf49f274bfd 100644 --- a/lisp/emacs-lisp/package-vc.el +++ b/lisp/emacs-lisp/package-vc.el | |||
| @@ -134,7 +134,10 @@ the `clone' function." | |||
| 134 | (package-vc-install name spec)) | 134 | (package-vc-install name spec)) |
| 135 | ((listp spec) | 135 | ((listp spec) |
| 136 | (package-vc--archives-initialize) | 136 | (package-vc--archives-initialize) |
| 137 | (package-vc--unpack (cadr pkg-descs) spec))))))) | 137 | (package-vc--unpack |
| 138 | (or (cadr (assoc name package-archive-contents)) | ||
| 139 | (package-desc-create :name name :kind 'vc)) | ||
| 140 | spec))))))) | ||
| 138 | 141 | ||
| 139 | ;;;###autoload | 142 | ;;;###autoload |
| 140 | (defcustom package-vc-selected-packages '() | 143 | (defcustom package-vc-selected-packages '() |
| @@ -269,9 +272,9 @@ Populate `package-vc--archive-spec-alist' with the result. | |||
| 269 | If optional argument ASYNC is non-nil, perform the downloads | 272 | If optional argument ASYNC is non-nil, perform the downloads |
| 270 | asynchronously." | 273 | asynchronously." |
| 271 | (dolist (archive package-archives) | 274 | (dolist (archive package-archives) |
| 272 | (condition-case-unless-debug nil | 275 | (condition-case err |
| 273 | (package--download-one-archive archive "elpa-packages.eld" async) | 276 | (package--download-one-archive archive "elpa-packages.eld" async) |
| 274 | (error (message "Failed to download `%s' archive." (car archive)))))) | 277 | (error (message "Failed to download `%s' archive: %S" (car archive) err))))) |
| 275 | 278 | ||
| 276 | (add-hook 'package-read-archive-hook #'package-vc--read-archive-data 20) | 279 | (add-hook 'package-read-archive-hook #'package-vc--read-archive-data 20) |
| 277 | 280 | ||
| @@ -426,8 +429,8 @@ version of that package." | |||
| 426 | ((let* ((pac package-archive-contents) | 429 | ((let* ((pac package-archive-contents) |
| 427 | (desc (cadr (assoc (car pkg) pac)))) | 430 | (desc (cadr (assoc (car pkg) pac)))) |
| 428 | (if desc | 431 | (if desc |
| 429 | (let ((reqs (package-desc-reqs pkg))) | 432 | (let ((reqs (package-desc-reqs desc))) |
| 430 | (push pkg to-install) | 433 | (push desc to-install) |
| 431 | (mapc #'search reqs)) | 434 | (mapc #'search reqs)) |
| 432 | (push pkg missing)))))) | 435 | (push pkg missing)))))) |
| 433 | (version-order (a b) | 436 | (version-order (a b) |
| @@ -600,8 +603,6 @@ PKG-SPEC is a package specification, a property list describing | |||
| 600 | how to fetch and build the package. See `package-vc--archive-spec-alist' | 603 | how to fetch and build the package. See `package-vc--archive-spec-alist' |
| 601 | for details. The optional argument REV specifies a specific revision to | 604 | for details. The optional argument REV specifies a specific revision to |
| 602 | checkout. This overrides the `:branch' attribute in PKG-SPEC." | 605 | checkout. This overrides the `:branch' attribute in PKG-SPEC." |
| 603 | (unless pkg-desc | ||
| 604 | (setq pkg-desc (package-desc-create :name (car pkg-spec) :kind 'vc))) | ||
| 605 | (pcase-let* (((map :lisp-dir) pkg-spec) | 606 | (pcase-let* (((map :lisp-dir) pkg-spec) |
| 606 | (name (package-desc-name pkg-desc)) | 607 | (name (package-desc-name pkg-desc)) |
| 607 | (dirname (package-desc-full-name pkg-desc)) | 608 | (dirname (package-desc-full-name pkg-desc)) |
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." | |||
| 172 | :type 'hook) | 172 | :type 'hook) |
| 173 | 173 | ||
| 174 | (defcustom eshell-password-prompt-regexp | 174 | (defcustom eshell-password-prompt-regexp |
| 175 | (format "\\(%s\\)[^::៖]*[::៖]\\s *\\'" (regexp-opt password-word-equivalents)) | 175 | (format "%s[^%s]*[%s]\\s *\\'" |
| 176 | (regexp-opt password-word-equivalents t) | ||
| 177 | (apply #'string password-colon-equivalents) | ||
| 178 | (apply #'string password-colon-equivalents)) | ||
| 176 | "Regexp matching prompts for passwords in the inferior process. | 179 | "Regexp matching prompts for passwords in the inferior process. |
| 177 | This is used by `eshell-watch-for-password-prompt'." | 180 | This is used by `eshell-watch-for-password-prompt'." |
| 178 | :type 'regexp | 181 | :type 'regexp |
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: | |||
| 68 | (defvar emoji--all-bases nil) | 68 | (defvar emoji--all-bases nil) |
| 69 | (defvar emoji--derived nil) | 69 | (defvar emoji--derived nil) |
| 70 | (defvar emoji--names (make-hash-table :test #'equal)) | 70 | (defvar emoji--names (make-hash-table :test #'equal)) |
| 71 | (defvar emoji--done-derived nil) | ||
| 72 | (define-multisession-variable emoji--recent (list "😀" "😖")) | 71 | (define-multisession-variable emoji--recent (list "😀" "😖")) |
| 73 | (defvar emoji--insert-buffer) | 72 | (defvar emoji--insert-buffer) |
| 74 | 73 | ||
| 75 | ;;;###autoload | 74 | ;;;###autoload (autoload 'emoji-insert "emoji" nil t) |
| 76 | (defun emoji-insert () | 75 | (transient-define-prefix emoji-insert () |
| 77 | "Choose and insert an emoji glyph." | 76 | "Choose and insert an emoji glyph." |
| 77 | :variable-pitch t | ||
| 78 | [:class transient-columns | ||
| 79 | :setup-children emoji--setup-suffixes | ||
| 80 | :description emoji--group-description] | ||
| 78 | (interactive "*") | 81 | (interactive "*") |
| 79 | (emoji--init) | 82 | (emoji--init) |
| 80 | (unless (fboundp 'emoji--command-Emoji) | 83 | (emoji--setup-prefix 'emoji-insert "Emoji" nil |
| 81 | (emoji--define-transient)) | 84 | `(("Recent" ,@(multisession-value emoji--recent)) |
| 82 | (funcall (intern "emoji--command-Emoji"))) | 85 | ,@emoji--labels))) |
| 83 | 86 | ||
| 84 | ;;;###autoload | 87 | ;;;###autoload (autoload 'emoji-recent "emoji" nil t) |
| 85 | (defun emoji-recent () | 88 | (transient-define-prefix emoji-recent () |
| 86 | "Choose and insert one of the recently-used emoji glyphs." | 89 | "Choose and insert one of the recently-used emoji glyphs." |
| 90 | :variable-pitch t | ||
| 91 | [:class transient-columns | ||
| 92 | :setup-children emoji--setup-suffixes | ||
| 93 | :description emoji--group-description] | ||
| 87 | (interactive "*") | 94 | (interactive "*") |
| 88 | (emoji--init) | 95 | (emoji--init) |
| 89 | (unless (fboundp 'emoji--command-Emoji) | 96 | (emoji--setup-prefix 'emoji-recent "Recent" t |
| 90 | (emoji--define-transient)) | 97 | (multisession-value emoji--recent))) |
| 91 | (funcall (emoji--define-transient | ||
| 92 | (cons "Recent" (multisession-value emoji--recent)) t))) | ||
| 93 | 98 | ||
| 94 | ;;;###autoload | 99 | ;;;###autoload (autoload 'emoji-search "emoji" nil t) |
| 95 | (defun emoji-search () | 100 | (transient-define-prefix emoji-search () |
| 96 | "Choose and insert an emoji glyph by typing its Unicode name. | 101 | "Choose and insert an emoji glyph by typing its Unicode name. |
| 97 | This command prompts for an emoji name, with completion, and | 102 | This command prompts for an emoji name, with completion, and |
| 98 | inserts it. It recognizes the Unicode Standard names of emoji, | 103 | inserts it. It recognizes the Unicode Standard names of emoji, |
| 99 | and also consults the `emoji-alternate-names' alist." | 104 | and also consults the `emoji-alternate-names' alist." |
| 105 | :variable-pitch t | ||
| 106 | [:class transient-columns | ||
| 107 | :setup-children emoji--setup-suffixes | ||
| 108 | :description emoji--group-description] | ||
| 100 | (interactive "*") | 109 | (interactive "*") |
| 101 | (emoji--init) | 110 | (emoji--init) |
| 102 | (emoji--choose-emoji)) | 111 | (pcase-let ((`(,glyph . ,derived) (emoji--read-emoji))) |
| 112 | (if derived | ||
| 113 | (emoji--setup-prefix 'emoji-search "Choose Emoji" | ||
| 114 | (list glyph) | ||
| 115 | (cons glyph derived)) | ||
| 116 | (emoji--add-recent glyph) | ||
| 117 | (insert glyph)))) | ||
| 118 | |||
| 119 | (defun emoji--setup-prefix (command title done-derived spec) | ||
| 120 | (transient-setup | ||
| 121 | command nil nil | ||
| 122 | :scope (if (eq transient-current-command command) | ||
| 123 | (cons (oref (transient-suffix-object) title) | ||
| 124 | (oref (transient-suffix-object) done-derived)) | ||
| 125 | (cons title done-derived)) | ||
| 126 | :value (if (eq transient-current-command command) | ||
| 127 | (oref (transient-suffix-object) children) | ||
| 128 | spec))) | ||
| 129 | |||
| 130 | (defun emoji--setup-suffixes (_) | ||
| 131 | (transient-parse-suffixes | ||
| 132 | (oref transient--prefix command) | ||
| 133 | (pcase-let ((`(,title . ,done-derived) (oref transient--prefix scope))) | ||
| 134 | (emoji--layout (oref transient--prefix command) title | ||
| 135 | (oref transient--prefix value) done-derived)))) | ||
| 136 | |||
| 137 | (defun emoji--group-description () | ||
| 138 | (car (oref transient--prefix scope))) | ||
| 139 | |||
| 140 | (defclass emoji--narrow (transient-suffix) | ||
| 141 | ((title :initarg :title) | ||
| 142 | (done-derived :initarg :done-derived) | ||
| 143 | (children :initarg :children))) | ||
| 144 | |||
| 145 | (transient-define-suffix emoji-insert-glyph () | ||
| 146 | "Insert the emoji you selected." | ||
| 147 | (interactive nil not-a-mode) | ||
| 148 | (let ((glyph (oref (transient-suffix-object) description))) | ||
| 149 | (emoji--add-recent glyph) | ||
| 150 | (insert glyph))) | ||
| 103 | 151 | ||
| 104 | ;;;###autoload | 152 | ;;;###autoload |
| 105 | (defun emoji-list () | 153 | (defun emoji-list () |
| @@ -179,11 +227,10 @@ the name is not known." | |||
| 179 | 'help-echo (emoji--name glyph)))) | 227 | 'help-echo (emoji--name glyph)))) |
| 180 | (insert "\n\n")))) | 228 | (insert "\n\n")))) |
| 181 | 229 | ||
| 182 | (defun emoji--fontify-glyph (glyph &optional inhibit-derived) | 230 | (defun emoji--fontify-glyph (glyph &optional done-derived) |
| 183 | (propertize glyph 'face | 231 | (propertize glyph 'face |
| 184 | (if (and (not inhibit-derived) | 232 | (if (and (not (or (eq done-derived t) |
| 185 | (or (null emoji--done-derived) | 233 | (member glyph done-derived))) |
| 186 | (not (gethash glyph emoji--done-derived))) | ||
| 187 | (gethash glyph emoji--derived)) | 234 | (gethash glyph emoji--derived)) |
| 188 | ;; If this emoji has derivations, use a special face | 235 | ;; If this emoji has derivations, use a special face |
| 189 | ;; to tell the user. | 236 | ;; to tell the user. |
| @@ -206,33 +253,30 @@ the name is not known." | |||
| 206 | :interactive nil | 253 | :interactive nil |
| 207 | (setq-local truncate-lines t)) | 254 | (setq-local truncate-lines t)) |
| 208 | 255 | ||
| 209 | (defun emoji-list-select (event) | 256 | ;;;###autoload (autoload 'emoji-list-select "emoji" nil t) |
| 257 | (transient-define-prefix emoji-list-select (event) | ||
| 210 | "Select the emoji under point." | 258 | "Select the emoji under point." |
| 259 | :variable-pitch t | ||
| 260 | [:class transient-columns | ||
| 261 | :setup-children emoji--setup-suffixes | ||
| 262 | :description emoji--group-description] | ||
| 211 | (interactive (list last-nonmenu-event) emoji-list-mode) | 263 | (interactive (list last-nonmenu-event) emoji-list-mode) |
| 212 | (mouse-set-point event) | 264 | (mouse-set-point event) |
| 213 | (let ((glyph (get-text-property (point) 'emoji-glyph))) | 265 | (let ((glyph (get-text-property (point) 'emoji-glyph))) |
| 214 | (unless glyph | 266 | (unless glyph |
| 215 | (error "No emoji under point")) | 267 | (error "No emoji under point")) |
| 216 | (let ((derived (gethash glyph emoji--derived)) | 268 | (let ((buf emoji--insert-buffer)) |
| 217 | (end-func | 269 | (quit-window) |
| 218 | (lambda () | 270 | (if (buffer-live-p buf) |
| 219 | (let ((buf emoji--insert-buffer)) | 271 | (switch-to-buffer buf) |
| 220 | (quit-window) | 272 | (error "Buffer disappeared"))) |
| 221 | (if (buffer-live-p buf) | 273 | (let ((derived (gethash glyph emoji--derived))) |
| 222 | (switch-to-buffer buf) | 274 | (if derived |
| 223 | (error "Buffer disappeared")))))) | 275 | (emoji--setup-prefix 'emoji-list-select "Choose Emoji" |
| 224 | (if (not derived) | 276 | (list glyph) |
| 225 | ;; Glyph without derivations. | 277 | (cons glyph derived)) |
| 226 | (progn | 278 | (emoji--add-recent glyph) |
| 227 | (emoji--add-recent glyph) | 279 | (insert glyph))))) |
| 228 | (funcall end-func) | ||
| 229 | (insert glyph)) | ||
| 230 | ;; Pop up a transient to choose between derivations. | ||
| 231 | (let ((emoji--done-derived (make-hash-table :test #'equal))) | ||
| 232 | (setf (gethash glyph emoji--done-derived) t) | ||
| 233 | (funcall | ||
| 234 | (emoji--define-transient (cons "Choose Emoji" (cons glyph derived)) | ||
| 235 | nil end-func))))))) | ||
| 236 | 280 | ||
| 237 | (defun emoji-list-help () | 281 | (defun emoji-list-help () |
| 238 | "Display the name of the emoji at point." | 282 | "Display the name of the emoji at point." |
| @@ -476,97 +520,51 @@ the name is not known." | |||
| 476 | (setq parent elem)) | 520 | (setq parent elem)) |
| 477 | (nconc elem (list glyph))))) | 521 | (nconc elem (list glyph))))) |
| 478 | 522 | ||
| 479 | (defun emoji--define-transient (&optional alist inhibit-derived | 523 | (defun emoji--layout (command title spec done-derived) |
| 480 | end-function) | 524 | (let ((has-subs (consp (cadr spec)))) |
| 481 | (unless alist | 525 | (emoji--columnize |
| 482 | (setq alist (cons "Emoji" emoji--labels))) | 526 | (if has-subs |
| 483 | (let* ((mname (pop alist)) | 527 | (cl-loop for (key desc . glyphs) in (emoji--compute-prefix spec) |
| 484 | (name (intern (format "emoji--command-%s" mname))) | 528 | collect |
| 485 | (emoji--done-derived (or emoji--done-derived | 529 | (list key |
| 486 | (make-hash-table :test #'equal))) | 530 | (emoji--compute-name (cons desc glyphs)) |
| 487 | (has-subs (consp (cadr alist))) | 531 | command |
| 488 | (layout | 532 | :class 'emoji--narrow |
| 489 | (if has-subs | 533 | :title (concat title " > " desc) |
| 490 | ;; Define sub-maps. | 534 | :done-derived (or (string-suffix-p "Recent" desc) |
| 491 | (cl-loop for entry in | 535 | done-derived) |
| 492 | (emoji--compute-prefix | 536 | :children glyphs)) |
| 493 | (if (equal mname "Emoji") | 537 | (cl-loop for glyph in spec |
| 494 | (cons (list "Recent") alist) | 538 | for char in (emoji--char-sequence) |
| 495 | alist)) | 539 | for key = (string char) |
| 496 | collect (list | 540 | for derived = (and (not (or (eq done-derived t) |
| 497 | (car entry) | 541 | (member glyph done-derived))) |
| 498 | (emoji--compute-name (cdr entry)) | 542 | (gethash glyph emoji--derived)) |
| 499 | (if (equal (cadr entry) "Recent") | 543 | collect |
| 500 | (emoji--recent-transient end-function) | 544 | (if derived |
| 501 | (emoji--define-transient | 545 | (list key |
| 502 | (cons (concat mname " > " (cadr entry)) | 546 | (emoji--fontify-glyph glyph done-derived) |
| 503 | (cddr entry)))))) | 547 | command |
| 504 | ;; Insert an emoji. | 548 | :class 'emoji--narrow |
| 505 | (cl-loop for glyph in alist | 549 | :title (concat title " " glyph) |
| 506 | for i in (append (number-sequence ?a ?z) | 550 | :done-derived (or (eq done-derived t) |
| 507 | (number-sequence ?A ?Z) | 551 | (cons glyph done-derived)) |
| 508 | (number-sequence ?0 ?9) | 552 | :children (cons glyph derived)) |
| 509 | (number-sequence ?! ?/)) | 553 | (list key |
| 510 | collect (let ((this-glyph glyph)) | 554 | (emoji--fontify-glyph glyph done-derived) |
| 511 | (list | 555 | 'emoji-insert-glyph)))) |
| 512 | (string i) | 556 | (if has-subs 2 8)))) |
| 513 | (emoji--fontify-glyph | 557 | |
| 514 | glyph inhibit-derived) | 558 | (defun emoji--char-sequence () |
| 515 | (let ((derived | 559 | (append (number-sequence ?a ?z) |
| 516 | (and (not inhibit-derived) | 560 | (number-sequence ?A ?Z) |
| 517 | (not (gethash glyph | 561 | (number-sequence ?0 ?9) |
| 518 | emoji--done-derived)) | 562 | (number-sequence ?! ?/))) |
| 519 | (gethash glyph emoji--derived)))) | ||
| 520 | (if derived | ||
| 521 | ;; We have a derived glyph, so add | ||
| 522 | ;; another level. | ||
| 523 | (progn | ||
| 524 | (setf (gethash glyph | ||
| 525 | emoji--done-derived) | ||
| 526 | t) | ||
| 527 | (emoji--define-transient | ||
| 528 | (cons (concat mname " " glyph) | ||
| 529 | (cons glyph derived)) | ||
| 530 | t end-function)) | ||
| 531 | ;; Insert the emoji. | ||
| 532 | (lambda () | ||
| 533 | (interactive nil not-a-mode) | ||
| 534 | ;; Allow switching to the correct | ||
| 535 | ;; buffer. | ||
| 536 | (when end-function | ||
| 537 | (funcall end-function)) | ||
| 538 | (emoji--add-recent this-glyph) | ||
| 539 | (insert this-glyph))))))))) | ||
| 540 | (args (apply #'vector mname | ||
| 541 | (emoji--columnize layout | ||
| 542 | (if has-subs 2 8))))) | ||
| 543 | ;; There's probably a better way to do this... | ||
| 544 | (setf (symbol-function name) | ||
| 545 | (lambda () | ||
| 546 | (interactive nil not-a-mode) | ||
| 547 | (transient-setup name))) | ||
| 548 | (pcase-let ((`(,class ,slots ,suffixes ,docstr ,_body) | ||
| 549 | (transient--expand-define-args (list args)))) | ||
| 550 | (put name 'interactive-only t) | ||
| 551 | (put name 'function-documentation docstr) | ||
| 552 | (put name 'transient--prefix | ||
| 553 | (apply (or class 'transient-prefix) :command name | ||
| 554 | (cons :variable-pitch (cons t slots)))) | ||
| 555 | (put name 'transient--layout | ||
| 556 | (transient-parse-suffixes name suffixes))) | ||
| 557 | name)) | ||
| 558 | |||
| 559 | (defun emoji--recent-transient (end-function) | ||
| 560 | "Create a function to display a dynamically generated menu." | ||
| 561 | (lambda () | ||
| 562 | (interactive) | ||
| 563 | (funcall (emoji--define-transient | ||
| 564 | (cons "Recent" (multisession-value emoji--recent)) | ||
| 565 | t end-function)))) | ||
| 566 | 563 | ||
| 567 | (defun emoji--add-recent (glyph) | 564 | (defun emoji--add-recent (glyph) |
| 568 | "Add GLYPH to the set of recently used emojis." | 565 | "Add GLYPH to the set of recently used emojis." |
| 569 | (let ((recent (multisession-value emoji--recent))) | 566 | (let ((recent (multisession-value emoji--recent))) |
| 567 | (set-text-properties 0 (length glyph) nil glyph) | ||
| 570 | (setq recent (delete glyph recent)) | 568 | (setq recent (delete glyph recent)) |
| 571 | (push glyph recent) | 569 | (push glyph recent) |
| 572 | ;; Shorten the list. | 570 | ;; Shorten the list. |
| @@ -684,20 +682,6 @@ We prefer the earliest unique letter." | |||
| 684 | (gethash name emoji--all-bases)))) | 682 | (gethash name emoji--all-bases)))) |
| 685 | (cons glyph (gethash glyph emoji--derived)))))) | 683 | (cons glyph (gethash glyph emoji--derived)))))) |
| 686 | 684 | ||
| 687 | (defun emoji--choose-emoji () | ||
| 688 | (pcase-let ((`(,glyph . ,derived) (emoji--read-emoji))) | ||
| 689 | (if (not derived) | ||
| 690 | ;; Simple glyph with no derivations. | ||
| 691 | (progn | ||
| 692 | (emoji--add-recent glyph) | ||
| 693 | (insert glyph)) | ||
| 694 | ;; Choose a derived version. | ||
| 695 | (let ((emoji--done-derived (make-hash-table :test #'equal))) | ||
| 696 | (setf (gethash glyph emoji--done-derived) t) | ||
| 697 | (funcall | ||
| 698 | (emoji--define-transient | ||
| 699 | (cons "Choose Emoji" (cons glyph derived)))))))) | ||
| 700 | |||
| 701 | (defvar-keymap emoji-zoom-map | 685 | (defvar-keymap emoji-zoom-map |
| 702 | "+" #'emoji-zoom-increase | 686 | "+" #'emoji-zoom-increase |
| 703 | "-" #'emoji-zoom-decrease) | 687 | "-" #'emoji-zoom-decrease) |
diff --git a/lisp/international/mule-conf.el b/lisp/international/mule-conf.el index 979e685e32a..a27aaf9e522 100644 --- a/lisp/international/mule-conf.el +++ b/lisp/international/mule-conf.el | |||
| @@ -1734,6 +1734,20 @@ included; callers should bind `case-fold-search' to t." | |||
| 1734 | :version "27.1" | 1734 | :version "27.1" |
| 1735 | :group 'processes) | 1735 | :group 'processes) |
| 1736 | 1736 | ||
| 1737 | ;; (describe-char-fold-equivalences ?:) | ||
| 1738 | ;; The last entry is taken from history. | ||
| 1739 | (defcustom password-colon-equivalents | ||
| 1740 | '(?\u003a ; ?\N{COLON} | ||
| 1741 | ?\uff1a ; ?\N{FULLWIDTH COLON} | ||
| 1742 | ?\ufe55 ; ?\N{SMALL COLON} | ||
| 1743 | ?\ufe13 ; ?\N{PRESENTATION FORM FOR VERTICAL COLON} | ||
| 1744 | ?\u17d6 ; ?\N{KHMER SIGN CAMNUC PII KUUH} | ||
| 1745 | ) | ||
| 1746 | "List of characters equivalent to trailing colon in \"password\" prompts." | ||
| 1747 | :type '(repeat character) | ||
| 1748 | :version "30.1" | ||
| 1749 | :group 'processes) | ||
| 1750 | |||
| 1737 | ;; The old code-pages library is obsoleted by coding systems based on | 1751 | ;; The old code-pages library is obsoleted by coding systems based on |
| 1738 | ;; the charsets defined in this file but might be required by user | 1752 | ;; the charsets defined in this file but might be required by user |
| 1739 | ;; code. | 1753 | ;; code. |
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. | |||
| 2780 | 2780 | ||
| 2781 | ;;; Generated autoloads from emacs-lisp/byte-opt.el | 2781 | ;;; Generated autoloads from emacs-lisp/byte-opt.el |
| 2782 | 2782 | ||
| 2783 | (register-definition-prefixes "byte-opt" '("byte-" "disassemble-offset")) | 2783 | (register-definition-prefixes "byte-opt" '("byte" "disassemble-offset")) |
| 2784 | 2784 | ||
| 2785 | 2785 | ||
| 2786 | ;;; Generated autoloads from emacs-lisp/bytecomp.el | 2786 | ;;; Generated autoloads from emacs-lisp/bytecomp.el |
| @@ -2921,7 +2921,7 @@ and corresponding effects. | |||
| 2921 | 2921 | ||
| 2922 | ;;; Generated autoloads from progmodes/c-ts-common.el | 2922 | ;;; Generated autoloads from progmodes/c-ts-common.el |
| 2923 | 2923 | ||
| 2924 | (register-definition-prefixes "c-ts-common" '("c-ts-")) | 2924 | (register-definition-prefixes "c-ts-common" '("c-ts-common-")) |
| 2925 | 2925 | ||
| 2926 | 2926 | ||
| 2927 | ;;; Generated autoloads from progmodes/c-ts-mode.el | 2927 | ;;; Generated autoloads from progmodes/c-ts-mode.el |
| @@ -7881,36 +7881,53 @@ Display-Line-Numbers mode. | |||
| 7881 | 7881 | ||
| 7882 | (fn &optional ARG)" t) | 7882 | (fn &optional ARG)" t) |
| 7883 | (defvar header-line-indent "" "\ | 7883 | (defvar header-line-indent "" "\ |
| 7884 | String to indent at the start if the header line. | 7884 | String of spaces to indent the beginning of header-line due to line numbers. |
| 7885 | This is used in `header-line-indent-mode', and buffers that have | 7885 | This is intended to be used in `header-line-format', and requires |
| 7886 | this switched on should have a `header-line-format' that look like: | 7886 | the `header-line-indent-mode' to be turned on, in order for the width |
| 7887 | of this string to be kept updated when the line-number width changes | ||
| 7888 | on display. An example of a `header-line-format' that uses this | ||
| 7889 | variable might look like this: | ||
| 7887 | 7890 | ||
| 7888 | (\"\" header-line-indent THE-REST...) | 7891 | (\"\" header-line-indent THE-REST...) |
| 7889 | 7892 | ||
| 7893 | where THE-REST is the format string which produces the actual text | ||
| 7894 | of the header-line. | ||
| 7890 | Also see `header-line-indent-width'.") | 7895 | Also see `header-line-indent-width'.") |
| 7891 | (defvar header-line-indent-width 0 "\ | 7896 | (defvar header-line-indent-width 0 "\ |
| 7892 | The width of the current line numbers displayed. | 7897 | The width of the current line number display in the window. |
| 7893 | This is updated when `header-line-indent-mode' is switched on. | 7898 | This is measured in units of the frame's canonical columns. |
| 7894 | 7899 | This is updated when `header-line-indent-mode' is switched on, | |
| 7900 | and is intended for use in `:align-to' display specifications | ||
| 7901 | that are part of `header-line-format', when portions of header-line | ||
| 7902 | text should be aligned to respective parts of buffer text. | ||
| 7895 | Also see `header-line-indent'.") | 7903 | Also see `header-line-indent'.") |
| 7896 | (autoload 'header-line-indent-mode "display-line-numbers" "\ | 7904 | (autoload 'header-line-indent-mode "display-line-numbers" "\ |
| 7897 | Mode to indent the header line in `display-line-numbers-mode' buffers. | 7905 | Minor mode to help with alignment of header line when line numbers are shown. |
| 7898 | 7906 | ||
| 7899 | This means that the header line will be kept indented so that it | 7907 | This minor mode should be turned on in buffers which display header-line |
| 7900 | has blank space that's as wide as the displayed line numbers in | 7908 | that needs to be aligned with buffer text when `display-line-numbers-mode' |
| 7901 | the buffer. | 7909 | is turned on in the buffer. |
| 7902 | 7910 | ||
| 7903 | Buffers that have this switched on should have a | 7911 | Buffers that have this switched on should have a `header-line-format' |
| 7904 | `header-line-format' that look like: | 7912 | that uses the `header-line-indent' or the `header-line-indent-width' |
| 7913 | variables, which this mode will keep up-to-date with the current | ||
| 7914 | display of line numbers. For example, a `header-line-format' that | ||
| 7915 | looks like this: | ||
| 7905 | 7916 | ||
| 7906 | (\"\" header-line-indent THE-REST...) | 7917 | (\"\" header-line-indent THE-REST...) |
| 7907 | 7918 | ||
| 7908 | The `header-line-indent-width' variable is also kept updated, and | 7919 | will make sure the text produced by THE-REST (which should be |
| 7909 | has the width of `header-line-format'. This can be used, for | 7920 | a header-line format string) is always indented to be aligned on |
| 7910 | instance, in `:align-to' specs, like: | 7921 | display with the first column of buffer text. |
| 7922 | |||
| 7923 | The `header-line-indent-width' variable is also kept updated, | ||
| 7924 | and can be used, for instance, in `:align-to' specs as part | ||
| 7925 | of `header-line-format', like this: | ||
| 7911 | 7926 | ||
| 7912 | (space :align-to (+ header-line-indent-width 10)) | 7927 | (space :align-to (+ header-line-indent-width 10)) |
| 7913 | 7928 | ||
| 7929 | See also `line-number-display-width'. | ||
| 7930 | |||
| 7914 | This is a minor mode. If called interactively, toggle the | 7931 | This is a minor mode. If called interactively, toggle the |
| 7915 | `Header-Line-Indent mode' mode. If the prefix argument is | 7932 | `Header-Line-Indent mode' mode. If the prefix argument is |
| 7916 | positive, enable the mode, and if it is zero or negative, disable | 7933 | 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. | |||
| 9741 | 9758 | ||
| 9742 | ;;; Generated autoloads from international/emoji.el | 9759 | ;;; Generated autoloads from international/emoji.el |
| 9743 | 9760 | ||
| 9744 | (autoload 'emoji-insert "emoji" "\ | 9761 | (autoload 'emoji-insert "emoji" nil t) |
| 9745 | Choose and insert an emoji glyph." t) | 9762 | (autoload 'emoji-recent "emoji" nil t) |
| 9746 | (autoload 'emoji-recent "emoji" "\ | 9763 | (autoload 'emoji-search "emoji" nil t) |
| 9747 | Choose and insert one of the recently-used emoji glyphs." t) | ||
| 9748 | (autoload 'emoji-search "emoji" "\ | ||
| 9749 | Choose and insert an emoji glyph by typing its Unicode name. | ||
| 9750 | This command prompts for an emoji name, with completion, and | ||
| 9751 | inserts it. It recognizes the Unicode Standard names of emoji, | ||
| 9752 | and also consults the `emoji-alternate-names' alist." t) | ||
| 9753 | (autoload 'emoji-list "emoji" "\ | 9764 | (autoload 'emoji-list "emoji" "\ |
| 9754 | List emojis and insert the one that's selected. | 9765 | List emojis and insert the one that's selected. |
| 9755 | Select the emoji by typing \\<emoji-list-mode-map>\\[emoji-list-select] on its picture. | 9766 | Select the emoji by typing \\<emoji-list-mode-map>\\[emoji-list-select] on its picture. |
| @@ -9765,6 +9776,11 @@ If called from Lisp, return the name as a string; return nil if | |||
| 9765 | the name is not known. | 9776 | the name is not known. |
| 9766 | 9777 | ||
| 9767 | (fn GLYPH &optional INTERACTIVE)" t) | 9778 | (fn GLYPH &optional INTERACTIVE)" t) |
| 9779 | (autoload 'emoji-list-select "emoji" nil t) | ||
| 9780 | (autoload 'emoji--init "emoji" "\ | ||
| 9781 | |||
| 9782 | |||
| 9783 | (fn &optional FORCE INHIBIT-ADJUST)") | ||
| 9768 | (autoload 'emoji-zoom-increase "emoji" "\ | 9784 | (autoload 'emoji-zoom-increase "emoji" "\ |
| 9769 | Increase the size of the character under point. | 9785 | Increase the size of the character under point. |
| 9770 | FACTOR is the multiplication factor for the size. | 9786 | FACTOR is the multiplication factor for the size. |
| @@ -15821,7 +15837,7 @@ it is disabled. | |||
| 15821 | 15837 | ||
| 15822 | ;;; Generated autoloads from progmodes/hideshow.el | 15838 | ;;; Generated autoloads from progmodes/hideshow.el |
| 15823 | 15839 | ||
| 15824 | (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 "{\\|<[^/>]*?" "}\\|</[^/>]*[^/]>" "<!--" mhtml-forward nil))) "\ | 15840 | (defvar hs-special-modes-alist (mapcar #'purecopy '((c-mode "{" "}" "/[*/]" nil nil) (c-ts-mode "{" "}" "/[*/]" nil nil) (c++-mode "{" "}" "/[*/]" nil nil) (c++-ts-mode "{" "}" "/[*/]" nil nil) (bibtex-mode ("@\\S(*\\(\\s(\\)" 1)) (java-mode "{" "}" "/[*/]" nil nil) (java-ts-mode "{" "}" "/[*/]" nil nil) (js-mode "{" "}" "/[*/]" nil) (js-ts-mode "{" "}" "/[*/]" nil) (mhtml-mode "{\\|<[^/>]*?" "}\\|</[^/>]*[^/]>" "<!--" mhtml-forward nil))) "\ |
| 15825 | Alist for initializing the hideshow variables for different modes. | 15841 | Alist for initializing the hideshow variables for different modes. |
| 15826 | Each element has the form | 15842 | Each element has the form |
| 15827 | (MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC | 15843 | (MODE START END COMMENT-START FORWARD-SEXP-FUNC ADJUST-BEG-FUNC |
| @@ -17321,12 +17337,12 @@ Return non-nil if there is an image at point.") | |||
| 17321 | ;;; Generated autoloads from image/image-converter.el | 17337 | ;;; Generated autoloads from image/image-converter.el |
| 17322 | 17338 | ||
| 17323 | (autoload 'image-converter-add-handler "image-converter" "\ | 17339 | (autoload 'image-converter-add-handler "image-converter" "\ |
| 17324 | Make Emacs use CONVERTER to parse image files that end with SUFFIX. | 17340 | Make Emacs use CONVERTER to parse image files whose names end with SUFFIX. |
| 17325 | CONVERTER is a function with two parameters, where the first is | 17341 | CONVERTER is a function with two arguments, the file name or a string |
| 17326 | the file name or a string with the image data, and the second is | 17342 | with the image data, and a non-nil value if the first argument is image data. |
| 17327 | non-nil if the first parameter is image data. The converter | 17343 | The converter should produce the image in the current buffer, converted to |
| 17328 | should output the image in the current buffer, converted to | 17344 | the format given by `image-convert-to-format'. |
| 17329 | `image-convert-to-format'. | 17345 | SUFFIX should not include the leading dot. |
| 17330 | 17346 | ||
| 17331 | (fn SUFFIX CONVERTER)") | 17347 | (fn SUFFIX CONVERTER)") |
| 17332 | (register-definition-prefixes "image-converter" '("image-convert")) | 17348 | (register-definition-prefixes "image-converter" '("image-convert")) |
| @@ -17370,9 +17386,9 @@ Open directory DIR and create a default window configuration. | |||
| 17370 | 17386 | ||
| 17371 | Convenience command that: | 17387 | Convenience command that: |
| 17372 | 17388 | ||
| 17373 | - Opens Dired in folder DIR | 17389 | - opens Dired in folder DIR; |
| 17374 | - Splits windows in most useful (?) way | 17390 | - splits windows in most useful (?) way; and |
| 17375 | - Sets `truncate-lines' to t | 17391 | - sets `truncate-lines' to t |
| 17376 | 17392 | ||
| 17377 | After the command has finished, you would typically mark some | 17393 | After the command has finished, you would typically mark some |
| 17378 | image files in Dired and type | 17394 | image files in Dired and type |
| @@ -17430,11 +17446,12 @@ Default bookmark handler for Image-Dired buffers. | |||
| 17430 | ;;; Generated autoloads from image/image-dired-dired.el | 17446 | ;;; Generated autoloads from image/image-dired-dired.el |
| 17431 | 17447 | ||
| 17432 | (autoload 'image-dired-dired-toggle-marked-thumbs "image-dired-dired" "\ | 17448 | (autoload 'image-dired-dired-toggle-marked-thumbs "image-dired-dired" "\ |
| 17433 | Toggle thumbnails in front of file names in the Dired buffer. | 17449 | Toggle thumbnails in front of marked file names in the Dired buffer. |
| 17434 | If no marked file could be found, insert or hide thumbnails on the | 17450 | If no file is marked, toggle display of thumbnail on the current file's line. |
| 17435 | current line. ARG, if non-nil, specifies the files to use instead | 17451 | ARG, if non-nil (interactively, the prefix argument), specifies the files |
| 17436 | of the marked files. If ARG is an integer, use the next ARG (or | 17452 | whose thumbnail display to toggle instead of the marked files: if ARG is an |
| 17437 | previous -ARG, if ARG<0) files. | 17453 | integer, use the next ARG (or previous -ARG, if ARG<0) files; any other |
| 17454 | value of ARG means toggle thumbnail display of the current line's file. | ||
| 17438 | 17455 | ||
| 17439 | (fn &optional ARG)" '(dired-mode)) | 17456 | (fn &optional ARG)" '(dired-mode)) |
| 17440 | (autoload 'image-dired-jump-thumbnail-buffer "image-dired-dired" "\ | 17457 | (autoload 'image-dired-jump-thumbnail-buffer "image-dired-dired" "\ |
| @@ -17486,7 +17503,8 @@ Append thumbnails to `image-dired-thumbnail-buffer'." '(dired-mode)) | |||
| 17486 | (autoload 'image-dired-display-thumb "image-dired-dired" "\ | 17503 | (autoload 'image-dired-display-thumb "image-dired-dired" "\ |
| 17487 | Shorthand for `image-dired-display-thumbs' with prefix argument." '(dired-mode)) | 17504 | Shorthand for `image-dired-display-thumbs' with prefix argument." '(dired-mode)) |
| 17488 | (autoload 'image-dired-dired-display-external "image-dired-dired" "\ | 17505 | (autoload 'image-dired-dired-display-external "image-dired-dired" "\ |
| 17489 | Display file at point using an external viewer." '(dired-mode)) | 17506 | Display file at point using an external viewer. |
| 17507 | The viewer is specified by the value of `image-dired-external-viewer'." '(dired-mode)) | ||
| 17490 | (autoload 'image-dired-dired-display-image "image-dired-dired" "\ | 17508 | (autoload 'image-dired-dired-display-image "image-dired-dired" "\ |
| 17491 | Display current image file. | 17509 | Display current image file. |
| 17492 | See documentation for `image-dired-display-image' for more information. | 17510 | See documentation for `image-dired-display-image' for more information. |
| @@ -17494,11 +17512,11 @@ See documentation for `image-dired-display-image' for more information. | |||
| 17494 | (fn &optional _)" '(dired-mode)) | 17512 | (fn &optional _)" '(dired-mode)) |
| 17495 | (set-advertised-calling-convention 'image-dired-dired-display-image 'nil '"29.1") | 17513 | (set-advertised-calling-convention 'image-dired-dired-display-image 'nil '"29.1") |
| 17496 | (autoload 'image-dired-mark-tagged-files "image-dired-dired" "\ | 17514 | (autoload 'image-dired-mark-tagged-files "image-dired-dired" "\ |
| 17497 | Use REGEXP to mark files with matching tag. | 17515 | Mark files whose tag matches REGEXP. |
| 17498 | A `tag' is a keyword, a piece of meta data, associated with an | 17516 | A `tag' is a keyword, a piece of meta data, associated with an |
| 17499 | image file and stored in image-dired's database file. This command | 17517 | image file and stored in image-dired's database file. This command |
| 17500 | lets you input a regexp and this will be matched against all tags | 17518 | prompts for a regexp, and then matches it against all the tags |
| 17501 | on all image files in the database file. The files that have a | 17519 | of all the image files in the database file. The files that have a |
| 17502 | matching tag will be marked in the Dired buffer. | 17520 | matching tag will be marked in the Dired buffer. |
| 17503 | 17521 | ||
| 17504 | (fn REGEXP)" '(dired-mode)) | 17522 | (fn REGEXP)" '(dired-mode)) |
| @@ -17513,7 +17531,8 @@ matching tag will be marked in the Dired buffer. | |||
| 17513 | ;;; Generated autoloads from image/image-dired-tags.el | 17531 | ;;; Generated autoloads from image/image-dired-tags.el |
| 17514 | 17532 | ||
| 17515 | (autoload 'image-dired-tag-files "image-dired-tags" "\ | 17533 | (autoload 'image-dired-tag-files "image-dired-tags" "\ |
| 17516 | Tag marked file(s) in Dired. With prefix ARG, tag file at point. | 17534 | Tag file(s) which are marked in a Dired buffer. |
| 17535 | With prefix ARG, tag the file at point. | ||
| 17517 | 17536 | ||
| 17518 | (fn ARG)" '(dired-mode)) | 17537 | (fn ARG)" '(dired-mode)) |
| 17519 | (autoload 'image-dired-delete-tag "image-dired-tags" "\ | 17538 | (autoload 'image-dired-delete-tag "image-dired-tags" "\ |
| @@ -18326,7 +18345,9 @@ Add submenus to the File menu, to convert to and from various formats." t) | |||
| 18326 | (put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive)))) | 18345 | (put 'ispell-check-comments 'safe-local-variable (lambda (a) (memq a '(nil t exclusive)))) |
| 18327 | (defvar ispell-personal-dictionary nil "\ | 18346 | (defvar ispell-personal-dictionary nil "\ |
| 18328 | File name of your personal spelling dictionary, or nil. | 18347 | File name of your personal spelling dictionary, or nil. |
| 18329 | If nil, the default personal dictionary for your spelling checker is used.") | 18348 | If nil, the default personal dictionary for your spelling checker is used. |
| 18349 | Due to a misfeature of Hunspell, if the value is an absolute file name, the | ||
| 18350 | file by that name must already exist for Hunspell to be able to use it.") | ||
| 18330 | (custom-autoload 'ispell-personal-dictionary "ispell" t) | 18351 | (custom-autoload 'ispell-personal-dictionary "ispell" t) |
| 18331 | (put 'ispell-local-dictionary 'safe-local-variable 'string-or-null-p) | 18352 | (put 'ispell-local-dictionary 'safe-local-variable 'string-or-null-p) |
| 18332 | (defconst ispell-menu-map (let ((map (make-sparse-keymap "Spell"))) (define-key map [ispell-change-dictionary] `(menu-item ,(purecopy "Change Dictionary...") ispell-change-dictionary :help ,(purecopy "Supply explicit dictionary file name"))) (define-key map [ispell-kill-ispell] `(menu-item ,(purecopy "Kill Process") (lambda nil (interactive) (ispell-kill-ispell nil 'clear)) :enable (and (boundp 'ispell-process) ispell-process (eq (ispell-process-status) 'run)) :help ,(purecopy "Terminate Ispell subprocess"))) (define-key map [ispell-pdict-save] `(menu-item ,(purecopy "Save Dictionary") (lambda nil (interactive) (ispell-pdict-save t t)) :help ,(purecopy "Save personal dictionary"))) (define-key map [ispell-customize] `(menu-item ,(purecopy "Customize...") (lambda nil (interactive) (customize-group 'ispell)) :help ,(purecopy "Customize spell checking options"))) (define-key map [ispell-help] `(menu-item ,(purecopy "Help") (lambda nil (interactive) (describe-function 'ispell-help)) :help ,(purecopy "Show standard Ispell keybindings and commands"))) (define-key map [flyspell-mode] `(menu-item ,(purecopy "Automatic spell checking (Flyspell)") flyspell-mode :help ,(purecopy "Check spelling while you edit the text") :button (:toggle bound-and-true-p flyspell-mode))) (define-key map [ispell-complete-word] `(menu-item ,(purecopy "Complete Word") ispell-complete-word :help ,(purecopy "Complete word at cursor using dictionary"))) (define-key map [ispell-complete-word-interior-frag] `(menu-item ,(purecopy "Complete Word Fragment") ispell-complete-word-interior-frag :help ,(purecopy "Complete word fragment at cursor"))) (define-key map [ispell-continue] `(menu-item ,(purecopy "Continue Spell-Checking") ispell-continue :enable (and (boundp 'ispell-region-end) (marker-position ispell-region-end) (equal (marker-buffer ispell-region-end) (current-buffer))) :help ,(purecopy "Continue spell checking last region"))) (define-key map [ispell-word] `(menu-item ,(purecopy "Spell-Check Word") ispell-word :help ,(purecopy "Spell-check word at cursor"))) (define-key map [ispell-comments-and-strings] `(menu-item ,(purecopy "Spell-Check Comments") ispell-comments-and-strings :help ,(purecopy "Spell-check only comments and strings"))) (define-key map [ispell-region] `(menu-item ,(purecopy "Spell-Check Region") ispell-region :enable mark-active :help ,(purecopy "Spell-check text in marked region"))) (define-key map [ispell-message] `(menu-item ,(purecopy "Spell-Check Message") ispell-message :visible (eq major-mode 'mail-mode) :help ,(purecopy "Skip headers and included message text"))) (define-key map [ispell-buffer] `(menu-item ,(purecopy "Spell-Check Buffer") ispell-buffer :help ,(purecopy "Check spelling of selected buffer"))) map) "\ | 18353 | (defconst ispell-menu-map (let ((map (make-sparse-keymap "Spell"))) (define-key map [ispell-change-dictionary] `(menu-item ,(purecopy "Change Dictionary...") ispell-change-dictionary :help ,(purecopy "Supply explicit dictionary file name"))) (define-key map [ispell-kill-ispell] `(menu-item ,(purecopy "Kill Process") (lambda nil (interactive) (ispell-kill-ispell nil 'clear)) :enable (and (boundp 'ispell-process) ispell-process (eq (ispell-process-status) 'run)) :help ,(purecopy "Terminate Ispell subprocess"))) (define-key map [ispell-pdict-save] `(menu-item ,(purecopy "Save Dictionary") (lambda nil (interactive) (ispell-pdict-save t t)) :help ,(purecopy "Save personal dictionary"))) (define-key map [ispell-customize] `(menu-item ,(purecopy "Customize...") (lambda nil (interactive) (customize-group 'ispell)) :help ,(purecopy "Customize spell checking options"))) (define-key map [ispell-help] `(menu-item ,(purecopy "Help") (lambda nil (interactive) (describe-function 'ispell-help)) :help ,(purecopy "Show standard Ispell keybindings and commands"))) (define-key map [flyspell-mode] `(menu-item ,(purecopy "Automatic spell checking (Flyspell)") flyspell-mode :help ,(purecopy "Check spelling while you edit the text") :button (:toggle bound-and-true-p flyspell-mode))) (define-key map [ispell-complete-word] `(menu-item ,(purecopy "Complete Word") ispell-complete-word :help ,(purecopy "Complete word at cursor using dictionary"))) (define-key map [ispell-complete-word-interior-frag] `(menu-item ,(purecopy "Complete Word Fragment") ispell-complete-word-interior-frag :help ,(purecopy "Complete word fragment at cursor"))) (define-key map [ispell-continue] `(menu-item ,(purecopy "Continue Spell-Checking") ispell-continue :enable (and (boundp 'ispell-region-end) (marker-position ispell-region-end) (equal (marker-buffer ispell-region-end) (current-buffer))) :help ,(purecopy "Continue spell checking last region"))) (define-key map [ispell-word] `(menu-item ,(purecopy "Spell-Check Word") ispell-word :help ,(purecopy "Spell-check word at cursor"))) (define-key map [ispell-comments-and-strings] `(menu-item ,(purecopy "Spell-Check Comments") ispell-comments-and-strings :help ,(purecopy "Spell-check only comments and strings"))) (define-key map [ispell-region] `(menu-item ,(purecopy "Spell-Check Region") ispell-region :enable mark-active :help ,(purecopy "Spell-check text in marked region"))) (define-key map [ispell-message] `(menu-item ,(purecopy "Spell-Check Message") ispell-message :visible (eq major-mode 'mail-mode) :help ,(purecopy "Skip headers and included message text"))) (define-key map [ispell-buffer] `(menu-item ,(purecopy "Spell-Check Buffer") ispell-buffer :help ,(purecopy "Check spelling of selected buffer"))) map) "\ |
| @@ -26561,8 +26582,12 @@ or call the function `repeat-mode'.") | |||
| 26561 | (autoload 'repeat-mode "repeat" "\ | 26582 | (autoload 'repeat-mode "repeat" "\ |
| 26562 | Toggle Repeat mode. | 26583 | Toggle Repeat mode. |
| 26563 | 26584 | ||
| 26564 | When Repeat mode is enabled, and the command symbol has the property named | 26585 | When Repeat mode is enabled, certain commands bound to multi-key |
| 26565 | `repeat-map', this map is activated temporarily for the next command. | 26586 | sequences can be repeated by typing a single key, after typing the |
| 26587 | full key sequence once. | ||
| 26588 | The commands which can be repeated like that are those whose symbol | ||
| 26589 | has the property `repeat-map' which specifies a keymap of single | ||
| 26590 | keys for repeating. | ||
| 26566 | See `describe-repeat-maps' for a list of all repeatable commands. | 26591 | See `describe-repeat-maps' for a list of all repeatable commands. |
| 26567 | 26592 | ||
| 26568 | This is a global minor mode. If called interactively, toggle the | 26593 | This is a global minor mode. If called interactively, toggle the |
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." | |||
| 275 | (autoload 'netrc-parse "netrc") | 275 | (autoload 'netrc-parse "netrc") |
| 276 | (netrc-parse file)))) | 276 | (netrc-parse file)))) |
| 277 | 277 | ||
| 278 | ;; User option `password-colon-equivalents' is new in Emacs 30.1. | ||
| 279 | (if (boundp 'password-colon-equivalents) | ||
| 280 | (defvaralias | ||
| 281 | 'tramp-compat-password-colon-equivalents | ||
| 282 | 'password-colon-equivalents) | ||
| 283 | (defvar tramp-compat-password-colon-equivalents | ||
| 284 | '(?\N{COLON} | ||
| 285 | ?\N{FULLWIDTH COLON} | ||
| 286 | ?\N{SMALL COLON} | ||
| 287 | ?\N{PRESENTATION FORM FOR VERTICAL COLON} | ||
| 288 | ?\N{KHMER SIGN CAMNUC PII KUUH}) | ||
| 289 | "List of characters equivalent to trailing colon in \"password\" prompts.")) | ||
| 290 | |||
| 278 | (dolist (elt (all-completions "tramp-compat-" obarray 'functionp)) | 291 | (dolist (elt (all-completions "tramp-compat-" obarray 'functionp)) |
| 279 | (put (intern elt) 'tramp-suppress-trace t)) | 292 | (put (intern elt) 'tramp-suppress-trace t)) |
| 280 | 293 | ||
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'." | |||
| 133 | ;; Use `path-separator' as it does eshell. | 133 | ;; Use `path-separator' as it does eshell. |
| 134 | (setq eshell-path-env | 134 | (setq eshell-path-env |
| 135 | (if (file-remote-p default-directory) | 135 | (if (file-remote-p default-directory) |
| 136 | (mapconcat #'identity (butlast (exec-path)) path-separator) | 136 | (string-join (butlast (exec-path)) path-separator) |
| 137 | (getenv "PATH")))) | 137 | (getenv "PATH")))) |
| 138 | 138 | ||
| 139 | (with-eval-after-load 'esh-util | 139 | (with-eval-after-load 'esh-util |
| @@ -345,8 +345,7 @@ NAME must be equal to `tramp-current-connection'." | |||
| 345 | (defconst tramp-bsd-process-attributes-ps-args | 345 | (defconst tramp-bsd-process-attributes-ps-args |
| 346 | `("-acxww" | 346 | `("-acxww" |
| 347 | "-o" | 347 | "-o" |
| 348 | ,(mapconcat | 348 | ,(string-join |
| 349 | #'identity | ||
| 350 | '("pid" | 349 | '("pid" |
| 351 | "euid" | 350 | "euid" |
| 352 | "user" | 351 | "user" |
| @@ -355,8 +354,7 @@ NAME must be equal to `tramp-current-connection'." | |||
| 355 | "comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") | 354 | "comm=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ") |
| 356 | ",") | 355 | ",") |
| 357 | "-o" | 356 | "-o" |
| 358 | ,(mapconcat | 357 | ,(string-join |
| 359 | #'identity | ||
| 360 | '("state" | 358 | '("state" |
| 361 | "ppid" | 359 | "ppid" |
| 362 | "pgid" | 360 | "pgid" |
| @@ -419,8 +417,7 @@ See `tramp-process-attributes-ps-format'.") | |||
| 419 | ;; Tested with BusyBox v1.24.1. | 417 | ;; Tested with BusyBox v1.24.1. |
| 420 | (defconst tramp-busybox-process-attributes-ps-args | 418 | (defconst tramp-busybox-process-attributes-ps-args |
| 421 | `("-o" | 419 | `("-o" |
| 422 | ,(mapconcat | 420 | ,(string-join |
| 423 | #'identity | ||
| 424 | '("pid" | 421 | '("pid" |
| 425 | "user" | 422 | "user" |
| 426 | "group" | 423 | "group" |
| @@ -428,8 +425,7 @@ See `tramp-process-attributes-ps-format'.") | |||
| 428 | ",") | 425 | ",") |
| 429 | "-o" "stat=abcde" | 426 | "-o" "stat=abcde" |
| 430 | "-o" | 427 | "-o" |
| 431 | ,(mapconcat | 428 | ,(string-join |
| 432 | #'identity | ||
| 433 | '("ppid" | 429 | '("ppid" |
| 434 | "pgid" | 430 | "pgid" |
| 435 | "tty" | 431 | "tty" |
| @@ -472,8 +468,7 @@ See `tramp-process-attributes-ps-format'.") | |||
| 472 | (defconst tramp-darwin-process-attributes-ps-args | 468 | (defconst tramp-darwin-process-attributes-ps-args |
| 473 | `("-acxww" | 469 | `("-acxww" |
| 474 | "-o" | 470 | "-o" |
| 475 | ,(mapconcat | 471 | ,(string-join |
| 476 | #'identity | ||
| 477 | '("pid" | 472 | '("pid" |
| 478 | "uid" | 473 | "uid" |
| 479 | "user" | 474 | "user" |
| @@ -482,8 +477,7 @@ See `tramp-process-attributes-ps-format'.") | |||
| 482 | ",") | 477 | ",") |
| 483 | "-o" "state=abcde" | 478 | "-o" "state=abcde" |
| 484 | "-o" | 479 | "-o" |
| 485 | ,(mapconcat | 480 | ,(string-join |
| 486 | #'identity | ||
| 487 | '("ppid" | 481 | '("ppid" |
| 488 | "pgid" | 482 | "pgid" |
| 489 | "sess" | 483 | "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." | |||
| 2392 | v 'file-error | 2392 | v 'file-error |
| 2393 | "Cannot find remote listener: %s" remote-copy-program)) | 2393 | "Cannot find remote listener: %s" remote-copy-program)) |
| 2394 | (setq remote-copy-program | 2394 | (setq remote-copy-program |
| 2395 | (mapconcat | 2395 | (string-join |
| 2396 | #'identity | ||
| 2397 | (append | 2396 | (append |
| 2398 | (list remote-copy-program) remote-copy-args | 2397 | (list remote-copy-program) remote-copy-args |
| 2399 | (list (if v1 (concat "<" source) (concat ">" target)) "&")) | 2398 | (list (if v1 (concat "<" source) (concat ">" target)) "&")) |
| @@ -3010,8 +3009,7 @@ implementation will be used." | |||
| 3010 | ;; We must also disable buffering, | 3009 | ;; We must also disable buffering, |
| 3011 | ;; otherwise strings larger than 4096 | 3010 | ;; otherwise strings larger than 4096 |
| 3012 | ;; bytes, sent by the process, could | 3011 | ;; bytes, sent by the process, could |
| 3013 | ;; block, see termios(3) and | 3012 | ;; block, see termios(3) and Bug#61341. |
| 3014 | ;; <https://github.com/emacs-lsp/lsp-mode/issues/2375#issuecomment-1407272718>. | ||
| 3015 | ;; FIXME: Shall we rather use "stty raw"? | 3013 | ;; FIXME: Shall we rather use "stty raw"? |
| 3016 | (if (tramp-check-remote-uname v "Darwin") | 3014 | (if (tramp-check-remote-uname v "Darwin") |
| 3017 | (tramp-send-command | 3015 | (tramp-send-command |
| @@ -3118,8 +3116,7 @@ implementation will be used." | |||
| 3118 | (format | 3116 | (format |
| 3119 | "%s %s %s" | 3117 | "%s %s %s" |
| 3120 | (tramp-get-method-parameter vec 'tramp-remote-shell) | 3118 | (tramp-get-method-parameter vec 'tramp-remote-shell) |
| 3121 | (mapconcat | 3119 | (string-join |
| 3122 | #'identity | ||
| 3123 | (tramp-get-method-parameter vec 'tramp-remote-shell-args) | 3120 | (tramp-get-method-parameter vec 'tramp-remote-shell-args) |
| 3124 | " ") | 3121 | " ") |
| 3125 | (tramp-shell-quote-argument (format "kill -%d $$" i)))) | 3122 | (tramp-shell-quote-argument (format "kill -%d $$" i)))) |
| @@ -4972,7 +4969,7 @@ Goes through the list `tramp-inline-compress-commands'." | |||
| 4972 | (tramp-call-process | 4969 | (tramp-call-process |
| 4973 | vec1 tramp-encoding-shell nil t nil | 4970 | vec1 tramp-encoding-shell nil t nil |
| 4974 | tramp-encoding-command-switch | 4971 | tramp-encoding-command-switch |
| 4975 | (mapconcat #'identity command " ")) | 4972 | (string-join command " ")) |
| 4976 | (goto-char (point-min)) | 4973 | (goto-char (point-min)) |
| 4977 | (not (search-forward "remotecommand" nil 'noerror))))) | 4974 | (not (search-forward "remotecommand" nil 'noerror))))) |
| 4978 | 4975 | ||
| @@ -4991,11 +4988,11 @@ Goes through the list `tramp-inline-compress-commands'." | |||
| 4991 | found string) | 4988 | found string) |
| 4992 | (with-temp-buffer | 4989 | (with-temp-buffer |
| 4993 | ;; Check hostkey of VEC2, seen from VEC1. | 4990 | ;; Check hostkey of VEC2, seen from VEC1. |
| 4994 | (tramp-send-command vec1 (mapconcat #'identity command " ")) | 4991 | (tramp-send-command vec1 (string-join command " ")) |
| 4995 | ;; Check hostkey of VEC2, seen locally. | 4992 | ;; Check hostkey of VEC2, seen locally. |
| 4996 | (tramp-call-process | 4993 | (tramp-call-process |
| 4997 | vec1 tramp-encoding-shell nil t nil tramp-encoding-command-switch | 4994 | vec1 tramp-encoding-shell nil t nil tramp-encoding-command-switch |
| 4998 | (mapconcat #'identity command " ")) | 4995 | (string-join command " ")) |
| 4999 | (goto-char (point-min)) | 4996 | (goto-char (point-min)) |
| 5000 | (while (and (not found) (not (eobp))) | 4997 | (while (and (not found) (not (eobp))) |
| 5001 | (setq string | 4998 | (setq string |
| @@ -5219,8 +5216,7 @@ connection if a previous connection has died for some reason." | |||
| 5219 | ;; Replace `login-args' place holders. | 5216 | ;; Replace `login-args' place holders. |
| 5220 | (setq | 5217 | (setq |
| 5221 | command | 5218 | command |
| 5222 | (mapconcat | 5219 | (string-join |
| 5223 | #'identity | ||
| 5224 | (append | 5220 | (append |
| 5225 | ;; We do not want to see the trailing local | 5221 | ;; We do not want to see the trailing local |
| 5226 | ;; prompt in `start-file-process'. | 5222 | ;; prompt in `start-file-process'. |
| @@ -5521,12 +5517,10 @@ Nonexistent directories are removed from spec." | |||
| 5521 | (format | 5517 | (format |
| 5522 | "%s %s %s 'echo %s \\\"$PATH\\\"'" | 5518 | "%s %s %s 'echo %s \\\"$PATH\\\"'" |
| 5523 | (tramp-get-method-parameter vec 'tramp-remote-shell) | 5519 | (tramp-get-method-parameter vec 'tramp-remote-shell) |
| 5524 | (mapconcat | 5520 | (string-join |
| 5525 | #'identity | ||
| 5526 | (tramp-get-method-parameter vec 'tramp-remote-shell-login) | 5521 | (tramp-get-method-parameter vec 'tramp-remote-shell-login) |
| 5527 | " ") | 5522 | " ") |
| 5528 | (mapconcat | 5523 | (string-join |
| 5529 | #'identity | ||
| 5530 | (tramp-get-method-parameter vec 'tramp-remote-shell-args) | 5524 | (tramp-get-method-parameter vec 'tramp-remote-shell-args) |
| 5531 | " ") | 5525 | " ") |
| 5532 | (tramp-shell-quote-argument tramp-end-of-heredoc)) | 5526 | (tramp-shell-quote-argument tramp-end-of-heredoc)) |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 1cda8fc4c61..95b42fb1c43 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 | |||
| 641 | :type 'regexp) | 641 | :type 'regexp) |
| 642 | 642 | ||
| 643 | (defcustom tramp-password-prompt-regexp | 643 | (defcustom tramp-password-prompt-regexp |
| 644 | (rx | 644 | (rx-to-string |
| 645 | bol (* nonl) | 645 | `(: bol (* nonl) |
| 646 | (group (regexp (regexp-opt password-word-equivalents))) | 646 | (group (| . ,password-word-equivalents)) |
| 647 | (* nonl) (any "::៖") (? "\^@") (* blank)) | 647 | (* nonl) (any . ,tramp-compat-password-colon-equivalents) |
| 648 | (? "\^@") (* blank))) | ||
| 648 | "Regexp matching password-like prompts. | 649 | "Regexp matching password-like prompts. |
| 649 | The regexp should match at end of buffer. | 650 | The regexp should match at end of buffer. |
| 650 | 651 | ||
| @@ -2961,6 +2962,8 @@ not in completion mode." | |||
| 2961 | (concat dir filename)) | 2962 | (concat dir filename)) |
| 2962 | ((string-match-p | 2963 | ((string-match-p |
| 2963 | (rx bos (regexp tramp-prefix-regexp) | 2964 | (rx bos (regexp tramp-prefix-regexp) |
| 2965 | (* (regexp tramp-remote-file-name-spec-regexp) | ||
| 2966 | (regexp tramp-postfix-hop-regexp)) | ||
| 2964 | (? (regexp tramp-method-regexp) (regexp tramp-postfix-method-regexp) | 2967 | (? (regexp tramp-method-regexp) (regexp tramp-postfix-method-regexp) |
| 2965 | (? (regexp tramp-user-regexp) (regexp tramp-postfix-user-regexp))) | 2968 | (? (regexp tramp-user-regexp) (regexp tramp-postfix-user-regexp))) |
| 2966 | eos) | 2969 | eos) |
| @@ -2984,6 +2987,8 @@ not in completion mode." | |||
| 2984 | (string-match | 2987 | (string-match |
| 2985 | (rx | 2988 | (rx |
| 2986 | (regexp tramp-prefix-regexp) | 2989 | (regexp tramp-prefix-regexp) |
| 2990 | (* (regexp tramp-remote-file-name-spec-regexp) | ||
| 2991 | (regexp tramp-postfix-hop-regexp)) | ||
| 2987 | (group (regexp tramp-method-regexp)) | 2992 | (group (regexp tramp-method-regexp)) |
| 2988 | (? (regexp tramp-postfix-method-regexp)) | 2993 | (? (regexp tramp-postfix-method-regexp)) |
| 2989 | eos) | 2994 | eos) |
| @@ -2993,6 +2998,8 @@ not in completion mode." | |||
| 2993 | ((string-match | 2998 | ((string-match |
| 2994 | (rx | 2999 | (rx |
| 2995 | (regexp tramp-prefix-regexp) | 3000 | (regexp tramp-prefix-regexp) |
| 3001 | (* (regexp tramp-remote-file-name-spec-regexp) | ||
| 3002 | (regexp tramp-postfix-hop-regexp)) | ||
| 2996 | (group (regexp tramp-remote-file-name-spec-regexp)) | 3003 | (group (regexp tramp-remote-file-name-spec-regexp)) |
| 2997 | eos) | 3004 | eos) |
| 2998 | filename) | 3005 | filename) |
| @@ -3249,30 +3256,31 @@ PARTIAL-USER must match USER, PARTIAL-HOST must match HOST." | |||
| 3249 | ;; method. In the `separate' file name syntax, we return "/[" when | 3256 | ;; method. In the `separate' file name syntax, we return "/[" when |
| 3250 | ;; `filename' is "/[string" w/o a trailing method separator "/". | 3257 | ;; `filename' is "/[string" w/o a trailing method separator "/". |
| 3251 | (cond | 3258 | (cond |
| 3252 | ((and (not (string-empty-p tramp-method-regexp)) | 3259 | ((string-match |
| 3253 | (string-match | 3260 | (rx (group (regexp tramp-prefix-regexp) |
| 3261 | (* (regexp tramp-remote-file-name-spec-regexp) | ||
| 3262 | (regexp tramp-postfix-hop-regexp))) | ||
| 3263 | (? (regexp tramp-completion-method-regexp)) eos) | ||
| 3264 | filename) | ||
| 3265 | (match-string 1 filename)) | ||
| 3266 | ((and (string-match | ||
| 3254 | (rx (group | 3267 | (rx (group |
| 3255 | (regexp tramp-prefix-regexp) | 3268 | (regexp tramp-prefix-regexp) |
| 3269 | (* (regexp tramp-remote-file-name-spec-regexp) | ||
| 3270 | (regexp tramp-postfix-hop-regexp)) | ||
| 3256 | (group (regexp tramp-method-regexp)) | 3271 | (group (regexp tramp-method-regexp)) |
| 3257 | (regexp tramp-postfix-method-regexp) | 3272 | (regexp tramp-postfix-method-regexp) |
| 3258 | (? (regexp tramp-user-regexp) | 3273 | (? (regexp tramp-user-regexp) |
| 3259 | (regexp tramp-postfix-user-regexp)))) | 3274 | (regexp tramp-postfix-user-regexp))) |
| 3275 | (? (| (regexp tramp-host-regexp) | ||
| 3276 | (: (regexp tramp-prefix-ipv6-regexp) | ||
| 3277 | (? (regexp tramp-ipv6-regexp) | ||
| 3278 | (? (regexp tramp-postfix-ipv6-regexp)))))) | ||
| 3279 | eos) | ||
| 3260 | filename) | 3280 | filename) |
| 3261 | ;; Is it a valid method? | 3281 | ;; Is it a valid method? |
| 3262 | (assoc (match-string 2 filename) tramp-methods)) | 3282 | (or (tramp-string-empty-or-nil-p (match-string 2 filename)) |
| 3263 | (match-string 1 filename)) | 3283 | (assoc (match-string 2 filename) tramp-methods))) |
| 3264 | ((and (string-empty-p tramp-method-regexp) | ||
| 3265 | (string-match | ||
| 3266 | (rx (group | ||
| 3267 | (regexp tramp-prefix-regexp) | ||
| 3268 | (? (regexp tramp-user-regexp) | ||
| 3269 | (regexp tramp-postfix-user-regexp)))) | ||
| 3270 | filename)) | ||
| 3271 | (match-string 1 filename)) | ||
| 3272 | ((string-match | ||
| 3273 | (rx (group (regexp tramp-prefix-regexp)) | ||
| 3274 | (regexp tramp-completion-method-regexp) eos) | ||
| 3275 | filename) | ||
| 3276 | (match-string 1 filename)) | 3284 | (match-string 1 filename)) |
| 3277 | (t (tramp-run-real-handler #'file-name-directory (list filename))))) | 3285 | (t (tramp-run-real-handler #'file-name-directory (list filename))))) |
| 3278 | 3286 | ||
| @@ -4519,8 +4527,7 @@ Return it as number of seconds. Used in `tramp-process-attributes-ps-format'." | |||
| 4519 | (defconst tramp-process-attributes-ps-args | 4527 | (defconst tramp-process-attributes-ps-args |
| 4520 | `("-eww" | 4528 | `("-eww" |
| 4521 | "-o" | 4529 | "-o" |
| 4522 | ,(mapconcat | 4530 | ,(string-join |
| 4523 | #'identity | ||
| 4524 | '("pid" | 4531 | '("pid" |
| 4525 | "euid" | 4532 | "euid" |
| 4526 | "euser" | 4533 | "euser" |
| @@ -4994,7 +5001,7 @@ substitution. SPEC-LIST is a list of char/value pairs used for | |||
| 4994 | (if (consp (tramp-get-method-parameter v 'tramp-direct-async)) | 5001 | (if (consp (tramp-get-method-parameter v 'tramp-direct-async)) |
| 4995 | (append | 5002 | (append |
| 4996 | (tramp-get-method-parameter v 'tramp-direct-async) | 5003 | (tramp-get-method-parameter v 'tramp-direct-async) |
| 4997 | `(,(mapconcat #'identity command " "))) | 5004 | `(,(string-join command " "))) |
| 4998 | command))) | 5005 | command))) |
| 4999 | 5006 | ||
| 5000 | ;; Check for `tramp-sh-file-name-handler', because something | 5007 | ;; Check for `tramp-sh-file-name-handler', because something |
| @@ -5890,8 +5897,7 @@ the remote host use line-endings as defined in the variable | |||
| 5890 | (let ((inhibit-read-only t)) (delete-region (point-min) (point-max))) | 5897 | (let ((inhibit-read-only t)) (delete-region (point-min) (point-max))) |
| 5891 | ;; Replace "\n" by `tramp-rsh-end-of-line'. | 5898 | ;; Replace "\n" by `tramp-rsh-end-of-line'. |
| 5892 | (setq string | 5899 | (setq string |
| 5893 | (mapconcat | 5900 | (string-join (split-string string "\n") tramp-rsh-end-of-line)) |
| 5894 | #'identity (split-string string "\n") tramp-rsh-end-of-line)) | ||
| 5895 | (unless (or (string-empty-p string) | 5901 | (unless (or (string-empty-p string) |
| 5896 | (string-equal (substring string -1) tramp-rsh-end-of-line)) | 5902 | (string-equal (substring string -1) tramp-rsh-end-of-line)) |
| 5897 | (setq string (concat string tramp-rsh-end-of-line))) | 5903 | (setq string (concat string tramp-rsh-end-of-line))) |
| @@ -6589,7 +6595,7 @@ verbosity of 6." | |||
| 6589 | (apply #'process-lines program args) | 6595 | (apply #'process-lines program args) |
| 6590 | (error | 6596 | (error |
| 6591 | (tramp-error vec (car err) (cdr err))))) | 6597 | (tramp-error vec (car err) (cdr err))))) |
| 6592 | (tramp-message vec 6 "\n%s" (mapconcat #'identity result "\n")) | 6598 | (tramp-message vec 6 "\n%s" (string-join result "\n")) |
| 6593 | result)) | 6599 | result)) |
| 6594 | 6600 | ||
| 6595 | (defun tramp-process-running-p (process-name) | 6601 | (defun tramp-process-running-p (process-name) |
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 | |||
| 59 | (let ((error-buffer (get-buffer-create " *Org-Babel Error*")) exit-code) | 59 | (let ((error-buffer (get-buffer-create " *Org-Babel Error*")) exit-code) |
| 60 | (with-current-buffer error-buffer (erase-buffer)) | 60 | (with-current-buffer error-buffer (erase-buffer)) |
| 61 | (with-temp-buffer | 61 | (with-temp-buffer |
| 62 | (insert query) | 62 | (insert query "\n") |
| 63 | (setq exit-code | 63 | (setq exit-code |
| 64 | (org-babel--shell-command-on-region | 64 | (org-babel--shell-command-on-region |
| 65 | command error-buffer)) | 65 | 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." | |||
| 234 | (:database . sql-database))) | 234 | (:database . sql-database))) |
| 235 | (mapped-name (cdr (assq name name-mapping)))) | 235 | (mapped-name (cdr (assq name name-mapping)))) |
| 236 | (cadr (assq mapped-name | 236 | (cadr (assq mapped-name |
| 237 | (cdr (assoc dbconnection sql-connection-alist)))))))) | 237 | (cdr (assoc-string dbconnection sql-connection-alist t)))))))) |
| 238 | 238 | ||
| 239 | (defun org-babel-execute:sql (body params) | 239 | (defun org-babel-execute:sql (body params) |
| 240 | "Execute a block of Sql code with Babel. | 240 | "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." | |||
| 8211 | (if (and org-agenda-filtered-by-category | 8211 | (if (and org-agenda-filtered-by-category |
| 8212 | org-agenda-category-filter) | 8212 | org-agenda-category-filter) |
| 8213 | (org-agenda-filter-show-all-cat) | 8213 | (org-agenda-filter-show-all-cat) |
| 8214 | (let ((cat (org-no-properties (org-get-at-eol 'org-category 1)))) | 8214 | (let ((cat (org-no-properties (org-agenda-get-category)))) |
| 8215 | (cond | 8215 | (cond |
| 8216 | ((and cat strip) | 8216 | ((and cat strip) |
| 8217 | (org-agenda-filter-apply | 8217 | (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." | |||
| 196 | 196 | ||
| 197 | ;;; Emacs < 27.1 compatibility | 197 | ;;; Emacs < 27.1 compatibility |
| 198 | 198 | ||
| 199 | (unless (fboundp 'combine-change-calls) | 199 | (if (version< emacs-version "29") |
| 200 | ;; A stub when `combine-change-calls' was not yet there. | 200 | ;; A stub when `combine-change-calls' was not yet there or had |
| 201 | (defmacro combine-change-calls (_beg _end &rest body) | 201 | ;; critical bugs (see Emacs bug#60467). |
| 202 | (declare (debug (form form def-body)) (indent 2)) | 202 | (defmacro org-combine-change-calls (_beg _end &rest body) |
| 203 | `(progn ,@body))) | 203 | (declare (debug (form form def-body)) (indent 2)) |
| 204 | `(progn ,@body)) | ||
| 205 | (defalias 'org-combine-change-calls 'combine-change-calls)) | ||
| 204 | 206 | ||
| 205 | (if (version< emacs-version "27.1") | 207 | (if (version< emacs-version "27.1") |
| 206 | (defsubst org-replace-buffer-contents (source &optional _max-secs _max-costs) | 208 | (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." | |||
| 7406 | (org-element-at-point to-pos) | 7406 | (org-element-at-point to-pos) |
| 7407 | (cl-macrolet ((cache-root | 7407 | (cl-macrolet ((cache-root |
| 7408 | ;; Use the most optimal version of cache available. | 7408 | ;; Use the most optimal version of cache available. |
| 7409 | () `(if (memq granularity '(headline headline+inlinetask)) | 7409 | () `(org-with-base-buffer nil |
| 7410 | (org-element--headline-cache-root) | 7410 | (if (memq granularity '(headline headline+inlinetask)) |
| 7411 | (org-element--cache-root))) | 7411 | (org-element--headline-cache-root) |
| 7412 | (org-element--cache-root)))) | ||
| 7412 | (cache-size | 7413 | (cache-size |
| 7413 | ;; Use the most optimal version of cache available. | 7414 | ;; Use the most optimal version of cache available. |
| 7414 | () `(if (memq granularity '(headline headline+inlinetask)) | 7415 | () `(org-with-base-buffer nil |
| 7415 | org-element--headline-cache-size | 7416 | (if (memq granularity '(headline headline+inlinetask)) |
| 7416 | org-element--cache-size)) | 7417 | org-element--headline-cache-size |
| 7418 | org-element--cache-size))) | ||
| 7417 | (cache-walk-restart | 7419 | (cache-walk-restart |
| 7418 | ;; Restart tree traversal after AVL tree re-balance. | 7420 | ;; Restart tree traversal after AVL tree re-balance. |
| 7419 | () `(when node | 7421 | () `(when node |
| @@ -7443,8 +7445,9 @@ the cache." | |||
| 7443 | ;; Avoid extra staff like timer cancels et al | 7445 | ;; Avoid extra staff like timer cancels et al |
| 7444 | ;; and only call `org-element--cache-sync-requests' when | 7446 | ;; and only call `org-element--cache-sync-requests' when |
| 7445 | ;; there are pending requests. | 7447 | ;; there are pending requests. |
| 7446 | (when org-element--cache-sync-requests | 7448 | (org-with-base-buffer nil |
| 7447 | (org-element--cache-sync (current-buffer))) | 7449 | (when org-element--cache-sync-requests |
| 7450 | (org-element--cache-sync (current-buffer)))) | ||
| 7448 | ;; Call `org-element--parse-to' directly avoiding any | 7451 | ;; Call `org-element--parse-to' directly avoiding any |
| 7449 | ;; kind of `org-element-at-point' overheads. | 7452 | ;; kind of `org-element-at-point' overheads. |
| 7450 | (if restrict-elements | 7453 | (if restrict-elements |
| @@ -7515,8 +7518,9 @@ the cache." | |||
| 7515 | tmpnext-start)) | 7518 | tmpnext-start)) |
| 7516 | ;; Check if cache does not have gaps. | 7519 | ;; Check if cache does not have gaps. |
| 7517 | (cache-gapless-p | 7520 | (cache-gapless-p |
| 7518 | () `(eq org-element--cache-change-tic | 7521 | () `(org-with-base-buffer nil |
| 7519 | (alist-get granularity org-element--cache-gapless)))) | 7522 | (eq org-element--cache-change-tic |
| 7523 | (alist-get granularity org-element--cache-gapless))))) | ||
| 7520 | ;; The core algorithm is simple walk along binary tree. However, | 7524 | ;; The core algorithm is simple walk along binary tree. However, |
| 7521 | ;; instead of checking all the tree elements from first to last | 7525 | ;; instead of checking all the tree elements from first to last |
| 7522 | ;; (like in `avl-tree-mapcar'), we begin from FROM-POS skipping | 7526 | ;; (like in `avl-tree-mapcar'), we begin from FROM-POS skipping |
| @@ -7644,7 +7648,9 @@ the cache." | |||
| 7644 | ;; In the process, we may alter the buffer, | 7648 | ;; In the process, we may alter the buffer, |
| 7645 | ;; so also keep track of the cache state. | 7649 | ;; so also keep track of the cache state. |
| 7646 | (progn | 7650 | (progn |
| 7647 | (setq modified-tic org-element--cache-change-tic) | 7651 | (setq modified-tic |
| 7652 | (org-with-base-buffer nil | ||
| 7653 | org-element--cache-change-tic)) | ||
| 7648 | (setq cache-size (cache-size)) | 7654 | (setq cache-size (cache-size)) |
| 7649 | ;; When NEXT-RE/FAIL-RE is provided, skip to | 7655 | ;; When NEXT-RE/FAIL-RE is provided, skip to |
| 7650 | ;; next regexp match after :begin of the current | 7656 | ;; next regexp match after :begin of the current |
| @@ -7678,7 +7684,7 @@ the cache." | |||
| 7678 | ;; | 7684 | ;; |
| 7679 | ;; Call FUNC. FUNC may move point. | 7685 | ;; Call FUNC. FUNC may move point. |
| 7680 | (setq org-element-cache-map-continue-from nil) | 7686 | (setq org-element-cache-map-continue-from nil) |
| 7681 | (if org-element--cache-map-statistics | 7687 | (if (org-with-base-buffer nil org-element--cache-map-statistics) |
| 7682 | (progn | 7688 | (progn |
| 7683 | (setq before-time (float-time)) | 7689 | (setq before-time (float-time)) |
| 7684 | (push (funcall func data) result) | 7690 | (push (funcall func data) result) |
| @@ -7697,7 +7703,15 @@ the cache." | |||
| 7697 | (when org-element-cache-map-continue-from | 7703 | (when org-element-cache-map-continue-from |
| 7698 | (goto-char org-element-cache-map-continue-from)) | 7704 | (goto-char org-element-cache-map-continue-from)) |
| 7699 | (when (> (point) start) | 7705 | (when (> (point) start) |
| 7700 | (move-start-to-next-match nil)) | 7706 | (move-start-to-next-match nil) |
| 7707 | ;; (point) inside matching element. | ||
| 7708 | ;; Go further. | ||
| 7709 | (when (> (point) start) | ||
| 7710 | (setq data (element-match-at-point)) | ||
| 7711 | (if (not data) | ||
| 7712 | (cache-walk-abort) | ||
| 7713 | (goto-char (next-element-start)) | ||
| 7714 | (move-start-to-next-match next-element-re)))) | ||
| 7701 | ;; Drop nil. | 7715 | ;; Drop nil. |
| 7702 | (unless (car result) (pop result))) | 7716 | (unless (car result) (pop result))) |
| 7703 | ;; If FUNC did not move the point and we | 7717 | ;; If FUNC did not move the point and we |
| @@ -7710,8 +7724,9 @@ the cache." | |||
| 7710 | start)) | 7724 | start)) |
| 7711 | (setq start nil)) | 7725 | (setq start nil)) |
| 7712 | ;; Check if the buffer has been modified. | 7726 | ;; Check if the buffer has been modified. |
| 7713 | (unless (and (eq modified-tic org-element--cache-change-tic) | 7727 | (unless (org-with-base-buffer nil |
| 7714 | (eq cache-size (cache-size))) | 7728 | (and (eq modified-tic org-element--cache-change-tic) |
| 7729 | (eq cache-size (cache-size)))) | ||
| 7715 | ;; START may no longer be valid, update | 7730 | ;; START may no longer be valid, update |
| 7716 | ;; it to beginning of real element. | 7731 | ;; it to beginning of real element. |
| 7717 | ;; Upon modification, START may lay | 7732 | ;; 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." | |||
| 853 | ;; Insert un-referenced footnote definitions at the end. | 853 | ;; Insert un-referenced footnote definitions at the end. |
| 854 | ;; Combine all insertions into one to create a single cache | 854 | ;; Combine all insertions into one to create a single cache |
| 855 | ;; update call. | 855 | ;; update call. |
| 856 | (combine-change-calls (point) (point) | 856 | (org-combine-change-calls (point) (point) |
| 857 | (pcase-dolist (`(,label . ,definition) definitions) | 857 | (pcase-dolist (`(,label . ,definition) definitions) |
| 858 | (unless (member label inserted) | 858 | (unless (member label inserted) |
| 859 | (insert "\n" definition "\n")))))))))) | 859 | (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." | |||
| 11 | (defun org-git-version () | 11 | (defun org-git-version () |
| 12 | "The Git version of Org mode. | 12 | "The Git version of Org mode. |
| 13 | Inserted by installing Org or when a release is made." | 13 | Inserted by installing Org or when a release is made." |
| 14 | (let ((org-git-version "release_9.6.1-23-gc45a05")) | 14 | (let ((org-git-version "release_9.6.1-31-gaf1bb1")) |
| 15 | org-git-version)) | 15 | org-git-version)) |
| 16 | 16 | ||
| 17 | (provide 'org-version) | 17 | (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.") | |||
| 723 | (set-default-toplevel-value var value) | 723 | (set-default-toplevel-value var value) |
| 724 | (when (featurep 'org) | 724 | (when (featurep 'org) |
| 725 | (org-load-modules-maybe 'force) | 725 | (org-load-modules-maybe 'force) |
| 726 | ;; FIXME: We can't have all the requires at top-level due to | ||
| 727 | ;; circular dependencies. Yet, this function might sometimes be | ||
| 728 | ;; called when 'org-element is not loaded. | ||
| 729 | (require 'org-element) | ||
| 726 | (org-element-cache-reset 'all))) | 730 | (org-element-cache-reset 'all))) |
| 727 | 731 | ||
| 728 | (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) | 732 | (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'." | |||
| 6556 | (interactive) | 6560 | (interactive) |
| 6557 | (save-excursion | 6561 | (save-excursion |
| 6558 | (org-back-to-heading t) | 6562 | (org-back-to-heading t) |
| 6559 | (combine-change-calls (point) (save-excursion (org-end-of-subtree t)) | 6563 | (org-combine-change-calls (point) (save-excursion (org-end-of-subtree t)) |
| 6560 | (org-with-limited-levels (org-map-tree 'org-promote)))) | 6564 | (org-with-limited-levels (org-map-tree 'org-promote)))) |
| 6561 | (org-fix-position-after-promote)) | 6565 | (org-fix-position-after-promote)) |
| 6562 | 6566 | ||
| @@ -6566,7 +6570,7 @@ See `org-demote' and `org-promote'." | |||
| 6566 | (interactive) | 6570 | (interactive) |
| 6567 | (save-excursion | 6571 | (save-excursion |
| 6568 | (org-back-to-heading t) | 6572 | (org-back-to-heading t) |
| 6569 | (combine-change-calls (point) (save-excursion (org-end-of-subtree t)) | 6573 | (org-combine-change-calls (point) (save-excursion (org-end-of-subtree t)) |
| 6570 | (org-with-limited-levels (org-map-tree 'org-demote)))) | 6574 | (org-with-limited-levels (org-map-tree 'org-demote)))) |
| 6571 | (org-fix-position-after-promote)) | 6575 | (org-fix-position-after-promote)) |
| 6572 | 6576 | ||
| @@ -7135,7 +7139,7 @@ When REMOVE is non-nil, remove the subtree from the clipboard." | |||
| 7135 | (setq beg (point)) | 7139 | (setq beg (point)) |
| 7136 | ;; Avoid re-parsing cache elements when i.e. level 1 heading | 7140 | ;; Avoid re-parsing cache elements when i.e. level 1 heading |
| 7137 | ;; is inserted and then promoted. | 7141 | ;; is inserted and then promoted. |
| 7138 | (combine-change-calls beg beg | 7142 | (org-combine-change-calls beg beg |
| 7139 | (when (fboundp 'org-id-paste-tracker) (org-id-paste-tracker txt)) | 7143 | (when (fboundp 'org-id-paste-tracker) (org-id-paste-tracker txt)) |
| 7140 | (insert txt) | 7144 | (insert txt) |
| 7141 | (unless (string-suffix-p "\n" txt) (insert "\n")) | 7145 | (unless (string-suffix-p "\n" txt) (insert "\n")) |
| @@ -18844,7 +18848,7 @@ Alignment is done according to `org-property-format', which see." | |||
| 18844 | (when (save-excursion | 18848 | (when (save-excursion |
| 18845 | (beginning-of-line) | 18849 | (beginning-of-line) |
| 18846 | (looking-at org-property-re)) | 18850 | (looking-at org-property-re)) |
| 18847 | (combine-change-calls (match-beginning 0) (match-end 0) | 18851 | (org-combine-change-calls (match-beginning 0) (match-end 0) |
| 18848 | (let ((newtext (concat (match-string 4) | 18852 | (let ((newtext (concat (match-string 4) |
| 18849 | (org-trim | 18853 | (org-trim |
| 18850 | (format org-property-format (match-string 1) (match-string 3)))))) | 18854 | (format org-property-format (match-string 1) (match-string 3)))))) |
diff --git a/lisp/progmodes/c-ts-mode.el b/lisp/progmodes/c-ts-mode.el index dbee53cd7a6..6db28459c32 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'." | |||
| 272 | ;; Indent the body of namespace definitions. | 272 | ;; Indent the body of namespace definitions. |
| 273 | ((parent-is "declaration_list") parent-bol c-ts-mode-indent-offset))) | 273 | ((parent-is "declaration_list") parent-bol c-ts-mode-indent-offset))) |
| 274 | 274 | ||
| 275 | ;; Closing bracket. This should be before initializer_list | ||
| 276 | ;; (and probably others) rule because that rule (and other | ||
| 277 | ;; similar rules) will match the closing bracket. (Bug#61398) | ||
| 278 | ((node-is "}") point-min c-ts-common-statement-offset) | ||
| 279 | |||
| 275 | ;; int[5] a = { 0, 0, 0, 0 }; | 280 | ;; int[5] a = { 0, 0, 0, 0 }; |
| 276 | ((parent-is "initializer_list") parent-bol c-ts-mode-indent-offset) | 281 | ((parent-is "initializer_list") parent-bol c-ts-mode-indent-offset) |
| 277 | ;; Statement in enum. | 282 | ;; Statement in enum. |
| @@ -281,8 +286,6 @@ MODE is either `c' or `cpp'." | |||
| 281 | 286 | ||
| 282 | ;; Statement in {} blocks. | 287 | ;; Statement in {} blocks. |
| 283 | ((parent-is "compound_statement") point-min c-ts-common-statement-offset) | 288 | ((parent-is "compound_statement") point-min c-ts-common-statement-offset) |
| 284 | ;; Closing bracket. | ||
| 285 | ((node-is "}") point-min c-ts-common-statement-offset) | ||
| 286 | ;; Opening bracket. | 289 | ;; Opening bracket. |
| 287 | ((node-is "compound_statement") point-min c-ts-common-statement-offset) | 290 | ((node-is "compound_statement") point-min c-ts-common-statement-offset) |
| 288 | ;; Bug#61291. | 291 | ;; Bug#61291. |
| @@ -799,7 +802,9 @@ the semicolon. This function skips the semicolon." | |||
| 799 | (setq-local c-ts-common-indent-type-regexp-alist | 802 | (setq-local c-ts-common-indent-type-regexp-alist |
| 800 | `((block . ,(rx (or "compound_statement" | 803 | `((block . ,(rx (or "compound_statement" |
| 801 | "field_declaration_list" | 804 | "field_declaration_list" |
| 802 | "enumerator_list"))) | 805 | "enumerator_list" |
| 806 | "initializer_list" | ||
| 807 | "field_declaration_list"))) | ||
| 803 | (if . "if_statement") | 808 | (if . "if_statement") |
| 804 | (else . ("if_statement" . "alternative")) | 809 | (else . ("if_statement" . "alternative")) |
| 805 | (do . "do_statement") | 810 | (do . "do_statement") |
diff --git a/lisp/progmodes/java-ts-mode.el b/lisp/progmodes/java-ts-mode.el index 5523b112d40..f69c0768a3d 100644 --- a/lisp/progmodes/java-ts-mode.el +++ b/lisp/progmodes/java-ts-mode.el | |||
| @@ -314,6 +314,7 @@ Return nil if there is no name or if NODE is not a defun node." | |||
| 314 | "constructor_body" | 314 | "constructor_body" |
| 315 | "annotation_type_body" | 315 | "annotation_type_body" |
| 316 | "interface_body" | 316 | "interface_body" |
| 317 | "lambda_expression" | ||
| 317 | "enum_body" | 318 | "enum_body" |
| 318 | "switch_block" | 319 | "switch_block" |
| 319 | "record_declaration_body" | 320 | "record_declaration_body" |
diff --git a/lisp/startup.el b/lisp/startup.el index 57a2aa3dd1d..cfe20d4b720 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -1609,7 +1609,8 @@ please check its value") | |||
| 1609 | ;; or EMACSLOADPATH, so we basically always have to check. | 1609 | ;; or EMACSLOADPATH, so we basically always have to check. |
| 1610 | (let (warned) | 1610 | (let (warned) |
| 1611 | (dolist (dir load-path) | 1611 | (dolist (dir load-path) |
| 1612 | (and (not warned) | 1612 | (and (not noninteractive) |
| 1613 | (not warned) | ||
| 1613 | (stringp dir) | 1614 | (stringp dir) |
| 1614 | (string-equal (file-name-as-directory (expand-file-name dir)) | 1615 | (string-equal (file-name-as-directory (expand-file-name dir)) |
| 1615 | (expand-file-name user-emacs-directory)) | 1616 | (expand-file-name user-emacs-directory)) |
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: | |||
| 318 | ;;;###autoload | 318 | ;;;###autoload |
| 319 | (defcustom ispell-personal-dictionary nil | 319 | (defcustom ispell-personal-dictionary nil |
| 320 | "File name of your personal spelling dictionary, or nil. | 320 | "File name of your personal spelling dictionary, or nil. |
| 321 | If nil, the default personal dictionary for your spelling checker is used." | 321 | If nil, the default personal dictionary for your spelling checker is used. |
| 322 | Due to a misfeature of Hunspell, if the value is an absolute file name, the | ||
| 323 | file by that name must already exist for Hunspell to be able to use it." | ||
| 322 | :type '(choice file | 324 | :type '(choice file |
| 323 | (const :tag "default" nil))) | 325 | (const :tag "default" nil))) |
| 324 | 326 | ||
| @@ -1730,7 +1732,10 @@ If you specify a personal dictionary for the current buffer which is | |||
| 1730 | different from the current personal dictionary, the effect is similar | 1732 | different from the current personal dictionary, the effect is similar |
| 1731 | to calling \\[ispell-change-dictionary]. This variable is automatically | 1733 | to calling \\[ispell-change-dictionary]. This variable is automatically |
| 1732 | set when defined in the file with either `ispell-pdict-keyword' or the | 1734 | set when defined in the file with either `ispell-pdict-keyword' or the |
| 1733 | local variable syntax.") | 1735 | local variable syntax. |
| 1736 | |||
| 1737 | Due to a misfeature of Hunspell, if the value is an absolute file name, the | ||
| 1738 | file by that name must already exist for Hunspell to be able to use it.") | ||
| 1734 | 1739 | ||
| 1735 | ;;;###autoload(put 'ispell-local-pdict 'safe-local-variable 'stringp) | 1740 | ;;;###autoload(put 'ispell-local-pdict 'safe-local-variable 'stringp) |
| 1736 | 1741 | ||
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. | |||
| 926 | end | 926 | end |
| 927 | 927 | ||
| 928 | define nextcons | 928 | define nextcons |
| 929 | p $.u.cdr | 929 | p $.u.s.u.cdr |
| 930 | xcons | 930 | xcons |
| 931 | end | 931 | end |
| 932 | document nextcons | 932 | document nextcons |
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, | |||
| 4991 | format_string ("%s_libgccjit_repro.c", SSDATA (ebase_name))); | 4991 | format_string ("%s_libgccjit_repro.c", SSDATA (ebase_name))); |
| 4992 | 4992 | ||
| 4993 | Lisp_Object tmp_file = | 4993 | Lisp_Object tmp_file = |
| 4994 | Fmake_temp_file_internal (base_name, Qnil, build_string (".eln.tmp"), Qnil); | 4994 | Fmake_temp_file_internal (base_name, make_fixnum (0), |
| 4995 | build_string (".eln.tmp"), Qnil); | ||
| 4995 | Lisp_Object encoded_tmp_file = ENCODE_FILE (tmp_file); | 4996 | Lisp_Object encoded_tmp_file = ENCODE_FILE (tmp_file); |
| 4996 | #ifdef WINDOWSNT | 4997 | #ifdef WINDOWSNT |
| 4997 | encoded_tmp_file = ansi_encode_filename (encoded_tmp_file); | 4998 | encoded_tmp_file = ansi_encode_filename (encoded_tmp_file); |
diff --git a/src/fileio.c b/src/fileio.c index 71f83ea6daf..375019c6fb6 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3979,8 +3979,6 @@ by calling `format-decode', which see. */) | |||
| 3979 | struct timespec mtime; | 3979 | struct timespec mtime; |
| 3980 | int fd; | 3980 | int fd; |
| 3981 | ptrdiff_t inserted = 0; | 3981 | ptrdiff_t inserted = 0; |
| 3982 | ptrdiff_t how_much; | ||
| 3983 | off_t beg_offset, end_offset; | ||
| 3984 | int unprocessed; | 3982 | int unprocessed; |
| 3985 | specpdl_ref count = SPECPDL_INDEX (); | 3983 | specpdl_ref count = SPECPDL_INDEX (); |
| 3986 | Lisp_Object handler, val, insval, orig_filename, old_undo; | 3984 | Lisp_Object handler, val, insval, orig_filename, old_undo; |
| @@ -3993,7 +3991,8 @@ by calling `format-decode', which see. */) | |||
| 3993 | bool replace_handled = false; | 3991 | bool replace_handled = false; |
| 3994 | bool set_coding_system = false; | 3992 | bool set_coding_system = false; |
| 3995 | Lisp_Object coding_system; | 3993 | Lisp_Object coding_system; |
| 3996 | bool read_quit = false; | 3994 | /* Negative if read error, 0 if OK so far, positive if quit. */ |
| 3995 | ptrdiff_t read_quit = 0; | ||
| 3997 | /* If the undo log only contains the insertion, there's no point | 3996 | /* If the undo log only contains the insertion, there's no point |
| 3998 | keeping it. It's typically when we first fill a file-buffer. */ | 3997 | keeping it. It's typically when we first fill a file-buffer. */ |
| 3999 | bool empty_undo_list_p | 3998 | bool empty_undo_list_p |
| @@ -4042,6 +4041,17 @@ by calling `format-decode', which see. */) | |||
| 4042 | goto handled; | 4041 | goto handled; |
| 4043 | } | 4042 | } |
| 4044 | 4043 | ||
| 4044 | if (!NILP (visit)) | ||
| 4045 | { | ||
| 4046 | if (!NILP (beg) || !NILP (end)) | ||
| 4047 | error ("Attempt to visit less than an entire file"); | ||
| 4048 | if (BEG < Z && NILP (replace)) | ||
| 4049 | error ("Cannot do file visiting in a non-empty buffer"); | ||
| 4050 | } | ||
| 4051 | |||
| 4052 | off_t beg_offset = !NILP (beg) ? file_offset (beg) : 0; | ||
| 4053 | off_t end_offset = !NILP (end) ? file_offset (end) : -1; | ||
| 4054 | |||
| 4045 | orig_filename = filename; | 4055 | orig_filename = filename; |
| 4046 | filename = ENCODE_FILE (filename); | 4056 | filename = ENCODE_FILE (filename); |
| 4047 | 4057 | ||
| @@ -4084,7 +4094,6 @@ by calling `format-decode', which see. */) | |||
| 4084 | if (!S_ISREG (st.st_mode)) | 4094 | if (!S_ISREG (st.st_mode)) |
| 4085 | { | 4095 | { |
| 4086 | regular = false; | 4096 | regular = false; |
| 4087 | seekable = lseek (fd, 0, SEEK_CUR) < 0; | ||
| 4088 | 4097 | ||
| 4089 | if (! NILP (visit)) | 4098 | if (! NILP (visit)) |
| 4090 | { | 4099 | { |
| @@ -4092,32 +4101,18 @@ by calling `format-decode', which see. */) | |||
| 4092 | goto notfound; | 4101 | goto notfound; |
| 4093 | } | 4102 | } |
| 4094 | 4103 | ||
| 4095 | if (!NILP (beg) && !seekable) | ||
| 4096 | xsignal2 (Qfile_error, | ||
| 4097 | build_string ("cannot use a start position in a non-seekable file/device"), | ||
| 4098 | orig_filename); | ||
| 4099 | |||
| 4100 | if (!NILP (replace)) | 4104 | if (!NILP (replace)) |
| 4101 | xsignal2 (Qfile_error, | 4105 | xsignal2 (Qfile_error, |
| 4102 | build_string ("not a regular file"), orig_filename); | 4106 | build_string ("not a regular file"), orig_filename); |
| 4103 | } | ||
| 4104 | 4107 | ||
| 4105 | if (!NILP (visit)) | 4108 | seekable = lseek (fd, 0, SEEK_CUR) < 0; |
| 4106 | { | 4109 | if (!NILP (beg) && !seekable) |
| 4107 | if (!NILP (beg) || !NILP (end)) | 4110 | xsignal2 (Qfile_error, |
| 4108 | error ("Attempt to visit less than an entire file"); | 4111 | build_string ("cannot use a start position in a non-seekable file/device"), |
| 4109 | if (BEG < Z && NILP (replace)) | 4112 | orig_filename); |
| 4110 | error ("Cannot do file visiting in a non-empty buffer"); | ||
| 4111 | } | 4113 | } |
| 4112 | 4114 | ||
| 4113 | if (!NILP (beg)) | 4115 | if (end_offset < 0) |
| 4114 | beg_offset = file_offset (beg); | ||
| 4115 | else | ||
| 4116 | beg_offset = 0; | ||
| 4117 | |||
| 4118 | if (!NILP (end)) | ||
| 4119 | end_offset = file_offset (end); | ||
| 4120 | else | ||
| 4121 | { | 4116 | { |
| 4122 | if (!regular) | 4117 | if (!regular) |
| 4123 | end_offset = TYPE_MAXIMUM (off_t); | 4118 | end_offset = TYPE_MAXIMUM (off_t); |
| @@ -4178,7 +4173,7 @@ by calling `format-decode', which see. */) | |||
| 4178 | else | 4173 | else |
| 4179 | { | 4174 | { |
| 4180 | /* Don't try looking inside a file for a coding system | 4175 | /* Don't try looking inside a file for a coding system |
| 4181 | specification if it is not seekable. */ | 4176 | specification if it is not a regular file. */ |
| 4182 | if (regular && !NILP (Vset_auto_coding_function)) | 4177 | if (regular && !NILP (Vset_auto_coding_function)) |
| 4183 | { | 4178 | { |
| 4184 | /* Find a coding system specified in the heading two | 4179 | /* Find a coding system specified in the heading two |
| @@ -4196,7 +4191,7 @@ by calling `format-decode', which see. */) | |||
| 4196 | if (nread == 1024) | 4191 | if (nread == 1024) |
| 4197 | { | 4192 | { |
| 4198 | int ntail; | 4193 | int ntail; |
| 4199 | if (lseek (fd, - (1024 * 3), SEEK_END) < 0) | 4194 | if (lseek (fd, st.st_size - 1024 * 3, SEEK_CUR) < 0) |
| 4200 | report_file_error ("Setting file position", | 4195 | report_file_error ("Setting file position", |
| 4201 | orig_filename); | 4196 | orig_filename); |
| 4202 | ntail = emacs_read_quit (fd, read_buf + nread, 1024 * 3); | 4197 | ntail = emacs_read_quit (fd, read_buf + nread, 1024 * 3); |
| @@ -4481,7 +4476,7 @@ by calling `format-decode', which see. */) | |||
| 4481 | ptrdiff_t bufpos; | 4476 | ptrdiff_t bufpos; |
| 4482 | unsigned char *decoded; | 4477 | unsigned char *decoded; |
| 4483 | ptrdiff_t temp; | 4478 | ptrdiff_t temp; |
| 4484 | ptrdiff_t this = 0; | 4479 | ptrdiff_t this; |
| 4485 | specpdl_ref this_count = SPECPDL_INDEX (); | 4480 | specpdl_ref this_count = SPECPDL_INDEX (); |
| 4486 | bool multibyte | 4481 | bool multibyte |
| 4487 | = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); | 4482 | = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); |
| @@ -4657,8 +4652,12 @@ by calling `format-decode', which see. */) | |||
| 4657 | } | 4652 | } |
| 4658 | 4653 | ||
| 4659 | move_gap_both (PT, PT_BYTE); | 4654 | move_gap_both (PT, PT_BYTE); |
| 4660 | if (GAP_SIZE < total) | 4655 | |
| 4661 | make_gap (total - GAP_SIZE); | 4656 | /* Ensure the gap is at least one byte larger than needed for the |
| 4657 | estimated file size, so that in the usual case we read to EOF | ||
| 4658 | without reallocating. */ | ||
| 4659 | if (GAP_SIZE <= total) | ||
| 4660 | make_gap (total - GAP_SIZE + 1); | ||
| 4662 | 4661 | ||
| 4663 | if (beg_offset != 0 || !NILP (replace)) | 4662 | if (beg_offset != 0 || !NILP (replace)) |
| 4664 | { | 4663 | { |
| @@ -4666,12 +4665,6 @@ by calling `format-decode', which see. */) | |||
| 4666 | report_file_error ("Setting file position", orig_filename); | 4665 | report_file_error ("Setting file position", orig_filename); |
| 4667 | } | 4666 | } |
| 4668 | 4667 | ||
| 4669 | /* In the following loop, HOW_MUCH contains the total bytes read so | ||
| 4670 | far for a regular file, and not changed for a special file. But, | ||
| 4671 | before exiting the loop, it is set to a negative value if I/O | ||
| 4672 | error occurs. */ | ||
| 4673 | how_much = 0; | ||
| 4674 | |||
| 4675 | /* Total bytes inserted. */ | 4668 | /* Total bytes inserted. */ |
| 4676 | inserted = 0; | 4669 | inserted = 0; |
| 4677 | 4670 | ||
| @@ -4680,23 +4673,26 @@ by calling `format-decode', which see. */) | |||
| 4680 | { | 4673 | { |
| 4681 | ptrdiff_t gap_size = GAP_SIZE; | 4674 | ptrdiff_t gap_size = GAP_SIZE; |
| 4682 | 4675 | ||
| 4683 | while (how_much < total) | 4676 | while (NILP (end) || inserted < total) |
| 4684 | { | 4677 | { |
| 4685 | /* `try' is reserved in some compilers (Microsoft C). */ | ||
| 4686 | ptrdiff_t trytry = min (total - how_much, READ_BUF_SIZE); | ||
| 4687 | ptrdiff_t this; | 4678 | ptrdiff_t this; |
| 4688 | 4679 | ||
| 4680 | if (gap_size == 0) | ||
| 4681 | { | ||
| 4682 | /* The size estimate was wrong. Make the gap 50% larger. */ | ||
| 4683 | make_gap (GAP_SIZE >> 1); | ||
| 4684 | gap_size = GAP_SIZE - inserted; | ||
| 4685 | } | ||
| 4686 | |||
| 4687 | /* 'try' is reserved in some compilers (Microsoft C). */ | ||
| 4688 | ptrdiff_t trytry = min (gap_size, READ_BUF_SIZE); | ||
| 4689 | if (!NILP (end)) | ||
| 4690 | trytry = min (trytry, total - inserted); | ||
| 4691 | |||
| 4689 | if (!seekable && NILP (end)) | 4692 | if (!seekable && NILP (end)) |
| 4690 | { | 4693 | { |
| 4691 | Lisp_Object nbytes; | 4694 | Lisp_Object nbytes; |
| 4692 | 4695 | ||
| 4693 | /* Maybe make more room. */ | ||
| 4694 | if (gap_size < trytry) | ||
| 4695 | { | ||
| 4696 | make_gap (trytry - gap_size); | ||
| 4697 | gap_size = GAP_SIZE - inserted; | ||
| 4698 | } | ||
| 4699 | |||
| 4700 | /* Read from the file, capturing `quit'. When an | 4696 | /* Read from the file, capturing `quit'. When an |
| 4701 | error occurs, end the loop, and arrange for a quit | 4697 | error occurs, end the loop, and arrange for a quit |
| 4702 | to be signaled after decoding the text we read. */ | 4698 | to be signaled after decoding the text we read. */ |
| @@ -4707,7 +4703,7 @@ by calling `format-decode', which see. */) | |||
| 4707 | 4703 | ||
| 4708 | if (NILP (nbytes)) | 4704 | if (NILP (nbytes)) |
| 4709 | { | 4705 | { |
| 4710 | read_quit = true; | 4706 | read_quit = 1; |
| 4711 | break; | 4707 | break; |
| 4712 | } | 4708 | } |
| 4713 | 4709 | ||
| @@ -4726,19 +4722,11 @@ by calling `format-decode', which see. */) | |||
| 4726 | 4722 | ||
| 4727 | if (this <= 0) | 4723 | if (this <= 0) |
| 4728 | { | 4724 | { |
| 4729 | how_much = this; | 4725 | read_quit = this; |
| 4730 | break; | 4726 | break; |
| 4731 | } | 4727 | } |
| 4732 | 4728 | ||
| 4733 | gap_size -= this; | 4729 | gap_size -= this; |
| 4734 | |||
| 4735 | /* For a regular file, where TOTAL is the real size, | ||
| 4736 | count HOW_MUCH to compare with it. | ||
| 4737 | For a special file, where TOTAL is just a buffer size, | ||
| 4738 | so don't bother counting in HOW_MUCH. | ||
| 4739 | (INSERTED is where we count the number of characters inserted.) */ | ||
| 4740 | if (seekable || !NILP (end)) | ||
| 4741 | how_much += this; | ||
| 4742 | inserted += this; | 4730 | inserted += this; |
| 4743 | } | 4731 | } |
| 4744 | } | 4732 | } |
| @@ -4759,7 +4747,7 @@ by calling `format-decode', which see. */) | |||
| 4759 | emacs_close (fd); | 4747 | emacs_close (fd); |
| 4760 | clear_unwind_protect (fd_index); | 4748 | clear_unwind_protect (fd_index); |
| 4761 | 4749 | ||
| 4762 | if (how_much < 0) | 4750 | if (read_quit < 0) |
| 4763 | report_file_error ("Read error", orig_filename); | 4751 | report_file_error ("Read error", orig_filename); |
| 4764 | 4752 | ||
| 4765 | notfound: | 4753 | notfound: |
diff --git a/src/pdumper.c b/src/pdumper.c index dbdeae9a799..baa33c4f647 100644 --- a/src/pdumper.c +++ b/src/pdumper.c | |||
| @@ -2748,7 +2748,7 @@ dump_hash_table (struct dump_context *ctx, | |||
| 2748 | static dump_off | 2748 | static dump_off |
| 2749 | dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer) | 2749 | dump_buffer (struct dump_context *ctx, const struct buffer *in_buffer) |
| 2750 | { | 2750 | { |
| 2751 | #if CHECK_STRUCTS && !defined HASH_buffer_DB34E5D09F | 2751 | #if CHECK_STRUCTS && !defined HASH_buffer_85D317CE74 |
| 2752 | # error "buffer changed. See CHECK_STRUCTS comment in config.h." | 2752 | # error "buffer changed. See CHECK_STRUCTS comment in config.h." |
| 2753 | #endif | 2753 | #endif |
| 2754 | struct buffer munged_buffer = *in_buffer; | 2754 | struct buffer munged_buffer = *in_buffer; |
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 33afe820c58..d29e48c0774 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'." | |||
| 4638 | 4638 | ||
| 4639 | ;; This test is inspired by Bug#51386, Bug#52758, Bug#53513, Bug#54042 | 4639 | ;; This test is inspired by Bug#51386, Bug#52758, Bug#53513, Bug#54042 |
| 4640 | ;; and Bug#60505. | 4640 | ;; and Bug#60505. |
| 4641 | ;; TODO: Add tests for user names and multi-hop file names. | ||
| 4642 | (ert-deftest tramp-test26-interactive-file-name-completion () | 4641 | (ert-deftest tramp-test26-interactive-file-name-completion () |
| 4643 | "Check interactive completion with different `completion-styles'." | 4642 | "Check interactive completion with different `completion-styles'." |
| 4644 | (tramp-cleanup-connection tramp-test-vec nil 'keep-password) | 4643 | (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'." | |||
| 4649 | (let ((method (file-remote-p ert-remote-temporary-file-directory 'method)) | 4648 | (let ((method (file-remote-p ert-remote-temporary-file-directory 'method)) |
| 4650 | (user (file-remote-p ert-remote-temporary-file-directory 'user)) | 4649 | (user (file-remote-p ert-remote-temporary-file-directory 'user)) |
| 4651 | (host (file-remote-p ert-remote-temporary-file-directory 'host)) | 4650 | (host (file-remote-p ert-remote-temporary-file-directory 'host)) |
| 4651 | (hop (file-remote-p ert-remote-temporary-file-directory 'hop)) | ||
| 4652 | (orig-syntax tramp-syntax) | 4652 | (orig-syntax tramp-syntax) |
| 4653 | (non-essential t) | 4653 | (non-essential t) |
| 4654 | (inhibit-message t)) | 4654 | (inhibit-message t)) |
| 4655 | (when (and (stringp host) (string-match tramp-host-with-port-regexp host)) | 4655 | (when (and (stringp host) (string-match tramp-host-with-port-regexp host)) |
| 4656 | (setq host (match-string 1 host))) | 4656 | (setq host (match-string 1 host))) |
| 4657 | 4657 | ||
| 4658 | ;; (trace-function #'tramp-completion-file-name-handler) | ||
| 4659 | ;; (trace-function #'completion-file-name-table) | ||
| 4658 | (unwind-protect | 4660 | (unwind-protect |
| 4659 | (dolist (syntax (if (tramp--test-expensive-test-p) | 4661 | (dolist (syntax (if (tramp--test-expensive-test-p) |
| 4660 | (tramp-syntax-values) `(,orig-syntax))) | 4662 | (tramp-syntax-values) `(,orig-syntax))) |
| @@ -4689,25 +4691,29 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4689 | (ipv6-postfix | 4691 | (ipv6-postfix |
| 4690 | (and (string-match-p tramp-ipv6-regexp host) | 4692 | (and (string-match-p tramp-ipv6-regexp host) |
| 4691 | tramp-postfix-ipv6-format)) | 4693 | tramp-postfix-ipv6-format)) |
| 4694 | ;; The hop string fits only the initial syntax. | ||
| 4695 | (hop (and (eq tramp-syntax orig-syntax) hop)) | ||
| 4692 | test result completions) | 4696 | test result completions) |
| 4693 | 4697 | ||
| 4694 | (dolist | 4698 | (dolist |
| 4695 | (test-and-result | 4699 | (test-and-result |
| 4696 | ;; These are triples (TEST-STRING SINGLE-RESULT | 4700 | ;; These are triples (TEST-STRING RESULT-CHECK |
| 4697 | ;; COMPLETION-RESULT). | 4701 | ;; COMPLETION-CHECK). |
| 4698 | (append | 4702 | (append |
| 4699 | ;; Complete method name. | 4703 | ;; Complete method name. |
| 4700 | (unless (string-empty-p tramp-method-regexp) | 4704 | (unless (string-empty-p tramp-method-regexp) |
| 4701 | `((,(concat | 4705 | `((,(concat |
| 4702 | tramp-prefix-format | 4706 | tramp-prefix-format hop |
| 4703 | (substring-no-properties method 0 2)) | 4707 | (substring-no-properties |
| 4708 | method 0 (min 2 (length method)))) | ||
| 4704 | ,(concat tramp-prefix-format method-string) | 4709 | ,(concat tramp-prefix-format method-string) |
| 4705 | ,method-string))) | 4710 | ,method-string))) |
| 4706 | ;; Complete user name. | 4711 | ;; Complete user name. |
| 4707 | (unless (tramp-string-empty-or-nil-p user) | 4712 | (unless (tramp-string-empty-or-nil-p user) |
| 4708 | `((,(concat | 4713 | `((,(concat |
| 4709 | tramp-prefix-format method-string | 4714 | tramp-prefix-format hop method-string |
| 4710 | (substring-no-properties user 0 2)) | 4715 | (substring-no-properties |
| 4716 | user 0 (min 2 (length user)))) | ||
| 4711 | ,(concat | 4717 | ,(concat |
| 4712 | tramp-prefix-format method-string | 4718 | tramp-prefix-format method-string |
| 4713 | user tramp-postfix-user-format) | 4719 | user tramp-postfix-user-format) |
| @@ -4716,8 +4722,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4716 | ;; Complete host name. | 4722 | ;; Complete host name. |
| 4717 | (unless (tramp-string-empty-or-nil-p host) | 4723 | (unless (tramp-string-empty-or-nil-p host) |
| 4718 | `((,(concat | 4724 | `((,(concat |
| 4719 | tramp-prefix-format method-string | 4725 | tramp-prefix-format hop method-string |
| 4720 | ipv6-prefix (substring-no-properties host 0 2)) | 4726 | ipv6-prefix |
| 4727 | (substring-no-properties | ||
| 4728 | host 0 (min 2 (length host)))) | ||
| 4721 | ,(concat | 4729 | ,(concat |
| 4722 | tramp-prefix-format method-string | 4730 | tramp-prefix-format method-string |
| 4723 | ipv6-prefix host | 4731 | ipv6-prefix host |
| @@ -4729,9 +4737,11 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4729 | (unless (or (tramp-string-empty-or-nil-p user) | 4737 | (unless (or (tramp-string-empty-or-nil-p user) |
| 4730 | (tramp-string-empty-or-nil-p host)) | 4738 | (tramp-string-empty-or-nil-p host)) |
| 4731 | `((,(concat | 4739 | `((,(concat |
| 4732 | tramp-prefix-format method-string | 4740 | tramp-prefix-format hop method-string |
| 4733 | user tramp-postfix-user-format | 4741 | user tramp-postfix-user-format |
| 4734 | ipv6-prefix (substring-no-properties host 0 2)) | 4742 | ipv6-prefix |
| 4743 | (substring-no-properties | ||
| 4744 | host 0 (min 2 (length host)))) | ||
| 4735 | ,(concat | 4745 | ,(concat |
| 4736 | tramp-prefix-format method-string | 4746 | tramp-prefix-format method-string |
| 4737 | user tramp-postfix-user-format | 4747 | user tramp-postfix-user-format |
| @@ -4742,12 +4752,14 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4742 | ipv6-postfix tramp-postfix-host-format)))))) | 4752 | ipv6-postfix tramp-postfix-host-format)))))) |
| 4743 | 4753 | ||
| 4744 | (ignore-errors (kill-buffer "*Completions*")) | 4754 | (ignore-errors (kill-buffer "*Completions*")) |
| 4755 | ;; (and (bufferp trace-buffer) (kill-buffer trace-buffer)) | ||
| 4745 | (discard-input) | 4756 | (discard-input) |
| 4746 | (setq test (car test-and-result) | 4757 | (setq test (car test-and-result) |
| 4747 | unread-command-events | 4758 | unread-command-events |
| 4748 | (mapcar #'identity (concat test "\t\t\n")) | 4759 | (mapcar #'identity (concat test "\t\t\n")) |
| 4749 | completions nil | 4760 | completions nil |
| 4750 | result (read-file-name "Prompt: ")) | 4761 | result (read-file-name "Prompt: ")) |
| 4762 | |||
| 4751 | (if (not (get-buffer "*Completions*")) | 4763 | (if (not (get-buffer "*Completions*")) |
| 4752 | (progn | 4764 | (progn |
| 4753 | ;; (tramp--test-message | 4765 | ;; (tramp--test-message |
| @@ -4776,6 +4788,9 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." | |||
| 4776 | (should (member (caddr test-and-result) completions))))))) | 4788 | (should (member (caddr test-and-result) completions))))))) |
| 4777 | 4789 | ||
| 4778 | ;; Cleanup. | 4790 | ;; Cleanup. |
| 4791 | ;; (tramp--test-message "%s" (tramp-get-buffer-string trace-buffer)) | ||
| 4792 | ;; (untrace-function #'tramp-completion-file-name-handler) | ||
| 4793 | ;; (untrace-function #'completion-file-name-table) | ||
| 4779 | (tramp-change-syntax orig-syntax))))) | 4794 | (tramp-change-syntax orig-syntax))))) |
| 4780 | 4795 | ||
| 4781 | (ert-deftest tramp-test27-load () | 4796 | (ert-deftest tramp-test27-load () |
| @@ -5527,7 +5542,7 @@ If UNSTABLE is non-nil, the test is tagged as `:unstable'." | |||
| 5527 | ;; (tramp--test-message "%s" attributes) | 5542 | ;; (tramp--test-message "%s" attributes) |
| 5528 | (should (equal (cdr (assq 'comm attributes)) (car command))) | 5543 | (should (equal (cdr (assq 'comm attributes)) (car command))) |
| 5529 | (should (equal (cdr (assq 'args attributes)) | 5544 | (should (equal (cdr (assq 'args attributes)) |
| 5530 | (mapconcat #'identity command " "))))) | 5545 | (string-join command " "))))) |
| 5531 | 5546 | ||
| 5532 | ;; Cleanup. | 5547 | ;; Cleanup. |
| 5533 | (ignore-errors (delete-process proc))))) | 5548 | (ignore-errors (delete-process proc))))) |
| @@ -6088,8 +6103,7 @@ INPUT, if non-nil, is a string sent to the process." | |||
| 6088 | ;; We make a super long `tramp-remote-path'. | 6103 | ;; We make a super long `tramp-remote-path'. |
| 6089 | (make-directory tmp-name) | 6104 | (make-directory tmp-name) |
| 6090 | (should (file-directory-p tmp-name)) | 6105 | (should (file-directory-p tmp-name)) |
| 6091 | (while (tramp-compat-length< | 6106 | (while (tramp-compat-length< (string-join orig-exec-path ":") 5000) |
| 6092 | (mapconcat #'identity orig-exec-path ":") 5000) | ||
| 6093 | (let ((dir (make-temp-file (file-name-as-directory tmp-name) 'dir))) | 6107 | (let ((dir (make-temp-file (file-name-as-directory tmp-name) 'dir))) |
| 6094 | (should (file-directory-p dir)) | 6108 | (should (file-directory-p dir)) |
| 6095 | (setq tramp-remote-path | 6109 | (setq tramp-remote-path |
| @@ -6111,8 +6125,7 @@ INPUT, if non-nil, is a string sent to the process." | |||
| 6111 | tramp-test-vec "pipe-buf" 4096)) | 6125 | tramp-test-vec "pipe-buf" 4096)) |
| 6112 | ;; The last element of `exec-path' is `exec-directory'. | 6126 | ;; The last element of `exec-path' is `exec-directory'. |
| 6113 | (should | 6127 | (should |
| 6114 | (string-equal | 6128 | (string-equal path (string-join (butlast orig-exec-path) ":")))) |
| 6115 | path (mapconcat #'identity (butlast orig-exec-path) ":")))) | ||
| 6116 | ;; The shell "sh" shall always exist. | 6129 | ;; The shell "sh" shall always exist. |
| 6117 | (should (executable-find "sh" 'remote))) | 6130 | (should (executable-find "sh" 'remote))) |
| 6118 | 6131 | ||
| @@ -7167,7 +7180,7 @@ This requires restrictions of file name syntax." | |||
| 7167 | ;; Simplify test in order to speed up. | 7180 | ;; Simplify test in order to speed up. |
| 7168 | (apply #'tramp--test-check-files | 7181 | (apply #'tramp--test-check-files |
| 7169 | (if (tramp--test-expensive-test-p) | 7182 | (if (tramp--test-expensive-test-p) |
| 7170 | files (list (mapconcat #'identity files "")))))) | 7183 | files (list (string-join files "")))))) |
| 7171 | 7184 | ||
| 7172 | (tramp--test-deftest-with-stat tramp-test41-special-characters) | 7185 | (tramp--test-deftest-with-stat tramp-test41-special-characters) |
| 7173 | 7186 | ||
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) | |||
| 182 | return 3; | 182 | return 3; |
| 183 | =-=-= | 183 | =-=-= |
| 184 | 184 | ||
| 185 | Name: Initializer List (Bug#61398) | ||
| 186 | |||
| 187 | =-= | ||
| 188 | int main() | ||
| 189 | { | ||
| 190 | const char *emoticons[][2] = | ||
| 191 | { | ||
| 192 | {":-)", "SLIGHTLY SMILING FACE"}, | ||
| 193 | {";-)", "WINKING FACE"}, | ||
| 194 | {":-(", "SLIGHTLY FROWNING FACE"}, | ||
| 195 | }; | ||
| 196 | } | ||
| 197 | =-=-= | ||
| 198 | |||
| 185 | Name: Multiline Block Comments 1 (bug#60270) | 199 | Name: Multiline Block Comments 1 (bug#60270) |
| 186 | 200 | ||
| 187 | =-= | 201 | =-= |
| @@ -327,3 +341,16 @@ void foo( | |||
| 327 | } | 341 | } |
| 328 | } | 342 | } |
| 329 | =-=-= | 343 | =-=-= |
| 344 | |||
| 345 | Name: Initializer List (Linux Style) (Bug#61398) | ||
| 346 | |||
| 347 | =-= | ||
| 348 | int main() | ||
| 349 | { | ||
| 350 | const char *emoticons[][2] = { | ||
| 351 | {":-)", "SLIGHTLY SMILING FACE"}, | ||
| 352 | {";-)", "WINKING FACE"}, | ||
| 353 | {":-(", "SLIGHTLY FROWNING FACE"}, | ||
| 354 | }; | ||
| 355 | } | ||
| 356 | =-=-= | ||