view lisp/cdl.el @ 42249:50adfc6e47b2

More sophisticated indentation of cpp directive. (antlr-indent-at-bol-alist): New user option. (antlr-indent-line): Use it. (antlr-indent-style): New user option. (antlr-mode): Use it. (antlr-indent-item-regexp): Customize. Syntax highlighting changes. (antlr-font-lock-literal-regexp): New user option. (antlr-font-lock-syntax-face): New face used for :, |, .... (antlr-font-lock-default-face): New face. (antlr-font-lock-additional-keywords): Use them. New command to insert options -- variables. (antlr-mode-map): New binding [C-c C-o]. (antlr-mode-menu): New submenus. (antlr-options-use-submenus): New user option. (antlr-tool-version): New user option. (antlr-options-auto-colon): New user option. (antlr-options-style): New user option. (antlr-options-push-mark): New user option. (antlr-options-assign-string): New user option. (antlr-options-headings): New variable. New command to insert options -- specific. (antlr-options-alists): New variable. (antlr-read-value): New function. (antlr-read-boolean): New function. (antlr-language-option-extra): New function. (antlr-language-limit-n-regexp): Change default to higher LIMIT. (antlr-c++-mode-extra): New function. (antlr-grammar-tokens): New function. (antlr-imenu-create-index-function): New optional argument. New command to insert options -- functions. (antlr-insert-option): New command. (antlr-insert-option-interactive): New function. (antlr-options-menu-filter): New function. (antlr-option-kind): New function. (antlr-scan-lists): New alias. (antlr-scan-lists-internal): New function. (antlr-skip-file-prelude): Hack for special SKIP-COMMENT. (antlr-option-level): New function. (antlr-syntactic-grammar-depth): New function. (antlr-option-location): New function. (antlr-insert-option-do): New function. (antlr-option-spec): New function. (antlr-version-string): New function. (antlr-insert-option-existing): New function. (antlr-insert-option-space): New function. (antlr-insert-option-area): New function. New electric keys ":;|&(){}", TAB works better with narrowing. Menu change. Miscellaneous. (antlr-mode-menu): Include "Indent Region" and "Customize Antlr". (antlr-mode-map): New bindings for characters in ":;|&(){}". (antlr-electric-character): New command. (antlr-class-header-regexp): New variable. (antlr-font-lock-additional-keywords): Use it. (antlr-imenu-create-index-function): Use it. (antlr-file-dependencies): Use it. (antlr-indent-line): Also works with restrictions. (antlr-indent-command): Interactive spec - changes the buffer. (antlr-language-for-option): Deletia. (antlr-language-option): New function, defined instead. (antlr-mode): Use it.
author Richard M. Stallman <rms@gnu.org>
date Fri, 21 Dec 2001 23:55:39 +0000
parents 253f761ad37b
children 695cf19ef79e d7ddb3e565de
line wrap: on
line source

;;; cdl.el --- Common Data Language (CDL) utility functions for GNU Emacs

;; Copyright (C) 1993 Free Software Foundation, Inc.

;; Author: ATAE@spva.physics.imperial.ac.uk (Ata Etemadi)
;; Maintainer: FSF
;; Keywords: data

;; This file is part of GNU Emacs.

;; GNU Emacs 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, or (at your option)
;; any later version.

;; GNU Emacs 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:

;;; Code:

(defun cdl-get-file (filename)
  "Run file through ncdump and insert result into buffer after point."
  (interactive "fCDF file: ")
  (message "ncdump in progress...")
  (let ((start (point)))
    (call-process  "ncdump" nil t nil (expand-file-name filename))
    (goto-char start))
  (message "ncdump in progress...done"))

(defun cdl-put-region (filename start end)
  "Run region through ncgen and write results into a file."
  (interactive "FNew CDF file: \nr")
  (message "ncgen in progress...")
  (call-process-region start end "ncgen"
		       nil nil nil "-o" (expand-file-name filename))
  (message "ncgen in progress...done"))

(provide 'cdl)

;;; cdl.el ends here