commit 416adda38521c6246f77877c57843264fa4ae711 (HEAD, refs/remotes/origin/master) Author: Tino Calancha Date: Sun Nov 27 12:22:25 2016 +0900 ash, lsh avoid code duplication See discussion in: https://lists.gnu.org/archive/html/emacs-devel/2016-11/msg00469.html * src/data.c (ash_lsh_impl): New function. (ash, lsh): Use it. diff --git a/src/data.c b/src/data.c index d221db4..61b5da8 100644 --- a/src/data.c +++ b/src/data.c @@ -2924,11 +2924,8 @@ usage: (logxor &rest INTS-OR-MARKERS) */) return arith_driver (Alogxor, nargs, args); } -DEFUN ("ash", Fash, Sash, 2, 2, 0, - doc: /* Return VALUE with its bits shifted left by COUNT. -If COUNT is negative, shifting is actually to the right. -In this case, the sign bit is duplicated. */) - (register Lisp_Object value, Lisp_Object count) +static Lisp_Object +ash_lsh_impl (register Lisp_Object value, Lisp_Object count, bool lsh) { register Lisp_Object val; @@ -2940,32 +2937,29 @@ In this case, the sign bit is duplicated. */) else if (XINT (count) > 0) XSETINT (val, XUINT (value) << XFASTINT (count)); else if (XINT (count) <= -EMACS_INT_WIDTH) - XSETINT (val, XINT (value) < 0 ? -1 : 0); + XSETINT (val, lsh ? 0 : XINT (value) < 0 ? -1 : 0); else - XSETINT (val, XINT (value) >> -XINT (count)); + XSETINT (val, lsh ? XUINT (value) >> -XINT (count) : \ + XINT (value) >> -XINT (count)); return val; } +DEFUN ("ash", Fash, Sash, 2, 2, 0, + doc: /* Return VALUE with its bits shifted left by COUNT. +If COUNT is negative, shifting is actually to the right. +In this case, the sign bit is duplicated. */) + (register Lisp_Object value, Lisp_Object count) +{ + return ash_lsh_impl (value, count, false); +} + DEFUN ("lsh", Flsh, Slsh, 2, 2, 0, doc: /* Return VALUE with its bits shifted left by COUNT. If COUNT is negative, shifting is actually to the right. In this case, zeros are shifted in on the left. */) (register Lisp_Object value, Lisp_Object count) { - register Lisp_Object val; - - CHECK_NUMBER (value); - CHECK_NUMBER (count); - - if (XINT (count) >= EMACS_INT_WIDTH) - XSETINT (val, 0); - else if (XINT (count) > 0) - XSETINT (val, XUINT (value) << XFASTINT (count)); - else if (XINT (count) <= -EMACS_INT_WIDTH) - XSETINT (val, 0); - else - XSETINT (val, XUINT (value) >> -XINT (count)); - return val; + return ash_lsh_impl (value, count, true); } DEFUN ("1+", Fadd1, Sadd1, 1, 1, 0, commit 4478cf0ac80b774075c0473d9d4625d1f2918998 Author: Simen Heggestøyl Date: Tue Nov 15 20:54:55 2016 +0100 Add will change module to CSS property list * lisp/textmodes/css-mode.el (css-property-alist) (css-value-class-alist): Add new property and value class from CSS Will Change Module. diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 53b3fa5..9e36a88 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -429,6 +429,10 @@ ("transition-property" "none" single-transition-property "all") ("transition-timing-function" single-transition-timing-function) + ;; CSS Will Change Module Level 1 + ;; (https://www.w3.org/TR/css-will-change-1/#property-index) + ("will-change" "auto" animateable-feature) + ;; Filter Effects Module Level 1 ;; (http://www.w3.org/TR/filter-effects/#property-index) ("color-interpolation-filters" "auto" "sRGB" "linearRGB") @@ -456,6 +460,7 @@ further value candidates, since that list would be infinite.") "xx-large") (alphavalue number) (angle "calc()") + (animateable-feature "scroll-position" "contents" custom-ident) (attachment "scroll" "fixed" "local") (bg-image image "none") (bg-layer bg-image position repeat-style attachment box) @@ -581,8 +586,9 @@ a class of values, and that symbols in the CDRs always refer to other entries in this list, not to properties. The following classes have been left out above because they -cannot be completed sensibly: `element-reference', `id', -`identifier', `percentage', and `string'.") +cannot be completed sensibly: `custom-ident', +`element-reference', `id', `identifier', `percentage', and +`string'.") (defcustom css-electric-keys '(?\} ?\;) ;; '() "Self inserting keys which should trigger re-indentation."