aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/textmodes
diff options
context:
space:
mode:
authorStefan Monnier2016-01-16 10:43:19 -0500
committerStefan Monnier2016-01-16 10:43:19 -0500
commitd10982a91ac2b93bf9a375e00d676a25f90b885a (patch)
treef235ae7beffa4275385afedeff1dc50e0f69aeac /lisp/textmodes
parent05988c0d527de99d54266cc3ef0688899761ba26 (diff)
downloademacs-d10982a91ac2b93bf9a375e00d676a25f90b885a.tar.gz
emacs-d10982a91ac2b93bf9a375e00d676a25f90b885a.zip
Use sgml-electric-tag-pair-mode also in nxml-mode
* lisp/nxml/rng-nxml.el: Require sgml-mode. (rng-nxml-easy-menu): Add entry for sgml-electric-tag-pair-mode. (rng-complete-qname-function): Use complete-with-action. * lisp/textmodes/sgml-mode.el (sgml-electric-tag-pair-before-change-function): Let-bind forward-sexp-function, since nxml-mode binds it to something incompatible. * lisp/nxml/nxml-mode.el: Use setq-local and defvar-local.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r--lisp/textmodes/sgml-mode.el11
1 files changed, 6 insertions, 5 deletions
diff --git a/lisp/textmodes/sgml-mode.el b/lisp/textmodes/sgml-mode.el
index 98a01e8d83f..f729760e9ca 100644
--- a/lisp/textmodes/sgml-mode.el
+++ b/lisp/textmodes/sgml-mode.el
@@ -862,11 +862,12 @@ Return non-nil if we skipped over matched tags."
862 (if endp 862 (if endp
863 (when (sgml-skip-tag-backward 1) (forward-char 1) t) 863 (when (sgml-skip-tag-backward 1) (forward-char 1) t)
864 (with-syntax-table sgml-tag-syntax-table 864 (with-syntax-table sgml-tag-syntax-table
865 (up-list -1) 865 (let ((forward-sexp-function nil))
866 (when (sgml-skip-tag-forward 1) 866 (up-list -1)
867 (backward-sexp 1) 867 (when (sgml-skip-tag-forward 1)
868 (forward-char 2) 868 (backward-sexp 1)
869 t)))) 869 (forward-char 2)
870 t)))))
870 (clones (get-char-property (point) 'text-clones))) 871 (clones (get-char-property (point) 'text-clones)))
871 (when (and match 872 (when (and match
872 (/= cl-end cl-start) 873 (/= cl-end cl-start)