diff options
| author | Eli Zaretskii | 2023-08-12 13:50:38 -0400 |
|---|---|---|
| committer | Eli Zaretskii | 2023-08-12 13:50:38 -0400 |
| commit | 3fc9793a260feed0deda8b6bdfd3e1c73774181a (patch) | |
| tree | a0ec5882b60ae1a5deff188971f6ae3586d5d0fa /src | |
| parent | 276bf5369ffa47f994586b932cb6a9dd760ecfeb (diff) | |
| parent | 842dbf500e0fcf44d686d480f39d067b19ff38a9 (diff) | |
| download | emacs-3fc9793a260feed0deda8b6bdfd3e1c73774181a.tar.gz emacs-3fc9793a260feed0deda8b6bdfd3e1c73774181a.zip | |
Merge from origin/emacs-29
842dbf500e0 * Fix `batch-byte+native-compile' target directory.
8dbd5aa1eef Avoid crashes in 'display_count_lines' when current buffe...
47b4f4cf783 ; * doc/emacs/mini.texi (Completion Commands): Fix a typo...
78999d52136 Update csharp tree-sitter support due to upstream changes
556cb01b48e Substitute command keys in 'ielm-header' at use time
99367078e50 ; * etc/PROBLEMS: Add entry about XIM problems (bug#65205).
03e897c08fa Fix rare crashes in redisplay due to problems with fontsets
b1ba06a1e4b Fix a typo in 'leuven-dark-theme.el'
e80a9dcabb9 ; * admin/git-bisect-start: Update failing commits
9091f42784b ; * admin/git-bisect-start: Update failing commits
344ac529ca9 ; * etc/PROBLEMS: Fix typo.
bccf848b26c Adapt Tramp test
71bc060e403 Properly expand the JSX indentation rules in 'js-ts-mode'
889cfb42ed9 * Add `emacs-lisp-native-compile' to easy-menu.
4535aafa8a3 * lisp/progmodes/elisp-mode.el (emacs-lisp-mode-menu): Si...
173af0cad51 * Introduce `emacs-lisp-native-compile'.
063d7d89d7a Fix the -x switch in non-X builds
5a7fb0b39b7 Document that `set-mouse-color' does not work everywhere
d06fc72496f ; * doc/emacs/dired.texi (Misc Dired Features): Fix last ...
97b8ac376b5 Fix the effects and documentation of 'dired-free-space'
75c72e59f69 ; Fix typo
6d11b7b3007 Fix cross-reference to eldoc in eglot manual
913e50aba6c Add native-compilation to Emacs Lisp mode menu
b93107c20b2 Fix emacs-lisp-native-compile-and-load eln target directo...
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs.c | 24 | ||||
| -rw-r--r-- | src/fns.c | 3 | ||||
| -rw-r--r-- | src/xdisp.c | 23 |
3 files changed, 29 insertions, 21 deletions
diff --git a/src/emacs.c b/src/emacs.c index 36914967dc7..687b8c7f81f 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -2077,15 +2077,16 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 2077 | } | 2077 | } |
| 2078 | #endif /* HAVE_NS */ | 2078 | #endif /* HAVE_NS */ |
| 2079 | 2079 | ||
| 2080 | #ifdef HAVE_X_WINDOWS | ||
| 2081 | /* Stupid kludge to catch command-line display spec. We can't | 2080 | /* Stupid kludge to catch command-line display spec. We can't |
| 2082 | handle this argument entirely in window system dependent code | 2081 | handle this argument entirely in window system dependent code |
| 2083 | because we don't even know which window system dependent code | 2082 | because we don't even know which window system dependent code |
| 2084 | to run until we've recognized this argument. */ | 2083 | to run until we've recognized this argument. */ |
| 2085 | { | 2084 | { |
| 2086 | char *displayname = 0; | ||
| 2087 | int count_before = skip_args; | 2085 | int count_before = skip_args; |
| 2088 | 2086 | ||
| 2087 | #ifdef HAVE_X_WINDOWS | ||
| 2088 | char *displayname = 0; | ||
| 2089 | |||
| 2089 | /* Skip any number of -d options, but only use the last one. */ | 2090 | /* Skip any number of -d options, but only use the last one. */ |
| 2090 | while (!only_version) | 2091 | while (!only_version) |
| 2091 | { | 2092 | { |
| @@ -2115,12 +2116,15 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 2115 | } | 2116 | } |
| 2116 | argv[count_before + 1] = (char *) "-d"; | 2117 | argv[count_before + 1] = (char *) "-d"; |
| 2117 | } | 2118 | } |
| 2119 | #endif /* HAVE_X_WINDOWS */ | ||
| 2118 | 2120 | ||
| 2119 | if (! no_site_lisp) | 2121 | if (! no_site_lisp) |
| 2120 | { | 2122 | { |
| 2121 | if (argmatch (argv, argc, "-Q", "--quick", 3, NULL, &skip_args) | 2123 | |
| 2124 | if (argmatch (argv, argc, "-Q", "--quick", 3, NULL, &skip_args) | ||
| 2122 | || argmatch (argv, argc, "-quick", 0, 2, NULL, &skip_args)) | 2125 | || argmatch (argv, argc, "-quick", 0, 2, NULL, &skip_args)) |
| 2123 | no_site_lisp = 1; | 2126 | no_site_lisp = 1; |
| 2127 | |||
| 2124 | } | 2128 | } |
| 2125 | 2129 | ||
| 2126 | if (argmatch (argv, argc, "-x", 0, 1, &junk, &skip_args)) | 2130 | if (argmatch (argv, argc, "-x", 0, 1, &junk, &skip_args)) |
| @@ -2136,18 +2140,6 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem | |||
| 2136 | /* Don't actually discard this arg. */ | 2140 | /* Don't actually discard this arg. */ |
| 2137 | skip_args = count_before; | 2141 | skip_args = count_before; |
| 2138 | } | 2142 | } |
| 2139 | #else /* !HAVE_X_WINDOWS */ | ||
| 2140 | if (! no_site_lisp) | ||
| 2141 | { | ||
| 2142 | int count_before = skip_args; | ||
| 2143 | |||
| 2144 | if (argmatch (argv, argc, "-Q", "--quick", 3, NULL, &skip_args) | ||
| 2145 | || argmatch (argv, argc, "-quick", 0, 2, NULL, &skip_args)) | ||
| 2146 | no_site_lisp = 1; | ||
| 2147 | |||
| 2148 | skip_args = count_before; | ||
| 2149 | } | ||
| 2150 | #endif | ||
| 2151 | 2143 | ||
| 2152 | /* argmatch must not be used after here, | 2144 | /* argmatch must not be used after here, |
| 2153 | except when building temacs | 2145 | except when building temacs |
| @@ -6160,6 +6160,9 @@ from the absolute start of the buffer, disregarding the narrowing. */) | |||
| 6160 | { | 6160 | { |
| 6161 | ptrdiff_t pos_byte, start_byte = BEGV_BYTE; | 6161 | ptrdiff_t pos_byte, start_byte = BEGV_BYTE; |
| 6162 | 6162 | ||
| 6163 | if (!BUFFER_LIVE_P (current_buffer)) | ||
| 6164 | error ("Attempt to count lines in a dead buffer"); | ||
| 6165 | |||
| 6163 | if (MARKERP (position)) | 6166 | if (MARKERP (position)) |
| 6164 | { | 6167 | { |
| 6165 | /* We don't trust the byte position if the marker's buffer is | 6168 | /* We don't trust the byte position if the marker's buffer is |
diff --git a/src/xdisp.c b/src/xdisp.c index d62a8d98317..8970d5aaaf2 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -8339,9 +8339,17 @@ get_next_display_element (struct it *it) | |||
| 8339 | && success_p | 8339 | && success_p |
| 8340 | && FRAME_WINDOW_P (it->f)) | 8340 | && FRAME_WINDOW_P (it->f)) |
| 8341 | { | 8341 | { |
| 8342 | struct face *face = FACE_FROM_ID (it->f, it->face_id); | 8342 | struct face *face = FACE_FROM_ID_OR_NULL (it->f, it->face_id); |
| 8343 | 8343 | ||
| 8344 | if (it->what == IT_COMPOSITION && it->cmp_it.ch >= 0) | 8344 | /* It shouldn't happen, ever, that FACE is NULL here, but |
| 8345 | evidently some faulty fonts/fontsets can sometimes cause it. | ||
| 8346 | In that case, we punt and consider the stuff undisplayable. */ | ||
| 8347 | if (!face) | ||
| 8348 | { | ||
| 8349 | it->what = IT_GLYPHLESS; | ||
| 8350 | it->glyphless_method = GLYPHLESS_DISPLAY_EMPTY_BOX; | ||
| 8351 | } | ||
| 8352 | else if (it->what == IT_COMPOSITION && it->cmp_it.ch >= 0) | ||
| 8345 | { | 8353 | { |
| 8346 | /* Automatic composition with glyph-string. */ | 8354 | /* Automatic composition with glyph-string. */ |
| 8347 | Lisp_Object gstring = composition_gstring_from_id (it->cmp_it.id); | 8355 | Lisp_Object gstring = composition_gstring_from_id (it->cmp_it.id); |
| @@ -27908,6 +27916,8 @@ are the selected window and the WINDOW's buffer). */) | |||
| 27908 | if (NILP (buffer)) | 27916 | if (NILP (buffer)) |
| 27909 | buffer = w->contents; | 27917 | buffer = w->contents; |
| 27910 | CHECK_BUFFER (buffer); | 27918 | CHECK_BUFFER (buffer); |
| 27919 | if (!BUFFER_LIVE_P (XBUFFER (buffer))) | ||
| 27920 | error ("Attempt to format a mode line for a dead buffer"); | ||
| 27911 | 27921 | ||
| 27912 | /* Make formatting the modeline a non-op when noninteractive, otherwise | 27922 | /* Make formatting the modeline a non-op when noninteractive, otherwise |
| 27913 | there will be problems later caused by a partially initialized frame. */ | 27923 | there will be problems later caused by a partially initialized frame. */ |
| @@ -32098,9 +32108,12 @@ produce_glyphless_glyph (struct it *it, bool for_no_font, Lisp_Object acronym) | |||
| 32098 | int len; | 32108 | int len; |
| 32099 | 32109 | ||
| 32100 | /* Get the metrics of the base font. We always refer to the current | 32110 | /* Get the metrics of the base font. We always refer to the current |
| 32101 | ASCII face. */ | 32111 | ASCII face, but if some faulty setup of fontsets causes that to |
| 32102 | face = FACE_FROM_ID (it->f, it->face_id)->ascii_face; | 32112 | be NULL, we fall back to the frame's default font. */ |
| 32103 | font = face->font ? face->font : FRAME_FONT (it->f); | 32113 | face = FACE_FROM_ID_OR_NULL (it->f, it->face_id); |
| 32114 | if (face) | ||
| 32115 | face = face->ascii_face; | ||
| 32116 | font = (face && face->font) ? face->font : FRAME_FONT (it->f); | ||
| 32104 | normal_char_ascent_descent (font, -1, &it->ascent, &it->descent); | 32117 | normal_char_ascent_descent (font, -1, &it->ascent, &it->descent); |
| 32105 | it->ascent += font->baseline_offset; | 32118 | it->ascent += font->baseline_offset; |
| 32106 | it->descent -= font->baseline_offset; | 32119 | it->descent -= font->baseline_offset; |