# HG changeset patch # User Mike Williams # Date 1018065803 0 # Node ID 2177e8fca9b4e3e8f5418bcd0c3a7792def4462f # Parent 88ec9c417f0afe32d5e84698ef35d29bbb3b99ab Remove xml-lite.el diff -r 88ec9c417f0a -r 2177e8fca9b4 lisp/ChangeLog --- a/lisp/ChangeLog Sat Apr 06 03:16:10 2002 +0000 +++ b/lisp/ChangeLog Sat Apr 06 04:03:23 2002 +0000 @@ -1,3 +1,7 @@ +2002-04-06 Mike Williams + + * textmodes/xml-lite.el: Remove. + 2002-04-05 Pavel Jan,Bm(Bk * simple.el (play-sound): New function (uses play-sound-internal). diff -r 88ec9c417f0a -r 2177e8fca9b4 lisp/textmodes/xml-lite.el --- a/lisp/textmodes/xml-lite.el Sat Apr 06 03:16:10 2002 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,258 +0,0 @@ -;;; xml-lite.el --- an indentation-engine for XML - -;; Copyright (C) 2002 Free Software Foundation, Inc. - -;; Author: Mike Williams -;; Created: February 2001 -;; Keywords: xml - -;; This file is part of GNU Emacs. - -;; This program is free software; you can redistribute it and/or modify -;; it under the terms of the GNU General Public License as published by -;; the Free Software Foundation; either version 2 of the License, or -;; (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; -;; You should have received a copy of the GNU General Public License -;; along with GNU Emacs; see the file COPYING. If not, write to the -;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, -;; Boston, MA 02111-1307, USA. - -;;; Commentary: -;; -;; This package provides a simple indentation engine for XML. It is -;; intended for use in situations where the full power of the popular PSGML -;; package (DTD parsing, syntax checking) is not required. -;; -;; xml-lite is designed to be used in conjunction with the default GNU -;; Emacs sgml-mode, to provide a lightweight XML-editing environment. - -;;; Thanks: -;; -;; Jens Schmidt -;; for his feedback and suggestions - -;; PLEASE NOTE! -;; xml-lite is on it's way out, as functionality is merged into -;; sgml-mode. - -;;; Code: - -(eval-when-compile (require 'cl)) -(require 'sgml-mode) - - -;; Syntax analysis - -(defsubst xml-lite-at-indentation-p () - "Return true if point is at the first non-whitespace character on the line." - (save-excursion - (skip-chars-backward " \t") - (bolp))) - - -;; Parsing - -(defstruct (xml-lite-tag - (:constructor xml-lite-make-tag (type start end name))) - type start end name) - -(defsubst xml-lite-parse-tag-name () - "Skip past a tag-name, and return the name." - (buffer-substring-no-properties - (point) (progn (skip-syntax-forward "w_") (point)))) - -(defsubst xml-lite-looking-back-at (s) - (let ((limit (max (- (point) (length s)) (point-min)))) - (equal s (buffer-substring-no-properties limit (point))))) - -(defsubst xml-lite-looking-at (s) - (let ((limit (min (+ (point) (length s))))) - (equal s (buffer-substring-no-properties (point) limit)))) - -(defun xml-lite-parse-tag-backward () - "Parse an SGML tag backward, and return information about the tag. -Assume that parsing starts from within a textual context. -Leave point at the beginning of the tag." - (let (tag-type tag-start tag-end name) - (search-backward ">") - (setq tag-end (1+ (point))) - (cond - ((xml-lite-looking-back-at "--") ; comment - (setq tag-type 'comment - tag-start (search-backward "") - ((eq type 'cdata) "]]>") - ((eq type 'jsp) "%>") - ((eq type 'pi) "?>") - (t ">")))) - - ;; inside an element - ((eq type 'open) - (insert "") - (indent-according-to-mode)) - - (t - (error "Nothing to close"))))) - -(defun xml-lite-slash (arg) - "Insert ARG slash characters. -Behaves electrically if `xml-lite-electric-slash' is non-nil." - (interactive "p") - (cond - ((not (and (eq (char-before) ?<) (= arg 1))) - (insert-char ?/ arg)) - ((eq xml-lite-electric-slash 'indent) - (insert-char ?/ 1) - (indent-according-to-mode)) - ((eq xml-lite-electric-slash 'close) - (delete-backward-char 1) - (xml-lite-insert-end-tag)) - (t - (insert-char ?/ arg)))) - -(provide 'xml-lite) - -;;; xml-lite.el ends here