]> git.eshelyaron.com Git - emacs.git/commit
Support completion of classes and IDs in CSS mode
authorSimen Heggestøyl <simenheg@gmail.com>
Sat, 24 Sep 2016 11:55:36 +0000 (13:55 +0200)
committerSimen Heggestøyl <simenheg@gmail.com>
Sat, 24 Sep 2016 11:55:36 +0000 (13:55 +0200)
commit6ddcb0f10fb2b3c6c6a31733b28f7fbb30637ac2
tree0090d6f3b5b0a1d94d19d103d59c664886469144
parent05ed68a25d3c81cc20314c42a43aeb23d6c2d8f1
Support completion of classes and IDs in CSS mode

* lisp/textmodes/css-mode.el (css-class-list-function): New variable
holding the function to call for retrieving completions of class
names.
(css-id-list-function): New variable holding the function to call for
retrieving completions of IDs.
(css--foreign-completions): New function for retrieving completions
from other buffers.
(css--complete-selector): Support completing HTML class names and IDs
from other buffers in addition to completing HTML tags.

* lisp/textmodes/sgml-mode.el (html--buffer-classes-cache): New
variable holding a cache for `html-current-buffer-classes'.
(html--buffer-ids-cache): New variable holding a cache for
`html-current-buffer-ids'.
(html-current-buffer-classes): New function returning a list of class
names used in the current buffer.
(html-current-buffer-ids): New function returning a list of IDs used
in the current buffer.
(html-mode): Set `css-class-list-function' and `css-id-list-function'
to `html-current-buffer-classes' and `html-current-buffer-ids'
respectively.
etc/NEWS
lisp/textmodes/css-mode.el
lisp/textmodes/sgml-mode.el