mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Don't let `css--property-values' return duplicates
* lisp/textmodes/css-mode.el (css--property-values): Don't return duplicate values. * test/lisp/textmodes/css-mode-tests.el (css-test-property-values): Take the above into account. (css-test-property-values-no-duplicates): Test that duplicates aren't returned by `css--property-values'.
This commit is contained in:
parent
12846626bf
commit
e6d6a99455
2 changed files with 22 additions and 11 deletions
|
|
@ -793,13 +793,14 @@ Completion candidates are looked up in `css-property-alist' by
|
|||
the string PROPERTY."
|
||||
(or (gethash property css--property-value-cache)
|
||||
(let ((values
|
||||
(seq-mapcat
|
||||
(lambda (value)
|
||||
(if (stringp value)
|
||||
(list value)
|
||||
(or (css--value-class-lookup value)
|
||||
(css--property-values (symbol-name value)))))
|
||||
(cdr (assoc property css-property-alist)))))
|
||||
(seq-uniq
|
||||
(seq-mapcat
|
||||
(lambda (value)
|
||||
(if (stringp value)
|
||||
(list value)
|
||||
(or (css--value-class-lookup value)
|
||||
(css--property-values (symbol-name value)))))
|
||||
(cdr (assoc property css-property-alist))))))
|
||||
(puthash property values css--property-value-cache))))
|
||||
|
||||
(defun css--complete-property-value ()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue