emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 5f1cf4b 5/6: Merge from origin/emacs-26


From: Glenn Morris
Subject: [Emacs-diffs] master 5f1cf4b 5/6: Merge from origin/emacs-26
Date: Mon, 20 Nov 2017 13:11:07 -0500 (EST)

branch: master
commit 5f1cf4b5c7640ed747bd867712a4580bc2e5b92f
Merge: 7aa59d4 fc5b8f1
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    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
---
 ChangeLog.3                  |  2 +-
 etc/NEWS.26                  |  5 ++---
 lisp/emacs-lisp/byte-run.el  |  2 +-
 lisp/help-fns.el             |  6 +++---
 lisp/mh-e/mh-mime.el         |  2 ++
 lisp/net/tramp.el            | 35 +++++++++++++++++++----------------
 lisp/progmodes/cc-mode.el    |  2 +-
 src/nsfns.m                  |  4 ++++
 src/w32term.c                | 12 ++++++++----
 src/xterm.c                  | 12 ++++++++----
 test/lisp/net/tramp-tests.el |  7 ++++---
 11 files changed, 53 insertions(+), 36 deletions(-)

diff --git a/ChangeLog.3 b/ChangeLog.3
index e7831a3..17f18c0 100644
--- a/ChangeLog.3
+++ b/ChangeLog.3
@@ -38322,7 +38322,7 @@
        Automatically detect whether .h file is C or C++
 
        * lisp/progmodes/cc-mode.el (c-or-c++-mode): A new function which
-       analyses contents of the buffer to determine whether it looks like C++
+       analyzes contents of the buffer to determine whether it looks like C++
        source code and based on that enables c-mode or c++-mode.
        (c-or-c++-mode--regexp): Regular expression which, when matches
        a buffer, signals file is C++.
diff --git a/etc/NEWS.26 b/etc/NEWS.26
index f79c2cb..6da4ab9 100644
--- a/etc/NEWS.26
+++ b/etc/NEWS.26
@@ -1155,9 +1155,8 @@ branch-related commands on a keymap bound to 'B'.
 
 ---
 *** Opening a .h file will turn C or C++ mode depending on language used.
-This is done with the help of 'c-or-c++-mode' function which analyses
-contents of the buffer to determine whether it's a C or C++ source
-file.
+This is done with the help of the 'c-or-c++-mode' function, which
+analyzes buffer contents to infer whether it's a C or C++ source file.
 
 ---
 ** 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 c6ad209..abfcdb3 100644
--- a/lisp/emacs-lisp/byte-run.el
+++ b/lisp/emacs-lisp/byte-run.el
@@ -285,7 +285,7 @@ The return value is undefined.
           def))))
 
 
-;; Redefined in byte-optimize.el.
+;; Redefined in byte-opt.el.
 ;; This is not documented--it's not clear that we should promote it.
 (fset 'inline 'progn)
 
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 3c23765..643b0cb 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -560,7 +560,7 @@ FILE is the file where FUNCTION was probably defined."
             (setq short rel))))
     short))
 
