1 ;;;; Emacs Lisp help for writing Subversion books. ;;;;
3 (if (not (boundp 'visited-svnbook-el
))
5 (autoload 'xml-mode
"psgml" "Major mode to edit XML files." t
)))
6 (setq visited-svnbook-el t
)
10 ;; We need to eval the local variables (specifically
11 ;; sgml-parent-document) after setting the mode to xml-mode so that we
12 ;; can get all the xml goodness that C-c C-t (sgml-list-valid-tags)
14 (hack-local-variables)
16 ;; *lots* of great stuff here: http://www.snee.com/bob/sgmlfree/emcspsgm.html
18 ;; For possible use. -Fitz
19 ;; (add-hook 'sgml-mode-hook ; make all this stuff SGML-specific
20 ;; (function (lambda()
21 ;; ; everything in here will only apply in SGML mode
25 "Insert ISO entity reference for em dash."
29 (define-key sgml-mode-map
"\x03_" 'sgml-emdash
)
31 ;; Stole this from kfogel's .emacs, and now from my .emacs -Fitz
32 (defun svn-htmlegalize-region (b e
)
33 "Just replaces < and > for now."
36 (let ((em (copy-marker e
)))
38 (while (search-forward "<" em t
)
39 (replace-match "<" nil t
))
41 (while (search-forward ">" em t
)
42 (replace-match ">" nil t
))
46 (setq sgml-omittag-transparent t
47 sgml-trace-entity-lookup nil
48 sgml-live-element-indicator t
49 ;; sgml-declaration "declaration/xml.dcl"
50 sgml-xml-validate-command
"SP_CHARSET_FIXED=YES SP_ENCODING=XML nsgmls -wxml -mdeclaration/xml.soc -ges %s %s"
51 sgml-validate-command
"SP_CHARSET_FIXED=YES SP_ENCODING=XML nsgmls -wxml -mdeclaration/xml.soc -ges %s %s"
52 ;; NOTE: I removed the -u from sgml-validate-command to get rid of stupid errors in the DTDs. -Fitz
54 sgml-mode-hook
(quote (auto-fill-mode))
55 sgml-catalog-files
(append sgml-catalog-files
'("/usr/local/prod/sgml/dblite/catalog"))
56 sgml-auto-activate-dtd t
)
59 (message "loaded svnbook.el")