Add support for reading and writing SPV files.
[pspp] / pspp-mode.el
index bc2a3d1997f1e257fbda1b10c308cbe68284a000..c12acdfbe132b07bbff78e767c091795e9a1da9d 100644 (file)
@@ -1,31 +1,29 @@
-;;; pspp-mode-el -- Major mode for editing PSPP files
+;;; pspp-mode.el --- Major mode for editing PSPP files
 
-;; Copyright (C) 2005 Free Software Foundation
-;; Author: John Darrington <john@darrington.wattle.id.au>
+;; Copyright (C) 2005,2018 Free Software Foundation
+;; Author: Scott Andrew Borton <scott@pp.htv.fi>
 ;; Created: 05 March 2005
+;; Version: 1.0
 ;; Keywords: PSPP major-mode
+;; This file is not part of GNU Emacs.
 
-
-
+;;; Commentary:
 ;; Based on the example wpdl-mode.el by Scott Borton
-;; Author: Scott Andrew Borton <scott@pp.htv.fi>
 
 ;; Copyright (C) 2000, 2003 Scott Andrew Borton <scott@pp.htv.fi>
 
-;; 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 this program; if not, write to the Free
-;; Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
-;; MA 02110-1301 USA
+;; 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 3 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 this program.  If not, see <http://www.gnu.org/licenses/>.
 
 ;;; Code:
 (defvar pspp-mode-hook nil)
@@ -35,6 +33,7 @@
     pspp-mode-map)
   "Keymap for PSPP major mode")
 
+;;;+++autoload
 (add-to-list 'auto-mode-alist '("\\.sps\\'" . pspp-mode))
 
 
 
     ;; String delimiters
       (modify-syntax-entry ?'  "\"" x-pspp-mode-syntax-table)
-      (modify-syntax-entry ?"  "\"" x-pspp-mode-syntax-table)
+      (modify-syntax-entry ?\"  "\"" x-pspp-mode-syntax-table)
       
     x-pspp-mode-syntax-table)
   
                                "PRINT FORMATS"          
                                "PRINT SPACE"            
                                "PROCEDURE OUTPUT"       
-                               "PROCESS IF"             
                                "PROXIMITIES"            
                                "Q"                      
                                "QUICK CLUSTER"          
   )
 "Highlighting expressions for PSPP mode.")
 
-
+;;;+++autoload
 (defun pspp-mode ()
   (interactive)
   (kill-all-local-variables)
   (set (make-local-variable 'font-lock-keywords-case-fold-search) t)
   (set (make-local-variable 'font-lock-defaults) '(pspp-font-lock-keywords))
 
-  ;; Register our indentation function
-
   (set (make-local-variable 'indent-line-function) 'pspp-indent-line)  
-
+  (set (make-local-variable 'comment-start ) "* ")
   (set (make-local-variable 'compile-command)
        (concat "pspp "
               buffer-file-name