Add Imenu support to CSS mode and its derivatives
* lisp/textmodes/css-mode.el (css--join-nested-selectors) (css--prev-index-position, css--extract-index-name): New helper functions for supporting Imenu. (css-mode): Set `imenu-space-replacement', `imenu-prev-index-position-function', and `imenu-extract-index-name-function'. (css-current-defun-name): Reuse `css--prev-index-position' and `css--extract-index-name' to support nested selectors. * test/lisp/textmodes/css-mode-tests.el (css-test-current-defun-name): Fix character index. (css-test-join-nested-selectors): New tests for `css--join-nested-selectors'. * etc/NEWS: Add news entry.
Showing with 76 additions and 8 deletions