From: Lars Ingebrigtsen Date: Wed, 15 Jun 2022 16:29:42 +0000 (+0200) Subject: Allow completing tags, parameters and values in html-mode X-Git-Tag: emacs-29.0.90~1447^2~1735 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1ead480ca1f49b6759bb30353ee78656490149ae;p=emacs.git Allow completing tags, parameters and values in html-mode * lisp/textmodes/sgml-mode.el (html-mode--complete-at-point): Allow completing tags, parameters and values (bug#29057). --- diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el index b49541f47d4..ff881377a7e 100644 --- a/lisp/textmodes/sgml-mode.el +++ b/lisp/textmodes/sgml-mode.el @@ -2409,6 +2409,7 @@ To work around that, do: (lambda () (char-before (match-end 0)))) (setq-local add-log-current-defun-function #'html-current-defun-name) (setq-local sentence-end-base "[.?!][]\"'”)}]*\\(<[^>]*>\\)*") + (add-hook 'completion-at-point-functions 'html-mode--complete-at-point nil t) (when (fboundp 'libxml-parse-html-region) (defvar css-class-list-function) @@ -2434,6 +2435,36 @@ To work around that, do: ;; (setq imenu-sort-function nil) ; sorting the menu defeats the purpose ) +(defun html-mode--complete-at-point () + ;; Complete a tag like