Commit graph

271 commits

Author SHA1 Message Date
Stefan Monnier
3fb819e538 (sgml-lexical-context): Return (text . START)
instead of nil when point is outside of any tag.
(sgml-beginning-of-tag): Adjust to the change.
(sgml-calculate-indent): Use the new info returned by
sgml-lexical-context.  Try to handle unclosed tags.
2002-03-29 22:20:15 +00:00
Stefan Monnier
5f3d924def (sgml-basic-offset): New var.
(sgml-name-re, sgml-attrs-re): New consts.
(sgml-tag-name-re, sgml-start-tag-regex, sgml-font-lock-keywords-1)
(sgml-mode): Use them.
(sgml-lexical-context): Default to (point-min) if nothing else works.
(sgml-calculate-indent): Indent slightly differently.
(sgml-indent-line): Use back-to-indentation.
(sgml-parse-dtd): New function.
(sgml-unclosed-tags): New var.
(html-mode): Set it.
2002-03-29 19:38:22 +00:00
Stefan Monnier
1c1d2eb667 (sgml-make-syntax-table): New fun.
(sgml-mode-syntax-table): Use it.
(sgml-tag-syntax-table, sgml-tag-name-re): New const.
(sgml-tags-invisible): Use it.
(sgml-lexical-context): New fun.
(sgml-maybe-end-tag, sgml-beginning-of-tag): Use it.
(sgml-quote): Accept \n as entity reference terminator.
(sgml-calculate-indent, sgml-indent-line): New funs.
2002-03-28 16:06:38 +00:00
Stefan Monnier
a3ec4ba0ff (sgml-xml-mode): Renamed from sgml-xml.
(sgml-xml-guess): Simplify.
(sgml-mode-common): Remove (move into sgml-mode).
(sgml-mode): Add code from sgml-mode-common.
Remove redundant setting of indent-line-function.
Don't set skeleton-transformation when in XML mode.
2002-03-17 23:55:15 +00:00
Stefan Monnier
0fda8eff1e Change maintainer to FSF.
(sgml-start-tag-regex, sgml-font-lock-keywords-1, sgml-mode-common)
(sgml-tags-invisible, sgml-beginning-of-tag):
Allow _ : and non-ASCII in tag names, as required for XML.
(sgml-name-char): Don't assume anything about charsets handled by encode-char.
2002-03-04 02:14:31 +00:00
Kenichi Handa
f5027deb92 (sgml-mode-map): Use encode-char instead
of make-char.
(sgml-char-names-table): Iteration limit fixed.
2002-03-01 02:29:13 +00:00
Pavel Janík
140d71ba78 (sgml-specials, sgml-quick-keys): Doc fixes. 2002-02-28 16:14:50 +00:00
Richard M. Stallman
bca8616b09 (sgml-xml-guess): Fix regexp to avoid ambiguous nested loops. 2001-11-01 19:35:05 +00:00
Stefan Monnier
b2e8c203e4 (sgml-tags-invisible): Typo. 2001-10-28 04:12:46 +00:00
Stefan Monnier
73d25e5276 (sgml-empty-tags): New var.
(sgml-tag): Use it.  Cleanup with `cond'.
(sgml-tags-invisible): Make sgml-tags-invisible buffer-local.
Mark the overlays and only delete those that are marked.
(sgml-skip-close-p): Remove.
(sgml-value): Replace sgml-skip-close-p with its definition.
(html-tag-alist): Use sgml-xml a bit more.
(html-mode): Set sgml-empty-tags.
2001-10-28 04:10:40 +00:00
Sam Steingold
c77c3a7302 renamed html-xhtml' to sgml-xml' and generalized accordingly 2001-10-27 16:07:35 +00:00
Sam Steingold
e5d1dee911 (html-mode); set mode-name' based on html-xhtml' 2001-10-26 20:55:36 +00:00
Sam Steingold
58203d918e (html-mode): Set `html-xhtml' from the DOCTYPE.
(html-tag-alist): Use `html-xhtml' for "li", "dt" and "dd".
(sgml-tag): Close empty tags in XHTML.
2001-10-26 20:29:10 +00:00
Sam Steingold
5950e02941 some code simplifications: when instead of if+progn;
line-beginning-position instead of progn+bol+point
2001-10-26 17:40:59 +00:00
Stefan Monnier
6436765542 (sgml-font-lock-keywords-1): Ignore comments.
(sgml-font-lock-keywords-2): Use `eval'.  Moved from sgml-mode-common.
(sgml-font-lock-syntactic-keywords): New var.
(sgml-mode-common): Drop the two args.
Don't make buffer-local variables that aren't used.
Don't set sgml-font-lock-keywords-2 now that it uses `eval instead.
Don't set `before-string' props from sgml-display-text.
(sgml-mode): Use define-derived-mode.
(sgml-tags-invisible): Use sgml-display-text.
(sgml-quote): New command.
(html-tag-alist): Add args for `span'.
(html-mode): Use define-derived-mode.
Set sgml-display-text and sgml-tag-face-alist.
2001-10-25 22:25:30 +00:00
Eli Zaretskii
2840d65358 (sgml-mode-map): Bind 8-bit codes above 127 to sgml-maybe-name-self.
(sgml-name-8bit-mode): Doc fix.
(sgml-char-names-table): New variable.
(sgml-name-char): Support non-ASCII and mule-unicode-* characters.  Doc fix.
(sgml-maybe-name-self): Convert unibyte characters to multibyte.
2001-10-22 09:45:39 +00:00
Sam Steingold
b4f05c3831 added `html-xhtml' for XHTML input 2001-10-05 16:21:14 +00:00
Pavel Janík
6a05d05faf Fixes to follow coding conventions. 2001-07-16 11:39:42 +00:00
Stefan Monnier
f7ac3e2885 (sgml-mode-map): Fix thinko. 2001-06-18 19:04:09 +00:00
Stefan Monnier
e1940c83b4 Move `provide' to the end. Update copyright.
(sgml-mode-map): Use `make-keymap' rather than make the keymap by hand.
Bind the latin-1 charset-char to sgml-maybe-name-self rather than
incorrectly binding chars between 128 and 256 to it.
(sgml-maybe-name-self): Handle latin-1 chars properly.
(sgml-tags-invisible): Bind buffer-file-name to nil.
Use unwind-protect and restore-buffer-modified-p.
(sgml-point-entered): Use buffer-substring-no-properties.
(html-tag-alist): Add `div' and `span' and fix backquote/unquote typos.
(html-mode): Don't force `imenu-sort-function'.
2001-06-17 09:01:23 +00:00
Stefan Monnier
5f5c9e7924 Add unknown maintainer.
(sgml-tag): Pass `str' explicitly through skeleton-transformation.
(html-mode-map): Use set-keymap-parent.
2001-04-06 16:24:42 +00:00
Stefan Monnier
4afa094d3a (sgml-mode-common): Correct value of
comment-start-skip and set comment-end-skip as well.
(sgml-comment-indent): Fix for new value of comment-start-skip.
(html-autoview-mode): Don't bother using make-local-hook.
2001-03-07 00:03:50 +00:00
Gerd Moellmann
fba5d1de83 (sgml-mode-common): Remove `$' from regexp for paragraph-start. 2000-02-12 19:45:53 +00:00
Gerd Moellmann
e79ad8a15d * textmodes/sgml-mode.el (sgml-char-names): Change "half" to
"frac12".
1999-10-30 21:06:34 +00:00
Dave Love
d4c89075d6 Require outline when compiling.
(sgml-mode-hook, html-mode-hook): Customize.
(sgml-validate-command): Fix :version.
(html-autoview-mode): Doc fix.
1999-08-04 19:18:55 +00:00
Dave Love
5121371d70 (sgml-validate-command): Use nsgmls. 1999-07-23 23:05:21 +00:00
Dave Love
b8b149715f (html-mode): Use sentence-end-double-space when setting sentence-end. 1999-03-09 19:24:33 +00:00
Richard M. Stallman
5e532c5c1f (html-tag-alist): Add /head and /body to the "html" template. 1999-02-26 16:40:13 +00:00
Richard M. Stallman
b7cd1746e2 (sgml-validate): Ask whether to save only
if buffer is modified; ask about all modified buffers.
1998-12-31 14:40:03 +00:00
Karl Heuer
3e9103768f Update comment. 1998-12-14 03:22:44 +00:00
Dave Love
b0a377e6bd Require skeleton when compiling.
(sgml-font-lock-keywords-1): Accept single-letter tags.
(v2): Defvar free variable.
1998-11-16 17:50:28 +00:00
Andreas Schwab
7be38f7dba (html-mode): Doc fix.
(sgml-name-8bit-mode): Fix missing format character in message
string.
1998-11-06 09:31:52 +00:00
Richard M. Stallman
a01588fc82 (sgml-mode): Call kill-local-variables
here directly, then set major-mode, then call sgml-mode-common.
Run the hooks here at the end.
(html-mode): Likewise.
(sgml-mode-common): Don't call kill-local-variables; don't run hooks.
1998-07-19 00:04:01 +00:00
Richard M. Stallman
3bf0b72768 (html-imenu-regexp): New defvar.
(html-imenu-index): New function.
(html-mode): Set up local vars to use html-imenu-index.
Don't sort the menu.
1998-06-27 19:46:22 +00:00
Dave Love
4fa91cfecc (sgml-font-lock-keywords-1): Add -. as
NMCHARs.  Elide upper case (see font-lock-defaults).  Generalize
comment declaration not to exclude markup.
1998-06-01 16:51:52 +00:00
Richard M. Stallman
32fbd2a380 (sgml-font-lock-keywords-1): Accept upper case like lower case. 1998-05-25 03:28:06 +00:00
Richard M. Stallman
9e832d815b (sgml-mode-common): Make local binding from adaptive-fill-regexp. 1998-05-07 04:51:41 +00:00
Richard M. Stallman
c6a635346e (sgml-font-lock-keywords-1): Copy initialization from sgml-font-lock-keywords.
(sgml-font-lock-keywords): Initialize from sgml-font-lock-keywords-1.
(sgml-font-lock-keywords-2): New variable.
(sgml-mode-common): Make buffer-local binding for
sgml-font-lock-keywords-2 and initialize it.
Use it in font-lock-defaults.
1998-04-27 01:22:08 +00:00
Dave Love
aa7a8f0ee8 (sgml-mode-common): Downcase key for
assoc so upper-case markup works.
(sgml-attributes, sgml-tag-help): Likewise.
1998-02-17 20:08:22 +00:00
Karl Heuer
ec79b93a14 (sgml-mode): Set imenu-generic-expression. 1997-12-04 04:20:34 +00:00
Richard M. Stallman
6c455d5c0e (sgml-mode-common): Set paragraph-start like paragraph-separate.
Do match a line which is just a <...> construct after whitespac.e
Set adaptive-fill-regexp to match whitespace only.
1997-08-23 06:12:46 +00:00
Richard M. Stallman
f788776c22 Many doc fixes. 1997-04-24 19:37:13 +00:00
Richard M. Stallman
d10447bad9 (sgml-value): Use 'identity as default value.
(sgml-mode): Doc fix.
(sgml-name-8bit-mode): Tell the user if set or reset.
(sgml-tag): Doc fix.
(sgml-tag): Protect "&lt;" from skeleton-transformation.
(sgml-attributes): Doc fix.
(sgml-attributes): Square brackets removed from prompt.
(sgml-attributes): Arg ALIST renamed to TAG.
(sgml-attributes): Apply skeleton-transformation when necessary.
(sgml-value): Doc added.
(sgml-value): Square brackets removed from prompt.
(html-tag-alist): New variable 1-7, variable `list' changed.
(html-tag-alist)<dir>, <menu>: Use new value of `list'.
(html-tag-alist)<font>: Fixed (doc of sgml-tag-alist needs fixing).
(html-tag-alist)<ol>, <ul>: Fixed.
(html-tag-alist)<fn>: Commented out.
1997-04-23 18:58:33 +00:00
Richard M. Stallman
c60e7b0d7c (sgml-transformation): Fix previous change. 1997-04-22 04:32:00 +00:00
Richard M. Stallman
9b0ffdac4b (sgml-name-char): Ask user with a prompt. 1997-04-17 21:22:21 +00:00
Richard M. Stallman
a391b17964 (sgml-value): Don't perform the skeleton-transformation
on the value.

(sgml-transformation): New variable.
(sgml-mode-common): Use it.
(html-href-anchor): Ask for address, wrap around text.
(html-name-anchor): Same as above, without initial input.
(html-image): No initial input for address.
(html-ordered-list): Incorporate char into string.
(html-unordered-list): Same as above.
(html-checkboxes, html-radio-buttons): Rewritten.

(sgml-char-names): Change ensp to nbsp.

(sgml-tag): Use intangible here.
(sgml-tags-invisible): Don't add intangible property
separately here.  Just the category property is enough.
Eliminate local variable `point'.
Bind inhibit-point-motion-hooks.
1997-04-16 21:43:01 +00:00
Richard M. Stallman
6811a757a5 (sgml-mode-facemenu-add-face-function): New function.
(sgml-mode-common): Use that function for the hook value.
1997-04-13 06:11:35 +00:00
Richard M. Stallman
64ae0c233e Add defgroup; use defcustom for user vars. 1997-04-13 05:07:27 +00:00
Richard M. Stallman
0afdd8d041 (sgml-validate): Offer to save the buffer first. 1997-04-05 21:52:58 +00:00
Richard M. Stallman
da84bdc4d5 (html-mode): Locally set sentence-end. 1997-01-21 09:27:59 +00:00