diff options
| author | Po Lu | 2024-06-25 11:38:01 +0800 |
|---|---|---|
| committer | Po Lu | 2024-06-25 11:38:01 +0800 |
| commit | 34e2adc6997a42d87156972fb2dfee311e996d2c (patch) | |
| tree | d1e13d0b4afc330be5d6e9272c9bd2965e3dc63a | |
| parent | 279974c14ebb17eb6c29a5cfa3390a682b4fcc7e (diff) | |
| parent | 1b4c56272110944c4ea1483c6f9662de9e42a07b (diff) | |
| download | emacs-34e2adc6997a42d87156972fb2dfee311e996d2c.tar.gz emacs-34e2adc6997a42d87156972fb2dfee311e996d2c.zip | |
Merge from savannah/emacs-30
1b4c5627211 Fix latent side-effects of respecting field boundaries in...
e4046f33ab8 ; * lisp/simple.el (undo-auto--boundaries): Doc fix (bug#...
008eeb21fdb ; * lisp/language/cyrillic.el: Delete obsolete commentary...
680155d3f03 Add missing builtin package declarations
| -rw-r--r-- | lisp/editorconfig-conf-mode.el | 1 | ||||
| -rw-r--r-- | lisp/editorconfig-core-handle.el | 1 | ||||
| -rw-r--r-- | lisp/editorconfig-core.el | 1 | ||||
| -rw-r--r-- | lisp/editorconfig-fnmatch.el | 1 | ||||
| -rw-r--r-- | lisp/editorconfig-tools.el | 1 | ||||
| -rw-r--r-- | lisp/language/cyrillic.el | 13 | ||||
| -rw-r--r-- | lisp/simple.el | 2 | ||||
| -rw-r--r-- | src/textconv.c | 25 |
8 files changed, 23 insertions, 22 deletions
diff --git a/lisp/editorconfig-conf-mode.el b/lisp/editorconfig-conf-mode.el index 3102c3d6581..6afbb42865e 100644 --- a/lisp/editorconfig-conf-mode.el +++ b/lisp/editorconfig-conf-mode.el | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | ;; Copyright (C) 2011-2024 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2011-2024 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: EditorConfig Team <editorconfig@googlegroups.com> | 5 | ;; Author: EditorConfig Team <editorconfig@googlegroups.com> |
| 6 | ;; Package: editorconfig | ||
| 6 | 7 | ||
| 7 | ;; See | 8 | ;; See |
| 8 | ;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or | 9 | ;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or |
diff --git a/lisp/editorconfig-core-handle.el b/lisp/editorconfig-core-handle.el index b8570ac5c6a..96d0723d9e0 100644 --- a/lisp/editorconfig-core-handle.el +++ b/lisp/editorconfig-core-handle.el | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | ;; Copyright (C) 2011-2024 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2011-2024 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: EditorConfig Team <editorconfig@googlegroups.com> | 5 | ;; Author: EditorConfig Team <editorconfig@googlegroups.com> |
| 6 | ;; Package: editorconfig | ||
| 6 | 7 | ||
| 7 | ;; See | 8 | ;; See |
| 8 | ;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or | 9 | ;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or |
diff --git a/lisp/editorconfig-core.el b/lisp/editorconfig-core.el index 8183ff6298c..3d7ea88917c 100644 --- a/lisp/editorconfig-core.el +++ b/lisp/editorconfig-core.el | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | ;; Copyright (C) 2011-2024 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2011-2024 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: EditorConfig Team <editorconfig@googlegroups.com> | 5 | ;; Author: EditorConfig Team <editorconfig@googlegroups.com> |
| 6 | ;; Package: editorconfig | ||
| 6 | 7 | ||
| 7 | ;; See | 8 | ;; See |
| 8 | ;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or | 9 | ;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or |
diff --git a/lisp/editorconfig-fnmatch.el b/lisp/editorconfig-fnmatch.el index 397e424a6f7..8d6e9bb9071 100644 --- a/lisp/editorconfig-fnmatch.el +++ b/lisp/editorconfig-fnmatch.el | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | ;; Copyright (C) 2011-2024 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2011-2024 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: EditorConfig Team <editorconfig@googlegroups.com> | 5 | ;; Author: EditorConfig Team <editorconfig@googlegroups.com> |
| 6 | ;; Package: editorconfig | ||
| 6 | 7 | ||
| 7 | ;; See | 8 | ;; See |
| 8 | ;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or | 9 | ;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or |
diff --git a/lisp/editorconfig-tools.el b/lisp/editorconfig-tools.el index 512dd67f56f..b9bd3798647 100644 --- a/lisp/editorconfig-tools.el +++ b/lisp/editorconfig-tools.el | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | ;; Copyright (C) 2011-2024 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2011-2024 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: EditorConfig Team <editorconfig@googlegroups.com> | 5 | ;; Author: EditorConfig Team <editorconfig@googlegroups.com> |
| 6 | ;; Package: editorconfig | ||
| 6 | 7 | ||
| 7 | ;; See | 8 | ;; See |
| 8 | ;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or | 9 | ;; https://github.com/editorconfig/editorconfig-emacs/graphs/contributors or |
diff --git a/lisp/language/cyrillic.el b/lisp/language/cyrillic.el index 87a67915878..f5eef11cfde 100644 --- a/lisp/language/cyrillic.el +++ b/lisp/language/cyrillic.el | |||
| @@ -33,23 +33,12 @@ | |||
| 33 | ;; are converted to Unicode internally. See | 33 | ;; are converted to Unicode internally. See |
| 34 | ;; <URL:http://www.ecma.ch/ecma1/STAND/ECMA-113.HTM>. For more info | 34 | ;; <URL:http://www.ecma.ch/ecma1/STAND/ECMA-113.HTM>. For more info |
| 35 | ;; on Cyrillic charsets, see | 35 | ;; on Cyrillic charsets, see |
| 36 | ;; <URL:https://czyborra.com/charsets/cyrillic.html>. The KOI and | 36 | ;; <URL:https://czyborra.com/charsets/cyrillic.html>. |
| 37 | ;; Alternativnyj coding systems should live in code-pages.el, but | ||
| 38 | ;; they've always been preloaded and the coding system autoload | ||
| 39 | ;; mechanism didn't get accepted, so they have to stay here and | ||
| 40 | ;; duplicate code-pages stuff. | ||
| 41 | 37 | ||
| 42 | ;; Note that 8859-5 maps directly onto the Unicode Cyrillic block, | 38 | ;; Note that 8859-5 maps directly onto the Unicode Cyrillic block, |
| 43 | ;; apart from codepoints 160 (NBSP, c.f. U+0400), 173 (soft hyphen, | 39 | ;; apart from codepoints 160 (NBSP, c.f. U+0400), 173 (soft hyphen, |
| 44 | ;; c.f. U+04OD) and 253 (section sign, c.f U+045D). The KOI-8 and | 40 | ;; c.f. U+04OD) and 253 (section sign, c.f U+045D). The KOI-8 and |
| 45 | ;; Alternativnyj coding systems encode both 8859-5 and Unicode. | 41 | ;; Alternativnyj coding systems encode both 8859-5 and Unicode. |
| 46 | ;; ucs-tables.el provides unification for cyrillic-iso-8bit. | ||
| 47 | |||
| 48 | ;; Customizing `utf-fragment-on-decoding' allows decoding characters | ||
| 49 | ;; from KOI and Alternativnyj into 8859-5 where that's possible. | ||
| 50 | ;; cyrillic-iso8859-5 characters take half as much space in the buffer | ||
| 51 | ;; as the mule-unicode-0100-24ff equivalents, though that's probably | ||
| 52 | ;; not normally a big deal. | ||
| 53 | 42 | ||
| 54 | ;;; Code: | 43 | ;;; Code: |
| 55 | 44 | ||
diff --git a/lisp/simple.el b/lisp/simple.el index b48f46fc711..c798ee010b1 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -4061,7 +4061,7 @@ REASON describes the reason that the boundary is being added; see | |||
| 4061 | (defun undo-auto--boundaries (cause) | 4061 | (defun undo-auto--boundaries (cause) |
| 4062 | "Check recently changed buffers and add a boundary if necessary. | 4062 | "Check recently changed buffers and add a boundary if necessary. |
| 4063 | REASON describes the reason that the boundary is being added; see | 4063 | REASON describes the reason that the boundary is being added; see |
| 4064 | `undo-last-boundary' for more information." | 4064 | `undo-auto--last-boundary-cause' for more information." |
| 4065 | ;; (Bug #23785) All commands should ensure that there is an undo | 4065 | ;; (Bug #23785) All commands should ensure that there is an undo |
| 4066 | ;; boundary whether they have changed the current buffer or not. | 4066 | ;; boundary whether they have changed the current buffer or not. |
| 4067 | (when (eq cause 'command) | 4067 | (when (eq cause 'command) |
diff --git a/src/textconv.c b/src/textconv.c index 0e43bd9d458..e3f928cd789 100644 --- a/src/textconv.c +++ b/src/textconv.c | |||
| @@ -153,6 +153,15 @@ select_window (Lisp_Object window, Lisp_Object norecord) | |||
| 153 | Fselect_window (window, norecord); | 153 | Fselect_window (window, norecord); |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | /* Restore the selected window WINDOW. */ | ||
| 157 | |||
| 158 | static void | ||
| 159 | restore_selected_window (Lisp_Object window) | ||
| 160 | { | ||
| 161 | /* FIXME: not sure what to do if WINDOW has been deleted. */ | ||
| 162 | select_window (window, Qt); | ||
| 163 | } | ||
| 164 | |||
| 156 | /* Perform the text conversion operation specified in QUERY and return | 165 | /* Perform the text conversion operation specified in QUERY and return |
| 157 | the results. | 166 | the results. |
| 158 | 167 | ||
| @@ -188,6 +197,7 @@ textconv_query (struct frame *f, struct textconv_callback_struct *query, | |||
| 188 | selected window. */ | 197 | selected window. */ |
| 189 | count = SPECPDL_INDEX (); | 198 | count = SPECPDL_INDEX (); |
| 190 | record_unwind_protect_excursion (); | 199 | record_unwind_protect_excursion (); |
| 200 | record_unwind_protect (restore_selected_window, selected_window); | ||
| 191 | 201 | ||
| 192 | /* Inhibit quitting. */ | 202 | /* Inhibit quitting. */ |
| 193 | specbind (Qinhibit_quit, Qt); | 203 | specbind (Qinhibit_quit, Qt); |
| @@ -586,15 +596,6 @@ detect_conversion_events (void) | |||
| 586 | return false; | 596 | return false; |
| 587 | } | 597 | } |
| 588 | 598 | ||
| 589 | /* Restore the selected window WINDOW. */ | ||
| 590 | |||
| 591 | static void | ||
| 592 | restore_selected_window (Lisp_Object window) | ||
| 593 | { | ||
| 594 | /* FIXME: not sure what to do if WINDOW has been deleted. */ | ||
| 595 | select_window (window, Qt); | ||
| 596 | } | ||
| 597 | |||
| 598 | /* Commit the given text in the composing region. If there is no | 599 | /* Commit the given text in the composing region. If there is no |
| 599 | composing region, then insert the text after frame F's selected | 600 | composing region, then insert the text after frame F's selected |
| 600 | window's last point instead, unless the mark is active. Finally, | 601 | window's last point instead, unless the mark is active. Finally, |
| @@ -1138,6 +1139,10 @@ locate_and_save_position_in_field (struct frame *f, struct window *w, | |||
| 1138 | 1139 | ||
| 1139 | /* Set the current buffer to W's. */ | 1140 | /* Set the current buffer to W's. */ |
| 1140 | count = SPECPDL_INDEX (); | 1141 | count = SPECPDL_INDEX (); |
| 1142 | |||
| 1143 | /* The current buffer must be saved, not merely the selected | ||
| 1144 | window. */ | ||
| 1145 | record_unwind_protect_excursion (); | ||
| 1141 | record_unwind_protect (restore_selected_window, selected_window); | 1146 | record_unwind_protect (restore_selected_window, selected_window); |
| 1142 | XSETWINDOW (window, w); | 1147 | XSETWINDOW (window, w); |
| 1143 | select_window (window, Qt); | 1148 | select_window (window, Qt); |
| @@ -2097,6 +2102,7 @@ get_extracted_text (struct frame *f, ptrdiff_t n, | |||
| 2097 | selected window. */ | 2102 | selected window. */ |
| 2098 | count = SPECPDL_INDEX (); | 2103 | count = SPECPDL_INDEX (); |
| 2099 | record_unwind_protect_excursion (); | 2104 | record_unwind_protect_excursion (); |
| 2105 | record_unwind_protect (restore_selected_window, selected_window); | ||
| 2100 | 2106 | ||
| 2101 | /* Inhibit quitting. */ | 2107 | /* Inhibit quitting. */ |
| 2102 | specbind (Qinhibit_quit, Qt); | 2108 | specbind (Qinhibit_quit, Qt); |
| @@ -2219,6 +2225,7 @@ get_surrounding_text (struct frame *f, ptrdiff_t left, | |||
| 2219 | selected window. */ | 2225 | selected window. */ |
| 2220 | count = SPECPDL_INDEX (); | 2226 | count = SPECPDL_INDEX (); |
| 2221 | record_unwind_protect_excursion (); | 2227 | record_unwind_protect_excursion (); |
| 2228 | record_unwind_protect (restore_selected_window, selected_window); | ||
| 2222 | 2229 | ||
| 2223 | /* Inhibit quitting. */ | 2230 | /* Inhibit quitting. */ |
| 2224 | specbind (Qinhibit_quit, Qt); | 2231 | specbind (Qinhibit_quit, Qt); |