diff options
-rw-r--r-- | doc/lispref/os.texi | 6 | ||||
-rw-r--r-- | doc/misc/trampver.texi | 2 | ||||
-rw-r--r-- | lisp/frame.el | 4 | ||||
-rw-r--r-- | lisp/loadup.el | 2 | ||||
-rw-r--r-- | lisp/net/shr.el | 11 | ||||
-rw-r--r-- | lisp/net/trampver.el | 2 | ||||
-rw-r--r-- | lisp/progmodes/elisp-mode.el | 1 | ||||
-rw-r--r-- | lisp/simple.el | 3 | ||||
-rw-r--r-- | src/undo.c | 5 | ||||
-rw-r--r-- | src/w32fns.c | 23 | ||||
-rw-r--r-- | src/xfns.c | 7 | ||||
-rw-r--r-- | src/xterm.c | 16 | ||||
-rw-r--r-- | test/automated/simple-test.el | 17 |
13 files changed, 54 insertions, 45 deletions
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 53aa0e195a7..f3c4e29cca2 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi @@ -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 diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi index dccf3175386..a3032190909 100644 --- a/doc/misc/trampver.texi +++ b/doc/misc/trampver.texi @@ -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 diff --git a/lisp/frame.el b/lisp/frame.el index 3f31a2973c6..f02406541a1 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -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) diff --git a/lisp/loadup.el b/lisp/loadup.el index fef111f6611..f0caa8be349 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -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) diff --git a/lisp/net/shr.el b/lisp/net/shr.el index 23e2dc1f874..a48d098fe26 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -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) diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 5c42f3a828a..04046c5ee7d 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el @@ -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 diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index a19542fb204..af2ea56dcee 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -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) diff --git a/lisp/simple.el b/lisp/simple.el index 2781ad02b97..b115a2a0cbb 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -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)))) diff --git a/src/undo.c b/src/undo.c index 009ebc0f959..214beaeb9ea 100644 --- a/src/undo.c +++ b/src/undo.c @@ -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; diff --git a/src/w32fns.c b/src/w32fns.c index b71002f8bfc..f3391cb98f0 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -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 */ /*********************************************************************** @@ -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); diff --git a/src/xfns.c b/src/xfns.c index 9d90b7ba35f..313ac52f12a 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -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]; diff --git a/src/xterm.c b/src/xterm.c index 36a914c8559..acb6566d51d 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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) diff --git a/test/automated/simple-test.el b/test/automated/simple-test.el index 86c9fc2e767..07b5eaa93e4 100644 --- a/test/automated/simple-test.el +++ b/test/automated/simple-test.el @@ -34,6 +34,17 @@ (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))))) + ;;; `newline' (ert-deftest newline () @@ -233,6 +244,12 @@ (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) |