]> code.delx.au - gnu-emacs/commitdiff
Merge branch 'erc-async-reconnect' into emacs-25
authorl3thal <kwhite@gnu.org>
Fri, 13 Nov 2015 21:37:26 +0000 (16:37 -0500)
committerl3thal <kwhite@gnu.org>
Fri, 13 Nov 2015 21:37:26 +0000 (16:37 -0500)
13 files changed:
doc/lispref/os.texi
doc/misc/trampver.texi
lisp/frame.el
lisp/loadup.el
lisp/net/shr.el
lisp/net/trampver.el
lisp/progmodes/elisp-mode.el
lisp/simple.el
src/undo.c
src/w32fns.c
src/xfns.c
src/xterm.c
test/automated/simple-test.el

index 53aa0e195a7dd8d7b87bbb5398bf65928a328eb6..f3c4e29cca26f5a5b08a90505cfb04064566beae 100644 (file)
@@ -2603,12 +2603,6 @@ Notification severity level, one of @code{info}, @code{warning}, or
 left of the notification title, but only if the @code{:title} parameter
 (see below) is also specified and is a string.
 
-@item :timeout @var{timeout}
-@var{timeout} is the time in seconds after which the notification
-disappears.  The value can be integer or floating-point.  This is
-ignored on Vista and later systems, where the duration is fixed at 9
-sec and can only be customized via system-wide Accessibility settings.
-
 @item :title @var{title}
 The title of the notification.  If @var{title} is a string, it is
 displayed in a larger font immediately above the body text.  The title
index dccf31753863975a5f3e096960743b6cd8738616..a30321909096311e62f39f902195e363aa4bf44b 100644 (file)
@@ -8,7 +8,7 @@
 @c In the Tramp GIT, the version number is auto-frobbed from
 @c configure.ac, so you should edit that file and run
 @c "autoconf && ./configure" to change the version number.
-@set trampver 2.2.13-pre
+@set trampver 2.2.13-25.1
 
 @c Other flags from configuration
 @set instprefix /usr/local
