[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el
From: |
Mike Williams |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el |
Date: |
Tue, 09 Apr 2002 08:02:20 -0400 |
Index: emacs/lisp/textmodes/sgml-mode.el
diff -c emacs/lisp/textmodes/sgml-mode.el:1.79
emacs/lisp/textmodes/sgml-mode.el:1.80
*** emacs/lisp/textmodes/sgml-mode.el:1.79 Mon Apr 8 17:32:05 2002
--- emacs/lisp/textmodes/sgml-mode.el Tue Apr 9 08:02:20 2002
***************
*** 84,90 ****
"Use <, >, &, /, SPC and `sgml-specials' keys \"electrically\" when non-nil.
This takes effect when first loading the `sgml-mode' library.")
-
(defvar sgml-mode-map
(let ((map (make-keymap)) ;`sparse' doesn't allow binding to charsets.
(menu-map (make-sparse-keymap "SGML")))
--- 84,89 ----
***************
*** 138,144 ****
map)
"Keymap for SGML mode. See also `sgml-specials'.")
-
(defun sgml-make-syntax-table (specials)
(let ((table (make-syntax-table text-mode-syntax-table)))
(modify-syntax-entry ?< "(>" table)
--- 137,142 ----
***************
*** 164,170 ****
table)
"Syntax table used to parse SGML tags.")
-
(defcustom sgml-name-8bit-mode nil
"*When non-nil, insert non-ASCII characters as named entities."
:type 'boolean
--- 162,167 ----
***************
*** 219,225 ****
"A table for mapping non-ASCII characters into SGML entity names.
Currently, only Latin-1 characters are supported.")
-
;; nsgmls is a free SGML parser in the SP suite available from
;; ftp.jclark.com and otherwise packaged for GNU systems.
;; Its error messages can be parsed by next-error.
--- 216,221 ----
***************
*** 236,242 ****
(defvar sgml-saved-validate-command nil
"The command last used to validate in this buffer.")
-
;; I doubt that null end tags are used much for large elements,
;; so use a small distance here.
(defcustom sgml-slash-distance 1000
--- 232,237 ----
***************
*** 292,305 ****
When `font-lock-maximum-decoration' is 1 this is always used for fontifying.
When more these are fontified together with `sgml-font-lock-keywords'.")
-
(defvar sgml-display-text ()
"Tag names as lowercase symbols, and display string when invisible.")
;; internal
(defvar sgml-tags-invisible nil)
-
(defcustom sgml-tag-alist
'(("![" ("ignore" t) ("include" t))
("!attlist")
--- 287,298 ----
***************
*** 312,319 ****
((\"tag\" . TAGRULE)
...)
! TAGRULE is a list of optionally `t' (no endtag) or `\\n' (separate endtag by
! newlines) or a skeleton with `nil', `t' or `\\n' in place of the interactor
followed by an ATTRIBUTERULE (for an always present attribute) or an
attribute alist.
--- 305,312 ----
((\"tag\" . TAGRULE)
...)
! TAGRULE is a list of optionally t (no endtag) or `\\n' (separate endtag by
! newlines) or a skeleton with nil, t or `\\n' in place of the interactor
followed by an ATTRIBUTERULE (for an always present attribute) or an
attribute alist.
***************
*** 322,328 ****
((\"attribute\" . ATTRIBUTERULE)
...)
! ATTRIBUTERULE is a list of optionally `t' (no value when no input) followed by
an optional alist of possible values."
:type '(repeat (cons (string :tag "Tag Name")
(repeat :tag "Tag Rule" sexp)))
--- 315,321 ----
((\"attribute\" . ATTRIBUTERULE)
...)
! ATTRIBUTERULE is a list of optionally t (no value when no input) followed by
an optional alist of possible values."
:type '(repeat (cons (string :tag "Tag Name")
(repeat :tag "Tag Rule" sexp)))
***************
*** 388,394 ****
(concat "<" face ">"))
(error "Face not configured for %s mode" mode-name)))
-
;;;###autoload
(define-derived-mode sgml-mode text-mode "SGML"
"Major mode for editing SGML documents.
--- 381,386 ----
***************
*** 454,465 ****
(concat "<!\\(element\\|entity\\)[ \t\n]+%?[ \t\n]*\\("
sgml-name-re "\\)")))
-
(defun sgml-comment-indent ()
(if (looking-at "--") comment-column 0))
-
-
(defun sgml-slash (arg)
"Insert ARG slash characters.
Behaves electrically if `sgml-quick-keys' is non-nil."
--- 446,454 ----
***************
*** 516,522 ****
(buffer-substring (line-beginning-position)
(1+ blinkpos)))))))))
-
;; Why doesn't this use the iso-cvt table or, preferably, generate the
;; inverse of the extensive table in the SGML Quail input method? -- fx
;; I guess that's moot since it only works with Latin-1 anyhow.
--- 505,510 ----
***************
*** 666,672 ****
(or (> (point) point)
(self-insert-command 1)))))
-
(defun sgml-tag-help (&optional tag)
"Display description of tag TAG. If TAG is omitted, use the tag at point."
(interactive)
--- 654,659 ----
***************
*** 684,690 ****
(cdr (assoc (downcase (substring tag 1)) sgml-tag-help)))
"No description available")))
-
(defun sgml-maybe-end-tag (&optional arg)
"Name self unless in position to end a tag or a prefix ARG is given."
(interactive "P")
--- 671,676 ----
***************
*** 781,786 ****
--- 767,773 ----
(goto-char open)
(kill-sexp 1)))
(setq arg (1- arg))))
+
;; Put read-only last to enable setting this even when read-only enabled.
(or (get 'sgml-tag 'invisible)
***************
*** 849,854 ****
--- 836,842 ----
(eq (preceding-char) ?>)))
(backward-list)
(forward-list)))))))
+
(autoload 'compile-internal "compile")
***************
*** 870,876 ****
(save-some-buffers (not compilation-ask-about-save) nil)
(compile-internal command "No more errors"))
-
(defun sgml-lexical-context (&optional limit)
"Return the lexical context at point as (TYPE . START).
START is the location of the start of the lexical element.
--- 858,863 ----
***************
*** 960,966 ****
(replace-match (cdr (assq (char-before) '((?& . "&")
(?< . "<")
(?> . ">"))))))))
-
(defsubst sgml-at-indentation-p ()
"Return true if point is at the first non-whitespace character on the line."
--- 947,952 ----
***************
*** 1330,1336 ****
map)
"Keymap for commands for use in HTML mode.")
-
(defvar html-face-tag-alist
'((bold . "b")
(italic . "i")
--- 1316,1321 ----
***************
*** 1361,1374 ****
("var" . italic))
"Value of `sgml-tag-face-alist' for HTML mode.")
-
(defvar html-display-text
'((img . "[/]")
(hr . "----------")
(li . "o "))
"Value of `sgml-display-text' for HTML mode.")
-
;; should code exactly HTML 3 here when that is finished
(defvar html-tag-alist
(let* ((1-7 '(("1") ("2") ("3") ("4") ("5") ("6") ("7")))
--- 1346,1358 ----
("var" . italic))
"Value of `sgml-tag-face-alist' for HTML mode.")
(defvar html-display-text
'((img . "[/]")
(hr . "----------")
(li . "o "))
"Value of `sgml-display-text' for HTML mode.")
+
;; should code exactly HTML 3 here when that is finished
(defvar html-tag-alist
(let* ((1-7 '(("1") ("2") ("3") ("4") ("5") ("6") ("7")))
***************
*** 1607,1612 ****
--- 1591,1597 ----
("var" . "Math variable face")
("wbr" . "Enable <br> within <nobr>"))
"*Value of `sgml-tag-help' for HTML mode.")
+
;;;###autoload
(define-derived-mode html-mode sgml-mode "HTML"
***************
*** 1680,1686 ****
;; (make-local-variable 'imenu-sort-function)
;; (setq imenu-sort-function nil) ; sorting the menu defeats the purpose
)
!
(defvar html-imenu-regexp
"\\s-*<h\\([1-9]\\)[^\n<>]*>\\(<[^\n<>]*>\\)*\\s-*\\([^\n<>]*\\)"
"*A regular expression matching a head line to be added to the menu.
--- 1665,1671 ----
;; (make-local-variable 'imenu-sort-function)
;; (setq imenu-sort-function nil) ; sorting the menu defeats the purpose
)
!
(defvar html-imenu-regexp
"\\s-*<h\\([1-9]\\)[^\n<>]*>\\(<[^\n<>]*>\\)*\\s-*\\([^\n<>]*\\)"
"*A regular expression matching a head line to be added to the menu.
***************
*** 1716,1721 ****
--- 1701,1707 ----
(add-hook 'after-save-hook 'browse-url-of-buffer nil t))
(message "Autoviewing turned %s."
(if arg "off" "on")))
+
(define-skeleton html-href-anchor
"HTML anchor tag with href attribute."
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/01
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/01
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Stefan Monnier, 2002/04/01
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/02
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/02
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/03
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/03
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/03
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Stefan Monnier, 2002/04/08
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el,
Mike Williams <=
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/09
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/11
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/14
- [Emacs-diffs] Changes to emacs/lisp/textmodes/sgml-mode.el, Mike Williams, 2002/04/16