comparison lisp/textmodes/sgml-mode.el @ 105737:2009126d46e1

(sgml-looking-back-at): Move definition before use.
author Glenn Morris <rgm@gnu.org>
date Sat, 24 Oct 2009 03:45:50 +0000
parents 6a6fcf3e8e4d
children 18698b6aca31
comparison
equal deleted inserted replaced
105736:4d7a7b574da2 105737:2009126d46e1
871 (setq return nil))) 871 (setq return nil)))
872 (forward-list 1)) 872 (forward-list 1))
873 (setq arg (1- arg))) 873 (setq arg (1- arg)))
874 return))) 874 return)))
875 875
876 (defsubst sgml-looking-back-at (str)
877 "Return t if the test before point matches STR."
878 (let ((start (- (point) (length str))))
879 (and (>= start (point-min))
880 (equal str (buffer-substring-no-properties start (point))))))
881
876 (defun sgml-delete-tag (arg) 882 (defun sgml-delete-tag (arg)
877 ;; FIXME: Should be called sgml-kill-tag or should not touch the kill-ring. 883 ;; FIXME: Should be called sgml-kill-tag or should not touch the kill-ring.
878 "Delete tag on or after cursor, and matching closing or opening tag. 884 "Delete tag on or after cursor, and matching closing or opening tag.
879 With prefix argument ARG, repeat this ARG times." 885 With prefix argument ARG, repeat this ARG times."
880 (interactive "p") 886 (interactive "p")
1156 1162
1157 (defsubst sgml-parse-tag-name () 1163 (defsubst sgml-parse-tag-name ()
1158 "Skip past a tag-name, and return the name." 1164 "Skip past a tag-name, and return the name."
1159 (buffer-substring-no-properties 1165 (buffer-substring-no-properties
1160 (point) (progn (skip-syntax-forward "w_") (point)))) 1166 (point) (progn (skip-syntax-forward "w_") (point))))
1161
1162 (defsubst sgml-looking-back-at (str)
1163 "Return t if the test before point matches STR."
1164 (let ((start (- (point) (length str))))
1165 (and (>= start (point-min))
1166 (equal str (buffer-substring-no-properties start (point))))))
1167 1167
1168 (defun sgml-tag-text-p (start end) 1168 (defun sgml-tag-text-p (start end)
1169 "Return non-nil if text between START and END is a tag. 1169 "Return non-nil if text between START and END is a tag.
1170 Checks among other things that the tag does not contain spurious 1170 Checks among other things that the tag does not contain spurious
1171 unquoted < or > chars inside, which would indicate that it 1171 unquoted < or > chars inside, which would indicate that it