index 3f31a2973c6073fd67c6b01b0c8b85235b37c87e..f02406541a167b4946e16eb4c0f005644b9d575f 100644 (file)
@@ -2238,7 +2238,9 @@ See also `toggle-frame-maximized'."
       '(line-spacing
         overline-margin
         line-prefix
-        wrap-prefix))
+        wrap-prefix
+        bidi-paragraph-direction
+        bidi-display-reordering))
 
 (provide 'frame)
 
index fef111f6611bcb3f013ca0191ae6bc8be2fec5e5..f0caa8be34954bbd5f0c515309b43830e64199e4 100644 (file)
@@ -73,7 +73,7 @@
 
 (if (eq t purify-flag)
     ;; Hash consing saved around 11% of pure space in my tests.
-    (setq purify-flag (make-hash-table :test 'equal :size 70000)))
+    (setq purify-flag (make-hash-table :test 'equal :size 80000)))
 
 (message "Using load-path %s" load-path)
 
index 23e2dc1f8740f50204a570e62837cc0153c9ad24..a48d098fe2605229f1fea801379aed2fa8193fc8 100644 (file)
@@ -203,9 +203,8 @@ cid: URL as the argument.")
       (goto-char begin)
       (shr-insert-document dom))))
 
-(defun have-fringes-p ()
-  "Return t if fringe-columns is bound, and either (fringe-columns 'left) or
-\(fringe-columns 'right) returns nonzero."
+(defun shr--have-one-fringe-p ()
+  "Return non-nil if we know at least one of the fringes has non-zero width."
   (and (fboundp 'fringe-columns)
        (or (not (zerop (fringe-columns 'right)))
            (not (zerop (fringe-columns 'left))))))
@@ -237,13 +236,13 @@ DOM should be a parse tree as generated by
                                (if (not shr-use-fonts)
                                    (- (window-body-width) 1
                                        (if (and (null shr-width)
-                                                (not (have-fringes-p)))
+                                                (not (shr--have-one-fringe-p)))
                                            0
                                          1))
                                  (- (window-body-width nil t)
                                      (* 2 (frame-char-width))
                                      (if (and (null shr-width)
-                                              (not (have-fringes-p)))
+                                              (not (shr--have-one-fringe-p)))
                                          (* (frame-char-width) 2)
                                        0))))))
     (shr-descend dom)
@@ -467,7 +466,7 @@ size, and full-buffer size."
                                    ;; to usurp one column for the
                                    ;; continuation glyph.
                                    (if (and (null shr-width)
-                                            (not (have-fringes-p)))
+                                            (not (shr--have-one-fringe-p)))
                                        (* (frame-char-width) 2)
                                      0))))
        (shr-insert text)
index 5c42f3a828af9cbd45c0f8f208aa3deac788c3be..04046c5ee7de181f59f71e19f72d0153e2a70450 100644 (file)
@@ -31,7 +31,7 @@
 ;; should be changed only there.
 
 ;;;###tramp-autoload
-(defconst tramp-version "2.2.13-pre"
+(defconst tramp-version "2.2.13-25.1"
   "This version of Tramp.")
 
 ;;;###tramp-autoload
index a19542fb2040d597a40339598064080e4ae884ec..af2ea56dcee41aa27a72ef09e5dbbedab7db421f 100644 (file)
@@ -802,6 +802,7 @@ non-nil result supercedes the xrefs produced by
     xrefs))
 
 (declare-function project-library-roots "project")
+(declare-function project-roots "project")
 (declare-function project-current "project")
 
 (defun elisp--xref-find-references (symbol)
index 2781ad02b9704bbcb356ae30d11ddada38b87877..b115a2a0cbb30a1b37b043aaab1098d00100e57e 100644 (file)
@@ -6634,7 +6634,8 @@ current object."
       (setq pos1 (funcall aux -1))
       (goto-char (car pos1))
       (setq pos2 (funcall aux arg))
-      (transpose-subr-1 pos1 pos2)))))
+      (transpose-subr-1 pos1 pos2)
+      (goto-char (+ (car pos2) (- (cdr pos1) (car pos1))))))))
 
 (defun transpose-subr-1 (pos1 pos2)
   (when (> (car pos1) (cdr pos1)) (setq pos1 (cons (cdr pos1) (car pos1))))
index 009ebc0f959b5767f675c45d879794c1150ad5f5..214beaeb9ea5f78a30a8c73671fa40b26e5dd582 100644 (file)
@@ -34,8 +34,8 @@ static ptrdiff_t last_boundary_position;
    an undo-boundary.  */
 static Lisp_Object pending_boundary;
 
-void
-run_undoable_change ()
+static void
+run_undoable_change (void)
 {
   call0 (Qundo_auto__undoable_change);
 }
@@ -235,7 +235,6 @@ record_property_change (ptrdiff_t beg, ptrdiff_t length,
 {
   Lisp_Object lbeg, lend, entry;
   struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer);
-  bool boundary = false;
 
   if (EQ (BVAR (buf, undo_list), Qt))
     return;
index b71002f8bfc91885e4d0da5dafd461809ef6853d..f3391cb98f01620a34d5d1b9cebf52b7e7cb6303 100644 (file)
@@ -8756,7 +8756,7 @@ Internal use only.  */)
   return menubar_in_use ? Qt : Qnil;
 }
 
-#ifndef __CYGWIN__
+#if defined WINDOWSNT && !defined HAVE_DBUS
 
 /***********************************************************************
                          Tray notifications
@@ -9111,13 +9111,6 @@ The following parameters are supported:
                     parameter (see below) is also specified and is a
                     string.
 
-:timeout TIMEOUT -- TIMEOUT is the time in seconds after which the
-                    notification disappears.  The value can be integer
-                    or floating-point.  This is ignored on Vista and
-                    later systems, where the duration is fixed at 9 sec
-                    and can only be customized via system-wide
-                    Accessibility settings.
-
 :title TITLE     -- The title of the notification.  If TITLE is a string,
                     it is displayed in a larger font immediately above
                     the body text.  The title text can be up to 63
@@ -9179,13 +9172,6 @@ usage: (w32-notification-notify &rest PARAMS)  */)
   else
     severity = Ni_Info;
 
-  /* Timeout.  */
-  lres = Fplist_get (arg_plist, QCtimeout);
-  if (NUMBERP (lres))
-    timeout = 1000 * (INTEGERP (lres) ? XINT (lres) : XFLOAT_DATA (lres));
-  else
-    timeout = 0;
-
   /* Title.  */
   lres = Fplist_get (arg_plist, QCtitle);
   if (STRINGP (lres))
@@ -9219,7 +9205,7 @@ DEFUN ("w32-notification-close",
   return Qnil;
 }
 
-#endif /* !__CYGWIN__ */
+#endif /* WINDOWSNT && !HAVE_DBUS */
 
 \f
 /***********************************************************************
@@ -9294,14 +9280,15 @@ syms_of_w32fns (void)
   DEFSYM (Qframes, "frames");
   DEFSYM (Qtip_frame, "tip-frame");
   DEFSYM (Qunicode_sip, "unicode-sip");
+#if defined WINDOWSNT && !defined HAVE_DBUS
   DEFSYM (QCicon, ":icon");
   DEFSYM (QCtip, ":tip");
   DEFSYM (QClevel, ":level");
   DEFSYM (Qinfo, "info");
   DEFSYM (Qwarning, "warning");
-  DEFSYM (QCtimeout, ":timeout");
   DEFSYM (QCtitle, ":title");
   DEFSYM (QCbody, ":body");
+#endif
 
   /* Symbols used elsewhere, but only in MS-Windows-specific code.  */
   DEFSYM (Qgnutls_dll, "gnutls");
@@ -9635,8 +9622,10 @@ This variable has effect only on Windows Vista and later.  */);
   defsubr (&Sw32_window_exists_p);
   defsubr (&Sw32_battery_status);
   defsubr (&Sw32__menu_bar_in_use);
+#if defined WINDOWSNT && !defined HAVE_DBUS
   defsubr (&Sw32_notification_notify);
   defsubr (&Sw32_notification_close);
+#endif
 
 #ifdef WINDOWSNT
   defsubr (&Sfile_system_info);
index 9d90b7ba35fced94965074c07acfad342a8e998b..313ac52f12ae574b5692386479d48db04bd47140 100644 (file)
@@ -450,10 +450,11 @@ x_real_pos_and_offsets (struct frame *f,
           if (prop)
             {
               if (prop->type == target_type
-                  && xcb_get_property_value_length (prop) == 4
-                  && prop->format == 32)
+                  && prop->format == 32
+                  && (xcb_get_property_value_length (prop)
+                     == 4 * sizeof (int32_t)))
                 {
-                  long *fe = xcb_get_property_value (prop);
+                  int32_t *fe = xcb_get_property_value (prop);
 
                   outer_x = -fe[0];
                   outer_y = -fe[2];
index 36a914c85598faf369e1af1bdc3c2a5c4c888f56..acb6566d51dcf12915ff8230a5076f0a4479a7cf 100644 (file)
@@ -10101,17 +10101,19 @@ get_current_wm_state (struct frame *f,
   bool is_hidden = false;
   struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (f);
   long max_len = 65536;
-  unsigned char *tmp_data = NULL;
   Atom target_type = XA_ATOM;
   /* If XCB is available, we can avoid three XSync calls.  */
 #ifdef USE_XCB
   xcb_get_property_cookie_t prop_cookie;
   xcb_get_property_reply_t *prop;
+  xcb_atom_t *reply_data;
 #else
   Display *dpy = FRAME_X_DISPLAY (f);
   unsigned long bytes_remaining;
   int rc, actual_format;
   Atom actual_type;
+  unsigned char *tmp_data = NULL;
+  Atom *reply_data;
 #endif
 
   *sticky = false;
@@ -10126,8 +10128,10 @@ get_current_wm_state (struct frame *f,
   prop = xcb_get_property_reply (dpyinfo->xcb_connection, prop_cookie, NULL);
   if (prop && prop->type == target_type)
     {
-      tmp_data = xcb_get_property_value (prop);
-      actual_size = xcb_get_property_value_length (prop);
+      int actual_bytes = xcb_get_property_value_length (prop);
+      eassume (0 <= actual_bytes);
+      actual_size = actual_bytes / sizeof *reply_data;
+      reply_data = xcb_get_property_value (prop);
     }
   else
     {
@@ -10141,7 +10145,9 @@ get_current_wm_state (struct frame *f,
                            &actual_type, &actual_format, &actual_size,
                            &bytes_remaining, &tmp_data);
 
-  if (rc != Success || actual_type != target_type || x_had_errors_p (dpy))
+  if (rc == Success && actual_type == target_type && ! x_had_errors_p (dpy))
+    reply_data = (Atom *) tmp_data;
+  else
     {
       actual_size = 0;
       is_hidden = FRAME_ICONIFIED_P (f);
@@ -10152,7 +10158,7 @@ get_current_wm_state (struct frame *f,
 
   for (i = 0; i < actual_size; ++i)
     {
-      Atom a = ((Atom*)tmp_data)[i];
+      Atom a = reply_data[i];
       if (a == dpyinfo->Xatom_net_wm_state_hidden)
        is_hidden = true;
       else if (a == dpyinfo->Xatom_net_wm_state_maximized_horz)
index 86c9fc2e7670dfb83bf45a729cbeac92a2830de6..07b5eaa93e4dd8726c8406742ecc4c32084f57ce 100644 (file)
            (buffer-substring (point) (point-max)))))
 
 
+(defmacro simple-test--transpositions (&rest body)
+  (declare (indent 0)
+           (debug t))
+  `(with-temp-buffer
+     (emacs-lisp-mode)
+     (insert "(s1) (s2) (s3) (s4) (s5)")
+     (backward-sexp 1)
+     ,@body
+     (cons (buffer-substring (point-min) (point))
+           (buffer-substring (point) (point-max)))))
+
 \f
 ;;; `newline'
 (ert-deftest newline ()
      (car buffer-undo-list)
      (undo-auto--boundaries 'test))))
 
+;;; Transposition with negative args (bug#20698, bug#21885)
+(ert-deftest simple-transpose-subr ()
+  (should (equal (simple-test--transpositions (transpose-sexps -1))
+                 '("(s1) (s2) (s4)" . " (s3) (s5)")))
+  (should (equal (simple-test--transpositions (transpose-sexps -2))
+                 '("(s1) (s4)" . " (s2) (s3) (s5)"))))
 
 
 (provide 'simple-test)