commit 799a8a3338389013e8a76a70f507664ccb09a14f (HEAD, refs/remotes/origin/master) Author: Alan Mackenzie Date: Wed Aug 24 01:18:20 2016 +0000 Analyze and fontify correctly a C++ `enum' with colon, but lacking a tag. * lisp/progmodes/cc-engine.el (c-backward-typed-enum-colon): Check for "enum" directly preceding the colon, and handle it. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index ccdc1b1..940d7a4 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -9756,7 +9756,10 @@ comment at the start of cc-engine.el for more info." ((and (eql (char-after) ?:) (save-excursion (c-backward-syntactic-ws) - (c-on-identifier))) + (or (c-on-identifier) + (progn + (c-backward-token-2) + (looking-at c-brace-list-key))))) (setq colon-pos (point)) (forward-char) (c-forward-syntactic-ws) commit 90d258c51eae1f47db8fe630fccb4e98b7a3187a Author: Noah Friedman Date: Tue Aug 23 17:13:31 2016 -0700 * src/xfns.c (Fx_change_window_property): Modify previous change. Instead of forcing format to 8 for strings, check that the length of the string is appropriate for whatever format given. (Fx_window_property_attributes): If prop isn't found on frame's inner window, try its outer window. This mimics the behavior of Fx_window_property. diff --git a/src/xfns.c b/src/xfns.c index 8860a21..2dfb8df 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -5108,12 +5108,18 @@ FRAME. Default is to change on the edit X window. */) } else { + ptrdiff_t elsize; + CHECK_STRING (value); data = SDATA (value); if (INT_MAX < SBYTES (value)) error ("VALUE too long"); - nelements = SBYTES (value); - element_format = 8; /* ignore any provided format */ + + /* See comment above about longs and format=32 */ + elsize = element_format == 32 ? sizeof (long) : element_format >> 3; + if (SBYTES (value) % elsize != 0) + error ("VALUE must contain an integral number of octets for FORMAT"); + nelements = SBYTES (value) / elsize; } block_input (); @@ -5224,7 +5230,8 @@ x_window_property_intern (struct frame *f, } if (NILP (vector_ret_p)) - prop_value = make_string ((char *) tmp_data, (actual_format / 8) * actual_size); + prop_value = make_string ((char *) tmp_data, + (actual_format >> 3) * actual_size); else prop_value = x_property_data_to_lisp (f, tmp_data, @@ -5353,14 +5360,29 @@ Otherwise, the return value is a vector with the following fields: prop_atom, 0, 0, False, AnyPropertyType, &actual_type, &actual_format, &actual_size, &bytes_remaining, &tmp_data); + if (rc == Success /* no invalid params */ + && actual_format == 0 /* but prop not found */ + && NILP (source) + && target_window != FRAME_OUTER_WINDOW (f)) + { + /* analogous behavior to x-window-property: if property isn't found + on the frame's inner window and no alternate window id was + provided, try the frame's outer window. */ + target_window = FRAME_OUTER_WINDOW (f); + rc = XGetWindowProperty (FRAME_X_DISPLAY (f), target_window, + prop_atom, 0, 0, False, AnyPropertyType, + &actual_type, &actual_format, &actual_size, + &bytes_remaining, &tmp_data); + } + if (rc == Success && actual_format != 0) { XFree (tmp_data); - prop_attr = Fmake_vector (make_number (3), Qnil); + prop_attr = make_uninit_vector (3); ASET (prop_attr, 0, make_number (actual_type)); ASET (prop_attr, 1, make_number (actual_format)); - ASET (prop_attr, 2, make_number (bytes_remaining / (actual_format / 8))); + ASET (prop_attr, 2, make_number (bytes_remaining / (actual_format >> 3))); } unblock_input (); commit 8d73c252be365868c8d7b98015ea968ead167da4 Author: Lars Ingebrigtsen Date: Wed Aug 24 00:31:57 2016 +0200 Fix invalid image rotations * lisp/image.el (image-rotate): Limit rotation to 360 degrees. diff --git a/lisp/image.el b/lisp/image.el index 08df7d4..272cee5 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -1013,7 +1013,11 @@ default is 20%." (interactive) (let ((image (image--get-imagemagick-and-warn))) (plist-put (cdr image) :rotation - (float (+ (or (plist-get (cdr image) :rotation) 0) 90))))) + (float (mod (+ (or (plist-get (cdr image) :rotation) 0) 90) + ;; We don't want to exceed 360 degrees + ;; rotation, because it's not seen as valid + ;; in exif data. + 360))))) (defun image-save () "Save the image under point." commit f345fdd7e64064194a9235406971f62b9da09ae2 Author: Tino Calancha Date: Tue Aug 23 22:38:48 2016 +0900 call-process instead of call-process-region with empty region * lisp/calc/calc-graph.el (calc-graph-show-tty): Use call-process and shell-command-switch. diff --git a/lisp/calc/calc-graph.el b/lisp/calc/calc-graph.el index 3dedbbc..6357c97 100644 --- a/lisp/calc/calc-graph.el +++ b/lisp/calc/calc-graph.el @@ -908,9 +908,9 @@ (defun calc-graph-show-tty (output) "Default calc-gnuplot-plot-command for \"tty\" output mode. This is useful for tek40xx and other graphics-terminal types." - (call-process-region 1 1 shell-file-name - nil calc-gnuplot-buffer nil - "-c" (format "cat %s >/dev/tty; rm %s" output output))) + (call-process shell-file-name nil calc-gnuplot-buffer nil + shell-command-switch + (format "cat %s >/dev/tty; rm %s" output output))) (defvar calc-dumb-map nil "The keymap for the \"dumb\" terminal plot.")