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
@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
'(line-spacing
overline-margin
line-prefix
- wrap-prefix))
+ wrap-prefix
+ bidi-paragraph-direction
+ bidi-display-reordering))
(provide 'frame)
(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)
(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))))))
(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)
;; 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)
;; 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
xrefs))
(declare-function project-library-roots "project")
+(declare-function project-roots "project")
(declare-function project-current "project")
(defun elisp--xref-find-references (symbol)
(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))))
an undo-boundary. */
static Lisp_Object pending_boundary;
-void
-run_undoable_change ()
+static void
+run_undoable_change (void)
{
call0 (Qundo_auto__undoable_change);
}
{
Lisp_Object lbeg, lend, entry;
struct buffer *obuf = current_buffer, *buf = XBUFFER (buffer);
- bool boundary = false;
if (EQ (BVAR (buf, undo_list), Qt))
return;
return menubar_in_use ? Qt : Qnil;
}
-#ifndef __CYGWIN__
+#if defined WINDOWSNT && !defined HAVE_DBUS
/***********************************************************************
Tray notifications
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
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))
return Qnil;
}
-#endif /* !__CYGWIN__ */
+#endif /* WINDOWSNT && !HAVE_DBUS */
\f
/***********************************************************************
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");
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);
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];
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;
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
{
&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);
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)
(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)