1 ;;;; dbide-abbrev.el --- Abbrev table definitions for docbookide
2 ;; $Id: dbide-abbrev.el,v 1.2 2000/03/29 19:12:16 nwalsh Exp $
4 ;; Copyright (C) 2000 Norman Walsh
5 ;; Based extensively on (one might go so far as to say "totally hacked
6 ;; from") Tony Graham's xslide.
8 ;; Author: Norman Walsh <ndw@nwalsh.com>
9 ;; Created: 29 March 2000
10 ;; Version: $Revision: 1.2 $
11 ;; Keywords: languages, xml, docbook
13 ;;; This file is not part of GNU Emacs.
15 ;; This program is free software; you can redistribute it and/or
16 ;; modify it under the terms of the GNU General Public License
17 ;; as published by the Free Software Foundation; either version 2
18 ;; of the License, or (at your option) any later version.
20 ;; This program is distributed in the hope that it will be useful,
21 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 ;; GNU General Public License for more details.
25 ;; You should have received a copy of the GNU General Public License
26 ;; along with this program; if not, write to the Free Software
27 ;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
34 ;; Send bugs to docbookide-bug@menteith.com
35 ;; Use `docbook-submit-bug-report' to submit a bug report
40 (defvar docbook-mode-abbrev-table nil
41 "Abbrev table used while in DOCBOOK mode.")
43 ;;; define docbook-mode-abbrev-table if not already defined
44 (if docbook-mode-abbrev-table
46 ;; remember current state of abbrevs-changed so we can restore it after
47 ;; defining some abbrevs
48 (let ((ac abbrevs-changed))
49 (define-abbrev-table 'docbook-mode-abbrev-table ())
51 ;; Generate abbrevs for DOCBOOK from
52 ;; data in docbook-all-elements-alist
54 (define-abbrev docbook-mode-abbrev-table
55 (nth 3 x) (car x) nil))
56 docbook-all-elements-alist)
58 ;; Generate abbrevs for attributes for DOCBOOK
60 (define-abbrev docbook-mode-abbrev-table
62 (concat (car x) "=\"\"")
65 docbook-attributes-alist
68 ;; restore abbrevs-changed
69 (setq abbrevs-changed ac)))
71 (provide 'dbide-abbrev)