-(defun help-fns--analyse-function (function)
+(defun help-fns--analyze-function (function)
   ;; FIXME: Document/explain the differences between FUNCTION,
   ;; REAL-FUNCTION, DEF, and REAL-DEF.
   "Return information about FUNCTION.
@@ -602,7 +602,7 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED 
REAL-DEF)."
 (defun help-fns-function-description-header (function)
   "Print a line describing FUNCTION to `standard-output'."
   (pcase-let* ((`(,_real-function ,def ,aliased ,real-def)
-                (help-fns--analyse-function function))
+                (help-fns--analyze-function function))
                (file-name (find-lisp-object-file-name function (if aliased 
'defun
                                                                  def)))
                (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)."
   (terpri)(terpri)
 
   (pcase-let* ((`(,real-function ,def ,_aliased ,real-def)
-                (help-fns--analyse-function function))
+                (help-fns--analyze-function function))
                (doc-raw (condition-case nil
                             ;; FIXME: Maybe `documentation' should return nil
                             ;; 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 9d1edf0..69c57e0 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."
          (attachmentp (equal (car (mm-handle-disposition handle))
                              "attachment"))
          (inlinep (and (equal (car (mm-handle-disposition handle)) "inline")
+                       (mm-automatic-display-p handle)
                        (mm-inlinable-p handle)
                        (mm-inlined-p handle)))
          (displayp (or inlinep                   ; show if inline OR
@@ -669,6 +670,7 @@ buttons for alternative parts that are usually suppressed."
                                 (and (not (equal
                                            (mm-handle-media-supertype handle)
                                            "image"))
+                                     (mm-automatic-display-p handle)
                                      (mm-inlinable-p handle)
                                      (mm-inlined-p handle)))))))
     (save-restriction
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 82905a5..e8d1158 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1858,7 +1858,8 @@ letter into the file name.  This function removes it."
      (if (tramp-compat-file-name-quoted-p name)
         'tramp-compat-file-name-quote 'identity)
      (let ((name (tramp-compat-file-name-unquote name)))
-       (if (string-match "\\`[a-zA-Z]:/" name)
+       ;; A volume letter could occur also in encoded backup file names.
+       (if (string-match "\\(\\`[[:alpha:]]:/\\|/!drive_[[:alpha:]]\\)" name)
           (replace-match "/" nil t name)
         name)))))
 
@@ -3222,21 +3223,23 @@ User is always nil."
 (defun tramp-handle-find-backup-file-name (filename)
   "Like `find-backup-file-name' for Tramp files."
   (with-parsed-tramp-file-name filename nil
-    (let ((backup-directory-alist
-          (if tramp-backup-directory-alist
-              (mapcar
-               (lambda (x)
-                 (cons
-                  (car x)
-                  (if (and (stringp (cdr x))
-                           (file-name-absolute-p (cdr x))
-                           (not (tramp-tramp-file-p (cdr x))))
-                      (tramp-make-tramp-file-name
-                       method user domain host port (cdr x) hop)
-                    (cdr x))))
-               tramp-backup-directory-alist)
-            backup-directory-alist)))
-      (tramp-run-real-handler 'find-backup-file-name (list filename)))))
+    (mapcar
+     'tramp-drop-volume-letter
+     (let ((backup-directory-alist
+           (if tramp-backup-directory-alist
+               (mapcar
+                (lambda (x)
+                  (cons
+                   (car x)
+                   (if (and (stringp (cdr x))
+                            (file-name-absolute-p (cdr x))
+                            (not (tramp-tramp-file-p (cdr x))))
+                       (tramp-make-tramp-file-name
+                        method user domain host port (cdr x) hop)
+                     (cdr x))))
+                tramp-backup-directory-alist)
+             backup-directory-alist)))
+       (tramp-run-real-handler 'find-backup-file-name (list filename))))))
 
 (defun tramp-handle-insert-directory
   (filename switches &optional wildcard full-directory-p)
diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el
index f74e931..22dea03 100644
--- a/lisp/progmodes/cc-mode.el
+++ b/lisp/progmodes/cc-mode.el
@@ -1859,7 +1859,7 @@ Key bindings:
 
 ;;;###autoload
 (defun c-or-c++-mode ()
-  "Analyse buffer and enable either C or C++ mode.
+  "Analyze buffer and enable either C or C++ mode.
 
 Some people and projects use .h extension for C++ header files
 which is also the one used for C header files.  This makes
diff --git a/src/nsfns.m b/src/nsfns.m
index c8a41f5..8172268 100644
--- a/src/nsfns.m
+++ b/src/nsfns.m
@@ -1234,6 +1234,10 @@ This function is an internal primitive--use `make-frame' 
instead.  */)
   x_default_parameter (f, parms, Qinternal_border_width, make_number (2),
                       "internalBorderWidth", "InternalBorderWidth",
                       RES_TYPE_NUMBER);
+  x_default_parameter (f, parms, Qright_divider_width, make_number (0),
+                      NULL, NULL, RES_TYPE_NUMBER);
+  x_default_parameter (f, parms, Qbottom_divider_width, make_number (0),
+                      NULL, NULL, RES_TYPE_NUMBER);
 
   /* default vertical scrollbars on right on Mac */
   {
diff --git a/src/w32term.c b/src/w32term.c
index e62d49d..7a3b2cc 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)
                              ? face_last->foreground
                              : FRAME_FOREGROUND_PIXEL (f));
 
-  if (y1 - y0 > x1 - x0 && x1 - x0 > 2)
-    /* Vertical.  */
+  if ((y1 - y0 > x1 - x0) && (x1 - x0 >= 3))
+    /* A vertical divider, at least three pixels wide: Draw first and
+       last pixels differently.  */
     {
       w32_fill_area_abs (f, hdc, color_first, x0, y0, x0 + 1, y1);
       w32_fill_area_abs (f, hdc, color, x0 + 1, y0, x1 - 1, y1);
       w32_fill_area_abs (f, hdc, color_last, x1 - 1, y0, x1, y1);
     }
-  else if (x1 - x0 > y1 - y0 && y1 - y0 > 3)
-    /* Horizontal.  */
+  else if ((x1 - x0 > y1 - y0) && (y1 - y0 >= 3))
+    /* A horizontal divider, at least three pixels high: Draw first and
+       last pixels differently.  */
     {
       w32_fill_area_abs (f, hdc, color_first, x0, y0, x1, y0 + 1);
       w32_fill_area_abs (f, hdc, color, x0, y0 + 1, x1, y1 - 1);
       w32_fill_area_abs (f, hdc, color_last, x0, y1 - 1, x1, y1);
     }
   else
+    /* In any other case do not draw the first and last pixels
+       differently.  */
     w32_fill_area_abs (f, hdc, color, x0, y0, x1, y1);
 
   release_frame_dc (f, hdc);
diff --git a/src/xterm.c b/src/xterm.c
index 28abfae..1deb7b4 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)
                              : FRAME_FOREGROUND_PIXEL (f));
   Display *display = FRAME_X_DISPLAY (f);
 
-  if (y1 - y0 > x1 - x0 && x1 - x0 > 2)
-    /* Vertical.  */
+  if ((y1 - y0 > x1 - x0) && (x1 - x0 >= 3))
+    /* A vertical divider, at least three pixels wide: Draw first and
+       last pixels differently.  */
     {
       XSetForeground (display, f->output_data.x->normal_gc, color_first);
       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)
       x_fill_rectangle (f, f->output_data.x->normal_gc,
                        x1 - 1, y0, 1, y1 - y0);
     }
-  else if (x1 - x0 > y1 - y0 && y1 - y0 > 3)
-    /* Horizontal.  */
+  else if ((x1 - x0 > y1 - y0) && (y1 - y0 >= 3))
+    /* A horizontal divider, at least three pixels high: Draw first and
+       last pixels differently.  */
     {
       XSetForeground (display, f->output_data.x->normal_gc, color_first);
       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)
     }
   else
     {
+    /* In any other case do not draw the first and last pixels
+       differently.  */
       XSetForeground (display, f->output_data.x->normal_gc, color);
       x_fill_rectangle (f, f->output_data.x->normal_gc,
                        x0, y0, x1 - x0, y1 - y0);
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index bfc6204..491ff60 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'."
            (set-file-modes tmp-name3 #o444)
            (should-not
             (string-equal (file-acl tmp-name1) (file-acl tmp-name3)))
-           ;; Copy ACL.
-            (file-acl tmp-name1) (file-acl tmp-name3)
-           (should (string-equal (file-acl tmp-name1) (file-acl tmp-name3))))
+           ;; Copy ACL.  Since we don't know whether Emacs is built
+           ;; with local ACL support, we must check it.
+           (when (set-file-acl tmp-name3 (file-acl tmp-name1))
+             (should (string-equal (file-acl tmp-name1) (file-acl tmp-name3))))
 
            ;; Two files with same ACLs.
            (delete-file tmp-name1)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]