aboutsummaryrefslogtreecommitdiff
path: root/generic/pg-xhtml.el
diff options
context:
space:
mode:
authorDavid Aspinall2008-01-30 00:28:02 +0000
committerDavid Aspinall2008-01-30 00:28:02 +0000
commitf8ebacbde74e679b1690acad8ece31c8f964a443 (patch)
tree275afe78e2d07be66bbe38c2e7a71772b048dc50 /generic/pg-xhtml.el
parent322f2c2bb8402f36347ce2c7564d2db496f3d670 (diff)
Deleted file
Diffstat (limited to 'generic/pg-xhtml.el')
-rw-r--r--generic/pg-xhtml.el104
1 files changed, 0 insertions, 104 deletions
diff --git a/generic/pg-xhtml.el b/generic/pg-xhtml.el
deleted file mode 100644
index da4eb157..00000000
--- a/generic/pg-xhtml.el
+++ /dev/null
@@ -1,104 +0,0 @@
-;; pg-xhtml.el --- XHTML goal display for Proof General
-;;
-;; Copyright (C) 2002 LFCS Edinburgh.
-;; Author: David Aspinall <David.Aspinall@ed.ac.uk>
-;; License: GPL (GNU GENERAL PUBLIC LICENSE)
-;;
-;; $Id$
-;;
-;; NB: THIS FILE NOT YET USED: once required by PG,
-;; must be added to main dist by editing Makefile.devel
-
-
-;;; Commentary:
-;;
-
-;;; Code:
-
-(require 'cl)
-(require 'pg-xml)
-
-;;
-;; Names for temporary files
-;;
-(defvar pg-xhtml-dir nil
- "Default value for XHTML directory.")
-
-(defun pg-xhtml-dir ()
- "Temporary directory for storing XHTML files."
- (or pg-xhtml-dir
- (setq pg-xhtml-dir
- (concat (if proof-running-on-win32
- "c:\\windows\\temp\\" ;; temp dir from env?
- (or (concat (getenv "TMP") "/") "/tmp/"))
- "pg"
- (getenv "USER")
- (int-to-string (emacs-pid))
- "/"))))
-
-(defvar pg-xhtml-file-count 0
- "Counter for generating XHTML files.")
-
-(defun pg-xhtml-next-file ()
- "Return new file name for XHTML storage."
- (concat
- (pg-xhtml-dir)
- (int-to-string (incf pg-xhtml-file-count))
- (if proof-running-on-win32 ".htm" ".html")))
-
-
-;;
-;; Writing an XHMTL file
-;;
-
-(defvar pg-xhtml-header
- "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN
-http://www.w3.org/TR/xhtml11/DTD/xhtml11-strict.dtd\">\n
-<!-- This file was automatically generated by Proof General -->\n\n"
- "Header for XHTML files.")
-
-(defmacro pg-xhtml-write-tempfile (&rest body)
- "Write a new temporary XHTML file, returning its location.
-BODY should contain a sequence of pg-xml writing commands."
- (let ((dir (pg-xhtml-dir))
- (file (pg-xhtml-next-file)))
- ;;
- (or (eq (car-safe (file-attributes dir)) 't)
- (if (not (file-attributes dir))
- (make-directory (pg-xhtml-dir) t)
- (error "Cannot open temp dir %s (in pg-xhtml-write-tempfile)"
- (pg-xhtml-dir))))
- `(with-temp-file ,file
- (pg-xml-begin-write t)
- (pg-xml-add-text pg-xhtml-header)
- ,@body
- (insert (pg-xml-doc))
- ,file)))
-
-(defun pg-xhtml-cleanup-tempdir ()
- "Cleanup temporary directory used for XHTML files."
- (delete-directory (pg-xhtml-dir)))
-
-(defvar pg-mozilla-prog-name
- "/usr/bin/mozilla"
- "Command name of browser to use with XHTML display.")
-
-(defun pg-xhtml-display-file-mozilla (file)
- "Display FILE in netscape/mozilla."
- (shell-command (concat pg-mozilla-prog-name
- " -remote \"openURL(" file ")\"")))
-
-(defalias 'pg-xhtml-display-file 'pg-xhtml-display-file-mozilla)
-
-; Test doc
-;(pg-xhtml-display-file-mozilla
-;(pg-xhtml-write-tempfile
-; (pg-xml-openelt 'root)
-; (pg-xml-openelt 'a '((class . "1B")))
-; (pg-xml-writetext "text a")
-; (pg-xml-closeelt)
-; (pg-xml-closeelt)))
-
-
-(provide 'pg-xhtml)
-;;; pg-xhtml.el ends here