Fix compiler warning due to missing function prototype.
[svn.git] / doc / tools / svnbook.el
blob8569947da65ba579eab2ab8639d7fd18345dbc21
1 ;;;; Emacs Lisp help for writing Subversion books. ;;;;
3 (if (not (boundp 'visited-svnbook-el))
4 (progn
5 (autoload 'xml-mode "psgml" "Major mode to edit XML files." t)))
6 (setq visited-svnbook-el t)
8 (xml-mode)
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)
13 ;; gives us.
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
22 ;; )))
24 (defun sgml-emdash ()
25 "Insert ISO entity reference for em dash."
26 (interactive)
27 (insert "—"))
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."
34 (interactive "r")
35 (save-excursion
36 (let ((em (copy-marker e)))
37 (goto-char b)
38 (while (search-forward "<" em t)
39 (replace-match "&lt;" nil t))
40 (goto-char b)
41 (while (search-forward ">" em t)
42 (replace-match "&gt;" nil t))
43 )))
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
53 sgml-set-face t
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")