]> code.delx.au - gnu-emacs/commitdiff
Complete "initial" and "unset" in CSS mode
authorSimen Heggestøyl <simenheg@gmail.com>
Wed, 6 Jul 2016 17:25:10 +0000 (19:25 +0200)
committerSimen Heggestøyl <simenheg@gmail.com>
Wed, 6 Jul 2016 17:25:10 +0000 (19:25 +0200)
* lisp/textmodes/css-mode.el (css--complete-property-value): Make
"initial" and "unset" completion candidates for all CSS properties,
just like "inherit".

* test/lisp/textmodes/css-mode-tests.el
(css-test-complete-property-value): Update test to reflect the above
change.

lisp/textmodes/css-mode.el
test/lisp/textmodes/css-mode-tests.el

index 060af3321791eece94180bdab4030c503f156584..261826e8b26edc8851f842c082c00c0631e0d256 100644 (file)
@@ -853,7 +853,8 @@ the string PROPERTY."
         (save-excursion
           (skip-chars-backward "[:graph:]")
           (list (point) end
-                (cons "inherit" (css--property-values property))))))))
+                (append '("inherit" "initial" "unset")
+                        (css--property-values property))))))))
 
 (defvar css--html-tags (mapcar #'car html-tag-alist)
   "List of HTML tags.
index fd86fd2d878916e68c234b6ec64ae1df963dfa4e..d28178759564679f0a7b333ac31aae177368e7e9 100644 (file)
     (let ((completions (css-mode-tests--completions)))
       (should
        (equal (seq-sort #'string-lessp completions)
-              '("absolute" "fixed" "inherit" "relative" "static"))))))
+              '("absolute" "fixed" "inherit" "initial" "relative"
+                "static" "unset"))))))
 
 (ert-deftest css-test-complete-pseudo-class ()
   (with-temp-buffer