aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorK. Handa2017-10-08 11:56:06 +0900
committerK. Handa2017-10-08 11:56:06 +0900
commita9b72976deec9b266950865581a626ec8f7b74f4 (patch)
tree7b5fb778bad612133b54ea3a39aa8356b6bdbaf7 /src
parent64baaff8c5f70b7d637ac37304c4377e955b3f09 (diff)
parentc194fb61c638490e3510864fe2750814af8c3719 (diff)
downloademacs-a9b72976deec9b266950865581a626ec8f7b74f4.tar.gz
emacs-a9b72976deec9b266950865581a626ec8f7b74f4.zip
Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into emacs-26
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c22
-rw-r--r--src/editfns.c14
-rw-r--r--src/gnutls.c1
-rw-r--r--src/nsterm.m3
-rw-r--r--src/process.c1
-rw-r--r--src/sysdep.c13
6 files changed, 40 insertions, 14 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index ad59704a168..cb32f09b7c6 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -66,7 +66,7 @@ struct dim
66 66
67/* Function prototypes. */ 67/* Function prototypes. */
68 68
69static void update_frame_line (struct frame *, int); 69static void update_frame_line (struct frame *, int, bool);
70static int required_matrix_height (struct window *); 70static int required_matrix_height (struct window *);
71static int required_matrix_width (struct window *); 71static int required_matrix_width (struct window *);
72static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t); 72static void increment_row_positions (struct glyph_row *, ptrdiff_t, ptrdiff_t);
@@ -88,7 +88,7 @@ static void check_matrix_pointers (struct glyph_matrix *,
88static void mirror_line_dance (struct window *, int, int, int *, char *); 88static void mirror_line_dance (struct window *, int, int, int *, char *);
89static bool update_window_tree (struct window *, bool); 89static bool update_window_tree (struct window *, bool);
90static bool update_window (struct window *, bool); 90static bool update_window (struct window *, bool);
91static bool update_frame_1 (struct frame *, bool, bool, bool); 91static bool update_frame_1 (struct frame *, bool, bool, bool, bool);
92static bool scrolling (struct frame *); 92static bool scrolling (struct frame *);
93static void set_window_cursor_after_update (struct window *); 93static void set_window_cursor_after_update (struct window *);
94static void adjust_frame_glyphs_for_window_redisplay (struct frame *); 94static void adjust_frame_glyphs_for_window_redisplay (struct frame *);
@@ -3121,7 +3121,7 @@ update_frame (struct frame *f, bool force_p, bool inhibit_hairy_id_p)
3121 3121
3122 /* Update the display. */ 3122 /* Update the display. */
3123 update_begin (f); 3123 update_begin (f);
3124 paused_p = update_frame_1 (f, force_p, inhibit_hairy_id_p, 1); 3124 paused_p = update_frame_1 (f, force_p, inhibit_hairy_id_p, 1, false);
3125 update_end (f); 3125 update_end (f);
3126 3126
3127 if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) 3127 if (FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
@@ -3174,7 +3174,7 @@ update_frame_with_menu (struct frame *f, int row, int col)
3174 cursor_at_point_p = !(row >= 0 && col >= 0); 3174 cursor_at_point_p = !(row >= 0 && col >= 0);
3175 /* Force update_frame_1 not to stop due to pending input, and not 3175 /* Force update_frame_1 not to stop due to pending input, and not
3176 try scrolling. */ 3176 try scrolling. */
3177 paused_p = update_frame_1 (f, 1, 1, cursor_at_point_p); 3177 paused_p = update_frame_1 (f, 1, 1, cursor_at_point_p, true);
3178 /* ROW and COL tell us where in the menu to position the cursor, so 3178 /* ROW and COL tell us where in the menu to position the cursor, so
3179 that screen readers know the active region on the screen. */ 3179 that screen readers know the active region on the screen. */
3180 if (!cursor_at_point_p) 3180 if (!cursor_at_point_p)
@@ -4474,7 +4474,7 @@ scrolling_window (struct window *w, bool header_line_p)
4474 4474
4475static bool 4475static bool
4476update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p, 4476update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
4477 bool set_cursor_p) 4477 bool set_cursor_p, bool updating_menu_p)
4478{ 4478{
4479 /* Frame matrices to work on. */ 4479 /* Frame matrices to work on. */
4480 struct glyph_matrix *current_matrix = f->current_matrix; 4480 struct glyph_matrix *current_matrix = f->current_matrix;
@@ -4513,7 +4513,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
4513 4513
4514 /* Update the individual lines as needed. Do bottom line first. */ 4514 /* Update the individual lines as needed. Do bottom line first. */
4515 if (MATRIX_ROW_ENABLED_P (desired_matrix, desired_matrix->nrows - 1)) 4515 if (MATRIX_ROW_ENABLED_P (desired_matrix, desired_matrix->nrows - 1))
4516 update_frame_line (f, desired_matrix->nrows - 1); 4516 update_frame_line (f, desired_matrix->nrows - 1, updating_menu_p);
4517 4517
4518 /* Now update the rest of the lines. */ 4518 /* Now update the rest of the lines. */
4519 for (i = 0; i < desired_matrix->nrows - 1 && (force_p || !input_pending); i++) 4519 for (i = 0; i < desired_matrix->nrows - 1 && (force_p || !input_pending); i++)
@@ -4539,7 +4539,7 @@ update_frame_1 (struct frame *f, bool force_p, bool inhibit_id_p,
4539 if (!force_p && (i - 1) % preempt_count == 0) 4539 if (!force_p && (i - 1) % preempt_count == 0)
4540 detect_input_pending_ignore_squeezables (); 4540 detect_input_pending_ignore_squeezables ();
4541 4541
4542 update_frame_line (f, i); 4542 update_frame_line (f, i, updating_menu_p);
4543 } 4543 }
4544 } 4544 }
4545 4545
@@ -4775,7 +4775,7 @@ count_match (struct glyph *str1, struct glyph *end1, struct glyph *str2, struct
4775/* Perform a frame-based update on line VPOS in frame FRAME. */ 4775/* Perform a frame-based update on line VPOS in frame FRAME. */
4776 4776
4777static void 4777static void
4778update_frame_line (struct frame *f, int vpos) 4778update_frame_line (struct frame *f, int vpos, bool updating_menu_p)
4779{ 4779{
4780 struct glyph *obody, *nbody, *op1, *op2, *np1, *nend; 4780 struct glyph *obody, *nbody, *op1, *op2, *np1, *nend;
4781 int tem; 4781 int tem;
@@ -4814,6 +4814,12 @@ update_frame_line (struct frame *f, int vpos)
4814 current_row->enabled_p = true; 4814 current_row->enabled_p = true;
4815 current_row->used[TEXT_AREA] = desired_row->used[TEXT_AREA]; 4815 current_row->used[TEXT_AREA] = desired_row->used[TEXT_AREA];
4816 4816
4817 /* For some reason, cursor is sometimes moved behind our back when a
4818 frame with a TTY menu is redrawn. Homing the cursor as below
4819 fixes that. */
4820 if (updating_menu_p)
4821 cursor_to (f, 0, 0);
4822
4817 /* If desired line is empty, just clear the line. */ 4823 /* If desired line is empty, just clear the line. */
4818 if (!desired_row->enabled_p) 4824 if (!desired_row->enabled_p)
4819 { 4825 {
diff --git a/src/editfns.c b/src/editfns.c
index d88a913c667..e65bd34da87 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4179,6 +4179,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
4179 multibyte character of the previous string. This flag tells if we 4179 multibyte character of the previous string. This flag tells if we
4180 must consider such a situation or not. */ 4180 must consider such a situation or not. */
4181 bool maybe_combine_byte; 4181 bool maybe_combine_byte;
4182 Lisp_Object val;
4182 bool arg_intervals = false; 4183 bool arg_intervals = false;
4183 USE_SAFE_ALLOCA; 4184 USE_SAFE_ALLOCA;
4184 sa_avail -= sizeof initial_buffer; 4185 sa_avail -= sizeof initial_buffer;
@@ -4417,7 +4418,10 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
4417 { 4418 {
4418 if (format == end && format - format_start == 2 4419 if (format == end && format - format_start == 2
4419 && ! string_intervals (args[0])) 4420 && ! string_intervals (args[0]))
4420 return arg; 4421 {
4422 val = arg;
4423 goto return_val;
4424 }
4421 4425
4422 /* handle case (precision[n] >= 0) */ 4426 /* handle case (precision[n] >= 0) */
4423 4427
@@ -4862,11 +4866,14 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
4862 emacs_abort (); 4866 emacs_abort ();
4863 4867
4864 if (! new_result) 4868 if (! new_result)
4865 return args[0]; 4869 {
4870 val = args[0];
4871 goto return_val;
4872 }
4866 4873
4867 if (maybe_combine_byte) 4874 if (maybe_combine_byte)
4868 nchars = multibyte_chars_in_text ((unsigned char *) buf, p - buf); 4875 nchars = multibyte_chars_in_text ((unsigned char *) buf, p - buf);
4869 Lisp_Object val = make_specified_string (buf, nchars, p - buf, multibyte); 4876 val = make_specified_string (buf, nchars, p - buf, multibyte);
4870 4877
4871 /* If the format string has text properties, or any of the string 4878 /* If the format string has text properties, or any of the string
4872 arguments has text properties, set up text properties of the 4879 arguments has text properties, set up text properties of the
@@ -4964,6 +4971,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
4964 } 4971 }
4965 } 4972 }
4966 4973
4974 return_val:
4967 /* If we allocated BUF or INFO with malloc, free it too. */ 4975 /* If we allocated BUF or INFO with malloc, free it too. */
4968 SAFE_FREE (); 4976 SAFE_FREE ();
4969 4977
diff --git a/src/gnutls.c b/src/gnutls.c
index d7a1399f106..b55d1b9289f 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -2472,7 +2472,6 @@ syms_of_gnutls (void)
2472 DEFSYM (QCcipher_blocksize, ":cipher-blocksize"); 2472 DEFSYM (QCcipher_blocksize, ":cipher-blocksize");
2473 DEFSYM (QCcipher_keysize, ":cipher-keysize"); 2473 DEFSYM (QCcipher_keysize, ":cipher-keysize");
2474 DEFSYM (QCcipher_tagsize, ":cipher-tagsize"); 2474 DEFSYM (QCcipher_tagsize, ":cipher-tagsize");
2475 DEFSYM (QCcipher_keysize, ":cipher-keysize");
2476 DEFSYM (QCcipher_ivsize, ":cipher-ivsize"); 2475 DEFSYM (QCcipher_ivsize, ":cipher-ivsize");
2477 2476
2478 DEFSYM (QCmac_algorithm_id, ":mac-algorithm-id"); 2477 DEFSYM (QCmac_algorithm_id, ":mac-algorithm-id");
diff --git a/src/nsterm.m b/src/nsterm.m
index f0b6a70dae3..abfdffc9f5e 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -6893,6 +6893,9 @@ not_in_argv (NSString *arg)
6893 NSTRACE_RECT ("[sender frame]", [sender frame]); 6893 NSTRACE_RECT ("[sender frame]", [sender frame]);
6894 NSTRACE_FSTYPE ("fs_state", fs_state); 6894 NSTRACE_FSTYPE ("fs_state", fs_state);
6895 6895
6896 if (!FRAME_LIVE_P (emacsframe))
6897 return frameSize;
6898
6896 if (fs_state == FULLSCREEN_MAXIMIZED 6899 if (fs_state == FULLSCREEN_MAXIMIZED
6897 && (maximized_width != (int)frameSize.width 6900 && (maximized_width != (int)frameSize.width
6898 || maximized_height != (int)frameSize.height)) 6901 || maximized_height != (int)frameSize.height))
diff --git a/src/process.c b/src/process.c
index 2733fa39113..05feba73253 100644
--- a/src/process.c
+++ b/src/process.c
@@ -8097,7 +8097,6 @@ syms_of_process (void)
8097 DEFSYM (Qreal, "real"); 8097 DEFSYM (Qreal, "real");
8098 DEFSYM (Qnetwork, "network"); 8098 DEFSYM (Qnetwork, "network");
8099 DEFSYM (Qserial, "serial"); 8099 DEFSYM (Qserial, "serial");
8100 DEFSYM (Qpipe, "pipe");
8101 DEFSYM (QCbuffer, ":buffer"); 8100 DEFSYM (QCbuffer, ":buffer");
8102 DEFSYM (QChost, ":host"); 8101 DEFSYM (QChost, ":host");
8103 DEFSYM (QCservice, ":service"); 8102 DEFSYM (QCservice, ":service");
diff --git a/src/sysdep.c b/src/sysdep.c
index 26d381f5796..8291a606bea 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -232,7 +232,18 @@ emacs_get_current_dir_name (void)
232 bool use_libc = true; 232 bool use_libc = true;
233# endif 233# endif
234 if (use_libc) 234 if (use_libc)
235 return get_current_dir_name (); 235 {
236 /* GNU/Linux get_current_dir_name can return a string starting
237 with "(unreachable)" (Bug#27871). */
238 char *wd = get_current_dir_name ();
239 if (wd && ! (IS_DIRECTORY_SEP (*wd) || (*wd && IS_DEVICE_SEP (wd[1]))))
240 {
241 free (wd);
242 errno = ENOENT;
243 return NULL;
244 }
245 return wd;
246 }
236# endif 247# endif
237 248
238 char *buf; 249 char *buf;