aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2020-01-03 07:50:15 -0800
committerGlenn Morris2020-01-03 07:50:15 -0800
commitfa7148fd5ac7c10c32a1cdcf57ade55bc3be8718 (patch)
tree18f9bc1b56ea13026d5b3f40bcd3be9d0f39d634
parent2ab5bc323b374bb8385e8032db1ccd08ac36bb84 (diff)
parent06364316e0998d6906b8a42d54102c5de4a54990 (diff)
downloademacs-fa7148fd5ac7c10c32a1cdcf57ade55bc3be8718.tar.gz
emacs-fa7148fd5ac7c10c32a1cdcf57ade55bc3be8718.zip
Merge from origin/emacs-27
06364316e0 (origin/emacs-27) * lisp/net/tramp.el (tramp-file-local-na... d3884f50e0 Adapt commentary in Tramp persistency file 2d82f5a44e Change Tramp version to 2.4.3.27.1 09b65707cc ; * src/dispnew.c (adjust_glyph_matrix): Fix last change. 37f9182b68 Fix redisplay when mode-line-format changes mode-line's he... 1420906b81 * src/fileio.c (Fwrite_region): Improve the doc string. 01dfcb7c87 Fix removal of frame decorations on Windows (Bug#38705)
-rw-r--r--doc/misc/trampver.texi2
-rw-r--r--lisp/frame.el3
-rw-r--r--lisp/net/tramp-cache.el2
-rw-r--r--lisp/net/tramp.el19
-rw-r--r--lisp/net/trampver.el7
-rw-r--r--src/dispnew.c8
-rw-r--r--src/fileio.c1
-rw-r--r--src/w32fns.c3
-rw-r--r--src/w32term.h4
-rw-r--r--src/xdisp.c65
10 files changed, 84 insertions, 30 deletions
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi
index 6ee69117387..478ec7037a8 100644
--- a/doc/misc/trampver.texi
+++ b/doc/misc/trampver.texi
@@ -8,7 +8,7 @@
8@c In the Tramp GIT, the version numbers are auto-frobbed from 8@c In the Tramp GIT, the version numbers are auto-frobbed from
9@c tramp.el, and the bug report address is auto-frobbed from 9@c tramp.el, and the bug report address is auto-frobbed from
10@c configure.ac. 10@c configure.ac.
11@set trampver 2.4.3 11@set trampver 2.4.3.27.1
12@set tramp-bug-report-address tramp-devel@@gnu.org 12@set tramp-bug-report-address tramp-devel@@gnu.org
13@set emacsver 24.4 13@set emacsver 24.4
14 14
diff --git a/lisp/frame.el b/lisp/frame.el
index c533e5a23fb..16ee7580f89 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -2725,6 +2725,9 @@ See also `toggle-frame-maximized'."
2725 line-prefix 2725 line-prefix
2726 wrap-prefix 2726 wrap-prefix
2727 truncate-lines 2727 truncate-lines
2728 mode-line-format
2729 header-line-format
2730 tab-line-format
2728 display-line-numbers 2731 display-line-numbers
2729 display-line-numbers-width 2732 display-line-numbers-width
2730 display-line-numbers-current-absolute 2733 display-line-numbers-current-absolute
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el
index d4f6aa00263..b81a1a23d5f 100644
--- a/lisp/net/tramp-cache.el
+++ b/lisp/net/tramp-cache.el
@@ -474,7 +474,7 @@ used to cache connection properties of the local machine."
474 tramp-persistency-file-name)) 474 tramp-persistency-file-name))
475 (error "\n")) 475 (error "\n"))
476 ";; Tramp connection history. Don't change this file.\n" 476 ";; Tramp connection history. Don't change this file.\n"
477 ";; You can delete it, forcing Tramp to reapply the checks.\n\n" 477 ";; Run `M-x tramp-cleanup-all-connections' instead.\n\n"
478 (with-output-to-string 478 (with-output-to-string
479 (pp (read (format "(%s)" (tramp-cache-print cache))))))))))) 479 (pp (read (format "(%s)" (tramp-cache-print cache)))))))))))
480 480
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 1e52fae49f0..85330e98aa2 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1329,6 +1329,25 @@ entry does not exist, return nil."
1329 (string-match-p tramp-file-name-regexp name) 1329 (string-match-p tramp-file-name-regexp name)
1330 t)) 1330 t))
1331 1331
1332;; This function bypasses the file name handler approach. It is NOT
1333;; recommended to use it in any package if not absolutely necessary,
1334;; because it won't work for remote file names not supported by Tramp.
1335;; However, it is more performant than `file-local-name', and might be
1336;; useful where performance matters, like in operations over a bulk
1337;; list of file names.
1338(defun tramp-file-local-name (name)
1339 "Return the local name component of NAME.
1340This function removes from NAME the specification of the remote
1341host and the method of accessing the host, leaving only the part
1342that identifies NAME locally on the remote system. NAME must be
1343a string that matches `tramp-file-name-regexp'. The returned
1344file name can be used directly as argument of ‘process-file’,
1345‘start-file-process’, or ‘shell-command’."
1346 (save-match-data
1347 (and (tramp-tramp-file-p name)
1348 (string-match (nth 0 tramp-file-name-structure) name)
1349 (match-string (nth 4 tramp-file-name-structure) name))))
1350
1332(defun tramp-find-method (method user host) 1351(defun tramp-find-method (method user host)
1333 "Return the right method string to use depending on USER and HOST. 1352 "Return the right method string to use depending on USER and HOST.
1334This is METHOD, if non-nil. Otherwise, do a lookup in 1353This is METHOD, if non-nil. Otherwise, do a lookup in
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el
index e5f628d8537..dacdd44102f 100644
--- a/lisp/net/trampver.el
+++ b/lisp/net/trampver.el
@@ -39,7 +39,7 @@
39(defvar inhibit-message) 39(defvar inhibit-message)
40 40
41;;;###tramp-autoload 41;;;###tramp-autoload
42(defconst tramp-version "2.4.3" 42(defconst tramp-version "2.4.3.27.1"
43 "This version of Tramp.") 43 "This version of Tramp.")
44 44
45;;;###tramp-autoload 45;;;###tramp-autoload
@@ -73,7 +73,7 @@
73;; Check for Emacs version. 73;; Check for Emacs version.
74(let ((x (if (not (string-lessp emacs-version "24.4")) 74(let ((x (if (not (string-lessp emacs-version "24.4"))
75 "ok" 75 "ok"
76 (format "Tramp 2.4.3 is not fit for %s" 76 (format "Tramp 2.4.3.27.1 is not fit for %s"
77 (replace-regexp-in-string "\n" "" (emacs-version)))))) 77 (replace-regexp-in-string "\n" "" (emacs-version))))))
78 (unless (string-equal "ok" x) (error "%s" x))) 78 (unless (string-equal "ok" x) (error "%s" x)))
79 79
@@ -92,7 +92,8 @@
92 ("2.2.13.25.1" . "25.1") ("2.2.13.25.2" . "25.2") 92 ("2.2.13.25.1" . "25.1") ("2.2.13.25.2" . "25.2")
93 ("2.2.13.25.2" . "25.3") 93 ("2.2.13.25.2" . "25.3")
94 ("2.3.3" . "26.1") ("2.3.3.26.1" . "26.1") ("2.3.5.26.2" . "26.2") 94 ("2.3.3" . "26.1") ("2.3.3.26.1" . "26.1") ("2.3.5.26.2" . "26.2")
95 ("2.3.5.26.3" . "26.3"))) 95 ("2.3.5.26.3" . "26.3")
96 ("2.4.3.27.1" . "27.1")))
96 97
97(add-hook 'tramp-unload-hook 98(add-hook 'tramp-unload-hook
98 (lambda () 99 (lambda ()
diff --git a/src/dispnew.c b/src/dispnew.c
index b2a257090cc..9af1ce259d4 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -534,6 +534,14 @@ adjust_glyph_matrix (struct window *w, struct glyph_matrix *matrix, int x, int y
534 eassert (left >= 0 && right >= 0); 534 eassert (left >= 0 && right >= 0);
535 matrix->left_margin_glyphs = left; 535 matrix->left_margin_glyphs = left;
536 matrix->right_margin_glyphs = right; 536 matrix->right_margin_glyphs = right;
537
538 /* If we are resizing a window, make sure the previous mode-line
539 row of the window's current matrix is no longer marked as such. */
540 if (w && matrix == w->current_matrix
541 && matrix->nrows > 0
542 && dim.height != matrix->nrows
543 && matrix->nrows <= matrix->rows_allocated)
544 MATRIX_MODE_LINE_ROW (matrix)->mode_line_p = false;
537 } 545 }
538 546
539 /* Number of rows to be used by MATRIX. */ 547 /* Number of rows to be used by MATRIX. */
diff --git a/src/fileio.c b/src/fileio.c
index 6e2fe2f0b82..34934dd6df6 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4975,6 +4975,7 @@ Optional fourth argument APPEND if non-nil means
4975Optional fifth argument VISIT, if t or a string, means 4975Optional fifth argument VISIT, if t or a string, means
4976 set the last-save-file-modtime of buffer to this file's modtime 4976 set the last-save-file-modtime of buffer to this file's modtime
4977 and mark buffer not modified. 4977 and mark buffer not modified.
4978If VISIT is t, the buffer is marked as visiting FILENAME.
4978If VISIT is a string, it is a second file name; 4979If VISIT is a string, it is a second file name;
4979 the output goes to FILENAME, but the buffer is marked as visiting VISIT. 4980 the output goes to FILENAME, but the buffer is marked as visiting VISIT.
4980 VISIT is also the file name to lock and unlock for clash detection. 4981 VISIT is also the file name to lock and unlock for clash detection.
diff --git a/src/w32fns.c b/src/w32fns.c
index 75e0d531a23..61e22e57009 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -2146,6 +2146,9 @@ w32_set_undecorated (struct frame *f, Lisp_Object new_value, Lisp_Object old_val
2146 | SWP_FRAMECHANGED); 2146 | SWP_FRAMECHANGED);
2147 FRAME_UNDECORATED (f) = false; 2147 FRAME_UNDECORATED (f) = false;
2148 } 2148 }
2149
2150 f->output_data.w32->dwStyle = GetWindowLong (hwnd, GWL_STYLE);
2151
2149 unblock_input (); 2152 unblock_input ();
2150} 2153}
2151 2154
diff --git a/src/w32term.h b/src/w32term.h
index 5a54f542365..737764b8942 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -371,6 +371,10 @@ struct w32_output
371 /* Non-hourglass cursor that is currently active. */ 371 /* Non-hourglass cursor that is currently active. */
372 HCURSOR current_cursor; 372 HCURSOR current_cursor;
373 373
374 /* The window style for this frame. Set up when the frame is
375 created and updated when adding/removing decorations in
376 w32_set_undecorated. Used by w32_set_window_size to adjust the
377 frame's window rectangle. */
374 DWORD dwStyle; 378 DWORD dwStyle;
375 379
376 /* This is the Emacs structure for the display this frame is on. */ 380 /* This is the Emacs structure for the display this frame is on. */
diff --git a/src/xdisp.c b/src/xdisp.c
index 6b677b63ae4..4856a7b13b6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1093,44 +1093,59 @@ window_box_height (struct window *w)
1093 1093
1094 /* Note: the code below that determines the mode-line/header-line/tab-line 1094 /* Note: the code below that determines the mode-line/header-line/tab-line
1095 height is essentially the same as that contained in the macro 1095 height is essentially the same as that contained in the macro
1096 CURRENT_{MODE,HEADER}_LINE_HEIGHT, except that it checks whether 1096 CURRENT_{MODE,HEADER,TAB}_LINE_HEIGHT, except that it checks whether
1097 the appropriate glyph row has its `mode_line_p' flag set, 1097 the appropriate glyph row has its `mode_line_p' flag set, and if
1098 and if it doesn't, uses estimate_mode_line_height instead. */ 1098 it doesn't, uses estimate_mode_line_height instead. */
1099 1099
1100 if (window_wants_mode_line (w)) 1100 if (window_wants_mode_line (w))
1101 { 1101 {
1102 struct glyph_row *ml_row 1102 if (w->mode_line_height >= 0)
1103 = (w->current_matrix && w->current_matrix->rows 1103 height -= w->mode_line_height;
1104 ? MATRIX_MODE_LINE_ROW (w->current_matrix)
1105 : 0);
1106 if (ml_row && ml_row->mode_line_p)
1107 height -= ml_row->height;
1108 else 1104 else
1109 height -= estimate_mode_line_height (f, CURRENT_MODE_LINE_FACE_ID (w)); 1105 {
1106 struct glyph_row *ml_row
1107 = (w->current_matrix && w->current_matrix->rows
1108 ? MATRIX_MODE_LINE_ROW (w->current_matrix)
1109 : 0);
1110 if (ml_row && ml_row->mode_line_p)
1111 height -= ml_row->height;
1112 else
1113 height -= estimate_mode_line_height (f,
1114 CURRENT_MODE_LINE_FACE_ID (w));
1115 }
1110 } 1116 }
1111 1117
1112 if (window_wants_tab_line (w)) 1118 if (window_wants_tab_line (w))
1113 { 1119 {
1114 struct glyph_row *tl_row 1120 if (w->tab_line_height >= 0)
1115 = (w->current_matrix && w->current_matrix->rows 1121 height -= w->tab_line_height;
1116 ? MATRIX_TAB_LINE_ROW (w->current_matrix)
1117 : 0);
1118 if (tl_row && tl_row->mode_line_p)
1119 height -= tl_row->height;
1120 else 1122 else
1121 height -= estimate_mode_line_height (f, TAB_LINE_FACE_ID); 1123 {
1124 struct glyph_row *tl_row
1125 = (w->current_matrix && w->current_matrix->rows
1126 ? MATRIX_TAB_LINE_ROW (w->current_matrix)
1127 : 0);
1128 if (tl_row && tl_row->mode_line_p)
1129 height -= tl_row->height;
1130 else
1131 height -= estimate_mode_line_height (f, TAB_LINE_FACE_ID);
1132 }
1122 } 1133 }
1123 1134
1124 if (window_wants_header_line (w)) 1135 if (window_wants_header_line (w))
1125 { 1136 {
1126 struct glyph_row *hl_row 1137 if (w->header_line_height >= 0)
1127 = (w->current_matrix && w->current_matrix->rows 1138 height -= w->header_line_height;
1128 ? MATRIX_HEADER_LINE_ROW (w->current_matrix) 1139 {
1129 : 0); 1140 struct glyph_row *hl_row
1130 if (hl_row && hl_row->mode_line_p) 1141 = (w->current_matrix && w->current_matrix->rows
1131 height -= hl_row->height; 1142 ? MATRIX_HEADER_LINE_ROW (w->current_matrix)
1132 else 1143 : 0);
1133 height -= estimate_mode_line_height (f, HEADER_LINE_FACE_ID); 1144 if (hl_row && hl_row->mode_line_p)
1145 height -= hl_row->height;
1146 else
1147 height -= estimate_mode_line_height (f, HEADER_LINE_FACE_ID);
1148 }
1134 } 1149 }
1135 1150
1136 /* With a very small font and a mode-line that's taller than 1151 /* With a very small font and a mode-line that's taller than