aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley2016-03-03 23:53:08 -0800
committerJohn Wiegley2016-03-03 23:53:08 -0800
commit692caf1e8d1657fbe4809294df6791c2879a7bb1 (patch)
tree0c6357b6325adbf0d675851d7a655ce9636b51e7 /src
parent018bdf7528d0d4bb0560d86b84c21ae9fed1206a (diff)
parentb13cab683c6060e002906fc944680aaa5f4ac123 (diff)
downloademacs-692caf1e8d1657fbe4809294df6791c2879a7bb1.tar.gz
emacs-692caf1e8d1657fbe4809294df6791c2879a7bb1.zip
Merge from origin/emacs-25
b13cab6 Add a eww command to toggle paragraph direction 4e46128 * nextstep/WISHLIST: Merge into etc/TODO and remove. 9e078e5 Fix char signedness issue in bidi code 064adf6 * lib-src/pop.c (socket_connection): Fix format string. 14060a9 Avoid inflooping in thing-at-point-looking-at 098d47b * lisp/emacs-lisp/derived.el (define-derived-mode): Revert indent change. b5db8e0 etc/PROBLEMS: Mention problems with using file descriptors ec10ef9 * lisp/apropos.el (apropos-variable): Doc fix. (Bug#22813). d2dd614 Remove unneeded workaround in xftfont.c 9b7593c ; * etc/NEWS: Reflect latest changes in saveplace. fde0cd1 * lisp/saveplace.el (save-place-local-mode): New minor mode 06a872b Fix redisplay on a TTY after 'make-frame' 95f5a43 Make double-click-1 work with unbalanced parens in CC Mode. Fixes bug#5560. 7d206fc Input method polish-slash should not use keyboard translation 8be32cf Fix an assertion 040e0d6 Fix 'toggle-save-place' 5244db2 * src/keyboard.c: Don't inadvertently set immediate_echo (bug#22581)
Diffstat (limited to 'src')
-rw-r--r--src/dispextern.h4
-rw-r--r--src/dispnew.c4
-rw-r--r--src/keyboard.c28
-rw-r--r--src/xdisp.c9
-rw-r--r--src/xftfont.c10
5 files changed, 31 insertions, 24 deletions
diff --git a/src/dispextern.h b/src/dispextern.h
index 7d7d7305b43..00667c5a8fa 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1973,8 +1973,8 @@ struct bidi_it {
1973 resolving weak and neutral types */ 1973 resolving weak and neutral types */
1974 bidi_type_t type_after_wn; /* bidi type after overrides and Wn */ 1974 bidi_type_t type_after_wn; /* bidi type after overrides and Wn */
1975 bidi_type_t orig_type; /* original bidi type, as found in the buffer */ 1975 bidi_type_t orig_type; /* original bidi type, as found in the buffer */
1976 char resolved_level; /* final resolved level of this character */ 1976 signed char resolved_level; /* final resolved level of this character */
1977 char isolate_level; /* count of isolate initiators unmatched by PDI */ 1977 signed char isolate_level; /* count of isolate initiators unmatched by PDI */
1978 ptrdiff_t invalid_levels; /* how many PDFs to ignore */ 1978 ptrdiff_t invalid_levels; /* how many PDFs to ignore */
1979 ptrdiff_t invalid_isolates; /* how many PDIs to ignore */ 1979 ptrdiff_t invalid_isolates; /* how many PDIs to ignore */
1980 struct bidi_saved_info prev; /* info about previous character */ 1980 struct bidi_saved_info prev; /* info about previous character */
diff --git a/src/dispnew.c b/src/dispnew.c
index b05356a3b64..a9f06eb3c12 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -681,7 +681,9 @@ void
681clear_glyph_matrix_rows (struct glyph_matrix *matrix, int start, int end) 681clear_glyph_matrix_rows (struct glyph_matrix *matrix, int start, int end)
682{ 682{
683 eassert (start <= end); 683 eassert (start <= end);
684 eassert (start >= 0 && start <= matrix->nrows); 684 eassert (start >= 0 && (start < matrix->nrows
685 /* matrix->nrows can be 0 for the initial frame. */
686 || (matrix->nrows == 0)));
685 eassert (end >= 0 && end <= matrix->nrows); 687 eassert (end >= 0 && end <= matrix->nrows);
686 688
687 for (; start < end; ++start) 689 for (; start < end; ++start)
diff --git a/src/keyboard.c b/src/keyboard.c
index 6535e04d826..4e1ac152a59 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -427,6 +427,15 @@ kset_system_key_syms (struct kboard *kb, Lisp_Object val)
427} 427}
428 428
429 429
430static bool
431echo_keystrokes_p (void)
432{
433 return (!cursor_in_echo_area)
434 && (FLOATP (Vecho_keystrokes) ? XFLOAT_DATA (Vecho_keystrokes) > 0.0
435 : INTEGERP (Vecho_keystrokes) ? XINT (Vecho_keystrokes) > 0
436 : false);
437}
438
430/* Add C to the echo string, without echoing it immediately. C can be 439/* Add C to the echo string, without echoing it immediately. C can be
431 a character, which is pretty-printed, or a symbol, whose name is 440 a character, which is pretty-printed, or a symbol, whose name is
432 printed. */ 441 printed. */
@@ -568,7 +577,9 @@ echo_update (void)
568static void 577static void
569echo_now (void) 578echo_now (void)
570{ 579{
571 if (!current_kboard->immediate_echo) 580 if (!current_kboard->immediate_echo
581 /* This test breaks calls that use `echo_now' to display the echo_prompt.
582 && echo_keystrokes_p () */)
572 { 583 {
573 current_kboard->immediate_echo = true; 584 current_kboard->immediate_echo = true;
574 echo_update (); 585 echo_update ();
@@ -2270,13 +2281,6 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
2270 } 2281 }
2271} 2282}
2272 2283
2273static bool
2274echo_keystrokes_p (void)
2275{
2276 return (FLOATP (Vecho_keystrokes) ? XFLOAT_DATA (Vecho_keystrokes) > 0.0
2277 : INTEGERP (Vecho_keystrokes) ? XINT (Vecho_keystrokes) > 0 : false);
2278}
2279
2280/* Read a character from the keyboard; call the redisplay if needed. */ 2284/* Read a character from the keyboard; call the redisplay if needed. */
2281/* commandflag 0 means do not autosave, but do redisplay. 2285/* commandflag 0 means do not autosave, but do redisplay.
2282 -1 means do not redisplay, but do autosave. 2286 -1 means do not redisplay, but do autosave.
@@ -8889,11 +8893,15 @@ read_key_sequence (Lisp_Object *keybuf, int bufsize, Lisp_Object prompt,
8889 of echoing, so that it serves as a prompt for the next 8893 of echoing, so that it serves as a prompt for the next
8890 character. */ 8894 character. */
8891 kset_echo_prompt (current_kboard, prompt); 8895 kset_echo_prompt (current_kboard, prompt);
8896 /* FIXME: This use of echo_now doesn't look quite right and is ugly
8897 since it forces us to fiddle with current_kboard->immediate_echo
8898 before and after. */
8892 current_kboard->immediate_echo = false; 8899 current_kboard->immediate_echo = false;
8893 echo_now (); 8900 echo_now ();
8901 if (!echo_keystrokes_p ())
8902 current_kboard->immediate_echo = false;
8894 } 8903 }
8895 else if (cursor_in_echo_area 8904 else if (echo_keystrokes_p ())
8896 && echo_keystrokes_p ())
8897 /* This doesn't put in a dash if the echo buffer is empty, so 8905 /* This doesn't put in a dash if the echo buffer is empty, so
8898 you don't always see a dash hanging out in the minibuffer. */ 8906 you don't always see a dash hanging out in the minibuffer. */
8899 echo_dash (); 8907 echo_dash ();
diff --git a/src/xdisp.c b/src/xdisp.c
index acb275481ad..b9d496ed556 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -11232,6 +11232,7 @@ clear_garbaged_frames (void)
11232 if (frame_garbaged) 11232 if (frame_garbaged)
11233 { 11233 {
11234 Lisp_Object tail, frame; 11234 Lisp_Object tail, frame;
11235 struct frame *sf = SELECTED_FRAME ();
11235 11236
11236 FOR_EACH_FRAME (tail, frame) 11237 FOR_EACH_FRAME (tail, frame)
11237 { 11238 {
@@ -11239,7 +11240,13 @@ clear_garbaged_frames (void)
11239 11240
11240 if (FRAME_VISIBLE_P (f) && FRAME_GARBAGED_P (f)) 11241 if (FRAME_VISIBLE_P (f) && FRAME_GARBAGED_P (f))
11241 { 11242 {
11242 if (f->resized_p) 11243 if (f->resized_p
11244 /* It makes no sense to redraw a non-selected TTY
11245 frame, since that will actually clear the
11246 selected frame, and might leave the selected
11247 frame with corrupted display, if it happens not
11248 to be marked garbaged. */
11249 && !(f != sf && (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))))
11243 redraw_frame (f); 11250 redraw_frame (f);
11244 else 11251 else
11245 clear_current_matrices (f); 11252 clear_current_matrices (f);
diff --git a/src/xftfont.c b/src/xftfont.c
index 110f99a9be9..d94955f296a 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -395,16 +395,6 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
395 395
396 font->ascent = xftfont->ascent; 396 font->ascent = xftfont->ascent;
397 font->descent = xftfont->descent; 397 font->descent = xftfont->descent;
398 if (pixel_size >= 5)
399 {
400 /* The above condition is a dirty workaround because
401 XftTextExtents8 behaves strangely for some fonts
402 (e.g. "Dejavu Sans Mono") when pixel_size is less than 5. */
403 if (font->ascent < extents.y)
404 font->ascent = extents.y;
405 if (font->descent < extents.height - extents.y)
406 font->descent = extents.height - extents.y;
407 }
408 font->height = font->ascent + font->descent; 398 font->height = font->ascent + font->descent;
409 399
410 if (XINT (AREF (entity, FONT_SIZE_INDEX)) == 0) 400 if (XINT (AREF (entity, FONT_SIZE_INDEX)) == 0)