aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2017-11-20 13:10:11 -0500
committerGlenn Morris2017-11-20 13:10:11 -0500
commit5f1cf4b5c7640ed747bd867712a4580bc2e5b92f (patch)
tree0114e9e8c6e49ccaaa4253fc36808bccd89a9edc
parent7aa59d42a72ef51e0ee902b67097983fc1bfe44c (diff)
parentfc5b8f105505b4f9bb32c5d84d685ab0bc991802 (diff)
downloademacs-5f1cf4b5c7640ed747bd867712a4580bc2e5b92f.tar.gz
emacs-5f1cf4b5c7640ed747bd867712a4580bc2e5b92f.zip
Merge from origin/emacs-26
fc5b8f1 Fix Bug#29149 5622b2e Merge branch 'emacs-26' of git.sv.gnu.org:/srv/git/emacs into... 4da8799 (emacs-26) Fix misbehavior when drawing three-pixel high hori... 1b082c8 MH-E: don't automatically download external-body parts 069f978 ; * lisp/emacs-lisp/byte-run.el: Fix a typo in a comment. 504a56c ; Fix last commit a34e44e ; Fix last commit a8892b4 Further fix for Bug#29291 d14923b Fix divider frame params on NS (bug#29352) b2518ac Spelling fixes # Conflicts: # etc/NEWS # test/lisp/net/tramp-tests.el
-rw-r--r--ChangeLog.32
-rw-r--r--etc/NEWS.265
-rw-r--r--lisp/emacs-lisp/byte-run.el2
-rw-r--r--lisp/help-fns.el6
-rw-r--r--lisp/mh-e/mh-mime.el2
-rw-r--r--lisp/net/tramp.el35
-rw-r--r--lisp/progmodes/cc-mode.el2
-rw-r--r--src/nsfns.m4
-rw-r--r--src/w32term.c12
-rw-r--r--src/xterm.c12
-rw-r--r--test/lisp/net/tramp-tests.el7
11 files changed, 53 insertions, 36 deletions
diff --git a/ChangeLog.3 b/ChangeLog.3
index e7831a37aac..17f18c0fad3 100644
--- a/ChangeLog.3
+++ b/ChangeLog.3
@@ -38322,7 +38322,7 @@
38322 Automatically detect whether .h file is C or C++ 38322 Automatically detect whether .h file is C or C++
38323 38323
38324 * lisp/progmodes/cc-mode.el (c-or-c++-mode): A new function which 38324 * lisp/progmodes/cc-mode.el (c-or-c++-mode): A new function which
38325 analyses contents of the buffer to determine whether it looks like C++ 38325 analyzes contents of the buffer to determine whether it looks like C++
38326 source code and based on that enables c-mode or c++-mode. 38326 source code and based on that enables c-mode or c++-mode.
38327 (c-or-c++-mode--regexp): Regular expression which, when matches 38327 (c-or-c++-mode--regexp): Regular expression which, when matches
38328 a buffer, signals file is C++. 38328 a buffer, signals file is C++.
diff --git a/etc/NEWS.26 b/etc/NEWS.26
index f79c2cbc8ea..6da4ab93b13 100644
--- a/etc/NEWS.26
+++ b/etc/NEWS.26
@@ -1155,9 +1155,8 @@ branch-related commands on a keymap bound to 'B'.
1155 1155
1156--- 1156---
1157*** Opening a .h file will turn C or C++ mode depending on language used. 1157*** Opening a .h file will turn C or C++ mode depending on language used.
1158This is done with the help of 'c-or-c++-mode' function which analyses 1158This is done with the help of the 'c-or-c++-mode' function, which
1159contents of the buffer to determine whether it's a C or C++ source 1159analyzes buffer contents to infer whether it's a C or C++ source file.
1160file.
1161 1160
1162--- 1161---
1163** New option 'cpp-message-min-time-interval' to allow user control 1162** New option 'cpp-message-min-time-interval' to allow user control
diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el
index c6ad209cd8e..abfcdb347a3 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -285,7 +285,7 @@ The return value is undefined.
285 def)))) 285 def))))
286 286
287 287
288;; Redefined in byte-optimize.el. 288;; Redefined in byte-opt.el.
289;; This is not documented--it's not clear that we should promote it. 289;; This is not documented--it's not clear that we should promote it.
290(fset 'inline 'progn) 290(fset 'inline 'progn)
291 291
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 3c237654fb9..643b0cbbc53 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -560,7 +560,7 @@ FILE is the file where FUNCTION was probably defined."
560 (setq short rel)))) 560 (setq short rel))))
561 short)) 561 short))
562 562
563(defun help-fns--analyse-function (function) 563(defun help-fns--analyze-function (function)
564 ;; FIXME: Document/explain the differences between FUNCTION, 564 ;; FIXME: Document/explain the differences between FUNCTION,
565 ;; REAL-FUNCTION, DEF, and REAL-DEF. 565 ;; REAL-FUNCTION, DEF, and REAL-DEF.
566 "Return information about FUNCTION. 566 "Return information about FUNCTION.
@@ -602,7 +602,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
602(defun help-fns-function-description-header (function) 602(defun help-fns-function-description-header (function)
603 "Print a line describing FUNCTION to `standard-output'." 603 "Print a line describing FUNCTION to `standard-output'."
604 (pcase-let* ((`(,_real-function ,def ,aliased ,real-def) 604 (pcase-let* ((`(,_real-function ,def ,aliased ,real-def)
605 (help-fns--analyse-function function)) 605 (help-fns--analyze-function function))
606 (file-name (find-lisp-object-file-name function (if aliased 'defun 606 (file-name (find-lisp-object-file-name function (if aliased 'defun
607 def))) 607 def)))
608 (beg (if (and (or (byte-code-function-p def) 608 (beg (if (and (or (byte-code-function-p def)
@@ -692,7 +692,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)."
692 (terpri)(terpri) 692 (terpri)(terpri)
693 693
694 (pcase-let* ((`(,real-function ,def ,_aliased ,real-def) 694 (pcase-let* ((`(,real-function ,def ,_aliased ,real-def)
695 (help-fns--analyse-function function)) 695 (help-fns--analyze-function function))
696 (doc-raw (condition-case nil 696 (doc-raw (condition-case nil
697 ;; FIXME: Maybe `documentation' should return nil 697 ;; FIXME: Maybe `documentation' should return nil
698 ;; for invalid functions i.s.o. signaling an error. 698 ;; for invalid functions i.s.o. signaling an error.
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el
index 9d1edf0fc47..69c57e0afdc 100644
--- a/lisp/mh-e/mh-mime.el
+++ b/lisp/mh-e/mh-mime.el
@@ -659,6 +659,7 @@ buttons for alternative parts that are usually suppressed."
659 (attachmentp (equal (car (mm-handle-disposition handle)) 659 (attachmentp (equal (car (mm-handle-disposition handle))
660 "attachment")) 660 "attachment"))
661 (inlinep (and (equal (car (mm-handle-disposition handle)) "inline") 661 (inlinep (and (equal (car (mm-handle-disposition handle)) "inline")
662 (mm-automatic-display-p handle)
662 (mm-inlinable-p handle) 663 (mm-inlinable-p handle)
663 (mm-inlined-p handle))) 664 (mm-inlined-p handle)))
664 (displayp (or inlinep ; show if inline OR 665 (displayp (or inlinep ; show if inline OR
@@ -669,6 +670,7 @@ buttons for alternative parts that are usually suppressed."
669 (and (not (equal 670 (and (not (equal
670 (mm-handle-media-supertype handle) 671 (mm-handle-media-supertype handle)
671 "image")) 672 "image"))
673 (mm-automatic-display-p handle)
672 (mm-inlinable-p handle) 674 (mm-inlinable-p handle)
673 (mm-inlined-p handle))))))) 675 (mm-inlined-p handle)))))))
674 (save-restriction 676 (save-restriction
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 82905a5b964..e8d11584fab 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1858,7 +1858,8 @@ letter into the file name. This function removes it."
1858 (if (tramp-compat-file-name-quoted-p name) 1858 (if (tramp-compat-file-name-quoted-p name)
1859 'tramp-compat-file-name-quote 'identity) 1859 'tramp-compat-file-name-quote 'identity)
1860 (let ((name (tramp-compat-file-name-unquote name))) 1860 (let ((name (tramp-compat-file-name-unquote name)))
1861 (if (string-match "\\`[a-zA-Z]:/" name) 1861 ;; A volume letter could occur also in encoded backup file names.
1862 (if (string-match "\\(\\`[[:alpha:]]:/\\|/!drive_[[:alpha:]]\\)" name)
1862 (replace-match "/" nil t name) 1863 (replace-match "/" nil t name)
1863 name))))) 1864 name)))))
1864 1865
@@ -3222,21 +3223,23 @@ User is always nil."
3222(defun tramp-handle-find-backup-file-name (filename) 3223(defun tramp-handle-find-backup-file-name (filename)
3223 "Like `find-backup-file-name' for Tramp files." 3224 "Like `find-backup-file-name' for Tramp files."
3224 (with-parsed-tramp-file-name filename nil 3225 (with-parsed-tramp-file-name filename nil
3225 (let ((backup-directory-alist 3226 (mapcar
3226 (if tramp-backup-directory-alist 3227 'tramp-drop-volume-letter
3227 (mapcar 3228 (let ((backup-directory-alist
3228 (lambda (x) 3229 (if tramp-backup-directory-alist
3229 (cons 3230 (mapcar
3230 (car x) 3231 (lambda (x)
3231 (if (and (stringp (cdr x)) 3232 (cons
3232 (file-name-absolute-p (cdr x)) 3233 (car x)
3233 (not (tramp-tramp-file-p (cdr x)))) 3234 (if (and (stringp (cdr x))
3234 (tramp-make-tramp-file-name 3235 (file-name-absolute-p (cdr x))
3235 method user domain host port (cdr x) hop) 3236 (not (tramp-tramp-file-p (cdr x))))
3236 (cdr x)))) 3237 (tramp-make-tramp-file-name
3237 tramp-backup-directory-alist) 3238 method user domain host port (cdr x) hop)
3238 backup-directory-alist))) 3239 (cdr x))))
3239 (tramp-run-real-handler 'find-backup-file-name (list filename))))) 3240 tramp-backup-directory-alist)
3241 backup-directory-alist)))
3242 (tramp-run-real-handler 'find-backup-file-name (list filename))))))
3240 3243
3241(defun tramp-handle-insert-directory 3244(defun tramp-handle-insert-directory
3242 (filename switches &optional wildcard full-directory-p) 3245 (filename switches &optional wildcard full-directory-p)
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index f74e931a8bb..22dea039cd1 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1859,7 +1859,7 @@ Key bindings:
1859 1859
1860;;;###autoload 1860;;;###autoload
1861(defun c-or-c++-mode () 1861(defun c-or-c++-mode ()
1862 "Analyse buffer and enable either C or C++ mode. 1862 "Analyze buffer and enable either C or C++ mode.
1863 1863
1864Some people and projects use .h extension for C++ header files 1864Some people and projects use .h extension for C++ header files
1865which is also the one used for C header files. This makes 1865which is also the one used for C header files. This makes
diff --git a/src/nsfns.m b/src/nsfns.m
index c8a41f5b4b0..81722681674 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1234,6 +1234,10 @@ This function is an internal primitive--use `make-frame' instead. */)
1234 x_default_parameter (f, parms, Qinternal_border_width, make_number (2), 1234 x_default_parameter (f, parms, Qinternal_border_width, make_number (2),
1235 "internalBorderWidth", "InternalBorderWidth", 1235 "internalBorderWidth", "InternalBorderWidth",
1236 RES_TYPE_NUMBER); 1236 RES_TYPE_NUMBER);
1237 x_default_parameter (f, parms, Qright_divider_width, make_number (0),
1238 NULL, NULL, RES_TYPE_NUMBER);
1239 x_default_parameter (f, parms, Qbottom_divider_width, make_number (0),
1240 NULL, NULL, RES_TYPE_NUMBER);
1237 1241
1238 /* default vertical scrollbars on right on Mac */ 1242 /* default vertical scrollbars on right on Mac */
1239 { 1243 {
diff --git a/src/w32term.c b/src/w32term.c
index e62d49dd947..7a3b2cc631f 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -660,21 +660,25 @@ w32_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1)
660 ? face_last->foreground 660 ? face_last->foreground
661 : FRAME_FOREGROUND_PIXEL (f)); 661 : FRAME_FOREGROUND_PIXEL (f));
662 662
663 if (y1 - y0 > x1 - x0 && x1 - x0 > 2) 663 if ((y1 - y0 > x1 - x0) && (x1 - x0 >= 3))
664 /* Vertical. */ 664 /* A vertical divider, at least three pixels wide: Draw first and
665 last pixels differently. */
665 { 666 {
666 w32_fill_area_abs (f, hdc, color_first, x0, y0, x0 + 1, y1); 667 w32_fill_area_abs (f, hdc, color_first, x0, y0, x0 + 1, y1);
667 w32_fill_area_abs (f, hdc, color, x0 + 1, y0, x1 - 1, y1); 668 w32_fill_area_abs (f, hdc, color, x0 + 1, y0, x1 - 1, y1);
668 w32_fill_area_abs (f, hdc, color_last, x1 - 1, y0, x1, y1); 669 w32_fill_area_abs (f, hdc, color_last, x1 - 1, y0, x1, y1);
669 } 670 }
670 else if (x1 - x0 > y1 - y0 && y1 - y0 > 3) 671 else if ((x1 - x0 > y1 - y0) && (y1 - y0 >= 3))
671 /* Horizontal. */ 672 /* A horizontal divider, at least three pixels high: Draw first and
673 last pixels differently. */
672 { 674 {
673 w32_fill_area_abs (f, hdc, color_first, x0, y0, x1, y0 + 1); 675 w32_fill_area_abs (f, hdc, color_first, x0, y0, x1, y0 + 1);
674 w32_fill_area_abs (f, hdc, color, x0, y0 + 1, x1, y1 - 1); 676 w32_fill_area_abs (f, hdc, color, x0, y0 + 1, x1, y1 - 1);
675 w32_fill_area_abs (f, hdc, color_last, x0, y1 - 1, x1, y1); 677 w32_fill_area_abs (f, hdc, color_last, x0, y1 - 1, x1, y1);
676 } 678 }
677 else 679 else
680 /* In any other case do not draw the first and last pixels
681 differently. */
678 w32_fill_area_abs (f, hdc, color, x0, y0, x1, y1); 682 w32_fill_area_abs (f, hdc, color, x0, y0, x1, y1);
679 683
680 release_frame_dc (f, hdc); 684 release_frame_dc (f, hdc);
diff --git a/src/xterm.c b/src/xterm.c
index 28abfaecde9..1deb7b46013 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1104,8 +1104,9 @@ x_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1)
1104 : FRAME_FOREGROUND_PIXEL (f)); 1104 : FRAME_FOREGROUND_PIXEL (f));
1105 Display *display = FRAME_X_DISPLAY (f); 1105 Display *display = FRAME_X_DISPLAY (f);
1106 1106
1107 if (y1 - y0 > x1 - x0 && x1 - x0 > 2) 1107 if ((y1 - y0 > x1 - x0) && (x1 - x0 >= 3))
1108 /* Vertical. */ 1108 /* A vertical divider, at least three pixels wide: Draw first and
1109 last pixels differently. */
1109 { 1110 {
1110 XSetForeground (display, f->output_data.x->normal_gc, color_first); 1111 XSetForeground (display, f->output_data.x->normal_gc, color_first);
1111 x_fill_rectangle (f, f->output_data.x->normal_gc, 1112 x_fill_rectangle (f, f->output_data.x->normal_gc,
@@ -1117,8 +1118,9 @@ x_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1)
1117 x_fill_rectangle (f, f->output_data.x->normal_gc, 1118 x_fill_rectangle (f, f->output_data.x->normal_gc,
1118 x1 - 1, y0, 1, y1 - y0); 1119 x1 - 1, y0, 1, y1 - y0);
1119 } 1120 }
1120 else if (x1 - x0 > y1 - y0 && y1 - y0 > 3) 1121 else if ((x1 - x0 > y1 - y0) && (y1 - y0 >= 3))
1121 /* Horizontal. */ 1122 /* A horizontal divider, at least three pixels high: Draw first and
1123 last pixels differently. */
1122 { 1124 {
1123 XSetForeground (display, f->output_data.x->normal_gc, color_first); 1125 XSetForeground (display, f->output_data.x->normal_gc, color_first);
1124 x_fill_rectangle (f, f->output_data.x->normal_gc, 1126 x_fill_rectangle (f, f->output_data.x->normal_gc,
@@ -1132,6 +1134,8 @@ x_draw_window_divider (struct window *w, int x0, int x1, int y0, int y1)
1132 } 1134 }
1133 else 1135 else
1134 { 1136 {
1137 /* In any other case do not draw the first and last pixels
1138 differently. */
1135 XSetForeground (display, f->output_data.x->normal_gc, color); 1139 XSetForeground (display, f->output_data.x->normal_gc, color);
1136 x_fill_rectangle (f, f->output_data.x->normal_gc, 1140 x_fill_rectangle (f, f->output_data.x->normal_gc,
1137 x0, y0, x1 - x0, y1 - y0); 1141 x0, y0, x1 - x0, y1 - y0);
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index bfc62049ccd..491ff60e3e8 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -2983,9 +2983,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
2983 (set-file-modes tmp-name3 #o444) 2983 (set-file-modes tmp-name3 #o444)
2984 (should-not 2984 (should-not
2985 (string-equal (file-acl tmp-name1) (file-acl tmp-name3))) 2985 (string-equal (file-acl tmp-name1) (file-acl tmp-name3)))
2986 ;; Copy ACL. 2986 ;; Copy ACL. Since we don't know whether Emacs is built
2987 (file-acl tmp-name1) (file-acl tmp-name3) 2987 ;; with local ACL support, we must check it.
2988 (should (string-equal (file-acl tmp-name1) (file-acl tmp-name3)))) 2988 (when (set-file-acl tmp-name3 (file-acl tmp-name1))
2989 (should (string-equal (file-acl tmp-name1) (file-acl tmp-name3))))
2989 2990
2990 ;; Two files with same ACLs. 2991 ;; Two files with same ACLs.
2991 (delete-file tmp-name1) 2992 (delete-file tmp-name1)