From: Simen Heggestøyl Date: Wed, 6 Jul 2016 17:25:10 +0000 (+0200) Subject: Complete "initial" and "unset" in CSS mode X-Git-Tag: emacs-26.0.90~1840^2~109 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c0a5ae906d09c976eb4c90f3f5cd98089512318b;p=emacs.git Complete "initial" and "unset" in CSS mode * 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. --- diff --git a/lisp/textmodes/css-mode.el b/lisp/textmodes/css-mode.el index 060af332179..261826e8b26 100644 --- a/lisp/textmodes/css-mode.el +++ b/lisp/textmodes/css-mode.el @@ -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. diff --git a/test/lisp/textmodes/css-mode-tests.el b/test/lisp/textmodes/css-mode-tests.el index fd86fd2d878..d2817875956 100644 --- a/test/lisp/textmodes/css-mode-tests.el +++ b/test/lisp/textmodes/css-mode-tests.el @@ -111,7 +111,8 @@ (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