Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

initial import from tar ball

  • Loading branch information...
commit 5bbf1b7365b7518a0576344b6038025aa64b53d3 1 parent 8cee8b7
@zonix zonix authored
View
2  BUGS
@@ -0,0 +1,2 @@
+* Block comments are not recognized correctly if there is a normal
+ comment starting with `--' in it.
View
339 COPYING
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ Appendix: How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
View
13 ChangeLog
@@ -0,0 +1,13 @@
+2001-11-25 Raymond Scholz <rscholz@zonix.de>
+
+ * csp-mode.el: Clean up
+
+2001-11-24 Raymond Scholz <rscholz@zonix.de>
+
+ * csp-mode release version 1.0.1
+
+ * Makefile: New file, taken from pcl-cvs by Stefan Monnier.
+
+ * ChangeLog, README, COPYING, INSTALL, NEWS: New files
+
+ * csp-mode.texi: Make it compile under makeinfo 4.0
View
20 INSTALL
@@ -0,0 +1,20 @@
+Installation of csp-mode requires the following steps:
+
+1. Edit `Makefile' and adapt the pathnames to your systems'
+ requirements. Also pay attention on the variables that define some
+ program names (f.e. your Emacs flavour `emacs' or `xemacs').
+
+2. Run `make install' to byte-compile csp-mode for your Emacs flavour,
+ install the byte-compiled files and the info documentation to the
+ appropriate directories specified in the file `Makefile'.
+
+ See `Makefile' for more detailled installation options (DVI or
+ PostScript versions of the manual).
+
+3. Add the following to your ~/.emacs:
+
+ (require 'csp-mode)
+
+4. Run your Emacs flavour and load a CSP specification. You're
+ supposed to look at a colorful CSP specification now.
+
View
161 Makefile
@@ -0,0 +1,161 @@
+# Makefile for emacs-lisp package
+
+# Copyright (C) 1998-2000 Free Software Foundation, Inc.
+
+# This file 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.
+
+# This file 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, 675 Mass Ave, Cambridge, MA 02139, USA.
+
+# load the package-specific settings
+include makefile.pkg
+
+# set up the usual installation paths
+prefix = /usr/local
+datadir = $(prefix)/share
+
+# the directory where you install third-party emacs packges
+lispdir = $(datadir)/emacs/site-lisp
+
+# the directory where the .elc files will be installed
+elcdir = $(lispdir)/$(PACKAGE)
+# the directory where the .el files will be installed
+eldir = $(elcdir)
+
+# the file where the initialization goes.
+#startupfile = $(HOME/.emacs
+startupfile = $(lispdir)/site-start.el
+
+# the directory where you install the info doc
+infodir = $(prefix)/info
+docdir = $(prefix)/doc
+
+EMACS = emacs
+MAKEINFO= makeinfo
+TEXI2DVI= texi2dvi
+TEXI2PDF= texi2pdf
+SHELL = /bin/sh
+DVIPS = dvips
+CP = cp
+RM = rm -f
+MKDIR = mkdir -p
+ETAGS = etags
+
+######################################################################
+### No changes below this line should be necessary ###
+######################################################################
+
+ELFLAGS = --eval '(setq load-path (append (list "." "$(lispdir)") load-path))'
+ELC = $(EMACS) -batch $(ELFLAGS) -f batch-byte-compile
+
+ELCFILES = $(ELFILES:.el=.elc)
+
+TEXEXTS = *.cps *.fns *.kys *.vr *.tp *.pg *.log *.aux *.toc *.cp *.ky *.fn
+
+.SUFFIXES: .elc .el .info .ps .dvi .pdf .texi
+.PHONY: elcfiles info clean distclean default
+.PHONY: install_startup install_elc install install_el install_info
+.PHONY: dvi postscript
+
+.el.elc:
+ $(ELC) $<
+
+.texi.info:
+ $(MAKEINFO) $<
+
+.texi.dvi:
+ $(TEXI2DVI) $<
+
+.dvi.ps:
+ $(DVIPS) -f $< >$@
+
+.texi.pdf:
+ $(TEXI2PDF) $<
+
+######################################################################
+
+default: elcfiles
+
+elcfiles: $(ELCFILES)
+info: $(PACKAGE).info
+
+install_elc: $(ELCFILES) $(PACKAGE)-startup.el
+ $(MKDIR) $(elcdir)
+ $(CP) $(ELCFILES) $(PACKAGE)-startup.el $(elcdir)/
+
+install_el:
+ $(MKDIR) $(eldir)
+ $(CP) $(ELFILES) $(eldir)/
+
+install_info: $(PACKAGE).info
+ $(MKDIR) $(infodir)
+ $(CP) *.info* $(infodir)/
+ -[ ! -w $(infodir)/dir ] \
+ || install-info --info-dir=$(infodir) $(PACKAGE).info
+
+install_startup:
+ $(MKDIR) $(lispdir)
+ @if grep $(PACKAGE) $(lispdir)/site-start.el >/dev/null 2>&1 || \
+ grep $(PACKAGE) $(startupfile) >/dev/null 2>&1 || \
+ grep $(PACKAGE) $(lispdir)/default.el >/dev/null 2>&1; then \
+ echo "**********************************************************" ;\
+ echo "*** It seems you already have some setup code" ;\
+ echo "*** for $(PACKAGE) in your startup files." ;\
+ echo "*** Check that it properly loads \"$(PACKAGE)-startup\"" ;\
+ echo "**********************************************************" ;\
+ else \
+ echo 'echo ";; load $(PACKAGE) setup code" >>$(startupfile)' ;\
+ echo ";; load $(PACKAGE) setup code" >>$(startupfile) ;\
+ echo 'echo "(add-to-list '\''load-path \"$(elcdir)\")" >>$(startupfile)' ;\
+ echo "(add-to-list 'load-path \"$(elcdir)\")" >>$(startupfile) ;\
+ echo 'echo "(load \"$(PACKAGE)-startup\")" >>$(startupfile)' ;\
+ echo "(load \"$(PACKAGE)-startup\")" >>$(startupfile) ;\
+ fi
+
+postscript ps: $(PACKAGE).ps
+pdf: $(PACKAGE).pdf
+dvi: $(PACKAGE).dvi
+install_dvi: dvi
+ $(MKDIR) $(docdir)
+ $(CP) *.dvi $(docdir)/
+
+install: install_elc install_info install_startup # install_el
+
+clean:
+ $(RM) *~ core .\#* $(TEXEXTS)
+
+TAGS tags:
+ $(ETAGS) $(ELFILES)
+
+distclean: clean
+ $(RM) *.elc *.dvi *.info* *.ps *.pdf
+
+######################################################################
+### don't look below ###
+######################################################################
+
+VERSION = 1.0.1
+DISTDIR = $(HOME)/www/zonix.de/div/el/$(PACKAGE)
+
+$(PACKAGE)-startup.el: $(ELFILES)
+ [ -f $@ ] || echo ' ' >$@
+ $(EMACS) --batch --eval '(setq generated-autoload-file "'`pwd`'/$@")' -f batch-update-autoloads "."
+
+##
+
+dist: distclean
+ make info $(PACKAGE)-startup.el
+ cp README NEWS $(DISTDIR)
+ $(RM) $(DISTDIR)/LATEST-IS-*
+ touch $(DISTDIR)/LATEST-IS-$(VERSION)
+ cd .. && \
+ tar cvzf $(DISTDIR)/$(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
View
3  NEWS
@@ -0,0 +1,3 @@
+Changes from unreleased version 1.0:
+
+* Add COPYING and all the usual fuzz, provide a decent Makefile.
View
18 README
@@ -0,0 +1,18 @@
+csp-mode is a major mode for Emacs flavours to support editing of CSP
+code using FDR2 syntax. It includes font-lock support and short-cuts
+for creating CSP constructs and sane indentation of CSP
+specifications.
+
+Copyright (C) 2001 by Olaf Bergmann, Markus Dahlweid, Uwe Schulze
+
+This (unofficial) package is provided by Raymond Scholz
+<rscholz@zonix.de>, the latest version can always be found at
+<URL:http://www.zonix.de/div/el/csp-mode/>
+
+See INSTALL for installation instructions.
+
+See NEWS for an overview of changes compared to the last version and
+ChangeLog for a detailled view on them.
+
+The info documentation contains all information on the usage and
+customization of this package.
View
37 csp-mode-startup.el
@@ -0,0 +1,37 @@
+
+;;;### (autoloads (csp-mode) "csp-mode" "csp-mode.el" (15359 56038))
+;;; Generated autoloads from csp-mode.el
+
+(autoload (quote csp-mode) "csp-mode" "\
+Major mode for editing CSP code written for fdr. \\<csp-mode-map>
+TAB indents for csp code. Delete converts tabs to spaces as it moves back.
+LFD terminates current line after indenting it correctly. The next line is indented as well.
+
+Other useful functions are:
+
+\\[csp-comment-area] - Put marked area in a comment.
+\\[csp-uncomment-area] - Uncomment an area commented with \\[csp-comment-area] or \"--\".
+\\[electric-csp-semi] - If csp-auto-newline is set, will insert a semicolon at current position and terminate current line indenting the next.
+\\[electric-csp-arrow] - Same as before, but inserts an arrow at current position.
+
+Variables controlling indentation/edit style:
+
+ csp-indent-level (default 4)
+ Indentation of csp statements with respect to containing block.
+ csp-auto-newline (default nil)
+ Non-nil means automatically newline after semicolons and the arrow
+ mark after an end.
+ csp-tab-always-indent (default t)
+ Non-nil means TAB in csp mode should always reindent the current line,
+ regardless of where in the line point is when the TAB command is used.
+ csp-untabify (default t)
+ Non-nil means TAB in csp mode will always be converted into spaces.
+
+See also the user variables csp-type-keywords, csp-start-keywords and
+csp-separator-keywords.
+
+Turning on csp mode calls the value of the variable csp-mode-hook with
+no args, if that value is non-nil." t nil)
+
+;;;***
+
View
15 csp-mode.aux
@@ -0,0 +1,15 @@
+'xrdef {Introduction-title}{Introduction}
+'xrdef {Introduction-pg}{2}
+'xrdef {Introduction-snt}{Chapter'tie1}
+'xrdef {History-title}{History}
+'xrdef {History-pg}{2}
+'xrdef {History-snt}{Section'tie1.1}
+'xrdef {Keybindings-title}{Commands and keybindings}
+'xrdef {Keybindings-pg}{3}
+'xrdef {Keybindings-snt}{Chapter'tie2}
+'xrdef {Customizing-title}{Customizing}
+'xrdef {Customizing-pg}{4}
+'xrdef {Customizing-snt}{Chapter'tie3}
+'xrdef {Bugs-title}{Bugs}
+'xrdef {Bugs-pg}{5}
+'xrdef {Bugs-snt}{Chapter'tie4}
View
0  csp-mode.cp
No changes.
View
660 csp-mode.el
@@ -0,0 +1,660 @@
+;;; csp-mode.el --- major mode for editing CSP specification in Emacs
+;;; using FDR2 syntax
+
+;; Copyright (C) 1996-2001 Olaf Bergmann, Markus Dahlweid, Uwe Schulze
+
+;; Original Author: Olaf Bergmann <bergmann@tzi.de>
+;; Changes by: Markus Dahlweid <dahlweid@tzi.de>
+;; Uwe Schulze <uschulze@tzi.de>
+;; Raymond Scholz <rscholz@tzi.de>
+;;
+;; Maintainer: Raymond Scholz <rscholz@zonix.de>
+;;
+;; Version: 1.0.2
+;; Keywords: CSP, specification, formal methods
+
+;; 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., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+;; There is an Texinfo file that describes this package. The GNU
+;; General Public License is included in that file. You should read
+;; it to get the most from this package.
+
+;;; Commentary:
+
+;; The latest version can always be found at
+;;
+;; <URL:http://www.zonix.de/div/el/csp-mode/>
+;;
+
+;; See INSTALL for installation instructions.
+
+(defvar csp-mode-abbrev-table nil
+ "Abbrev table in use in csp-mode buffers.")
+(define-abbrev-table 'csp-mode-abbrev-table ())
+
+(defvar csp-mode-map ()
+ "Keymap used in csp mode.")
+(if csp-mode-map
+ ()
+ (setq csp-mode-map (make-sparse-keymap))
+ (define-key csp-mode-map ";" 'electric-csp-semi)
+ (define-key csp-mode-map [?\C->] 'electric-csp-arrow)
+ (define-key csp-mode-map "\C-j" 'electric-csp-terminate-line)
+ (define-key csp-mode-map "\t" 'electric-csp-tab)
+
+ (define-key csp-mode-map "\C-ce" 'electric-csp-external-choice)
+ (define-key csp-mode-map "\C-cl" 'electric-csp-interleave)
+ (define-key csp-mode-map "\C-c~" 'electric-csp-internal-choice)
+ (define-key csp-mode-map "\C-ci" 'electric-csp-internal-choice)
+ (define-key csp-mode-map "\C-c|" 'electric-csp-sync)
+ (define-key csp-mode-map "\C-cp" 'electric-csp-sync)
+ (define-key csp-mode-map "\C-c{" 'electric-csp-channel-set)
+ (define-key csp-mode-map "\C-cs" 'electric-csp-channel-set)
+
+; (define-key csp-mode-map "\M-\C-h" 'csp-mark-defun)
+ (define-key csp-mode-map "\C-c\C-c" 'csp-comment-area)
+ (define-key csp-mode-map "\C-c\C-u" 'csp-uncomment-area)
+ (define-key csp-mode-map "\C-c\C-v" 'csp-validate)
+; (define-key csp-mode-map "\M-\C-a" 'csp-beg-of-defun)
+; (define-key csp-mode-map "\M-\C-e" 'csp-end-of-defun)
+; (define-key csp-mode-map "\C-c\C-d" 'csp-goto-defun)
+)
+
+(defvar csp-keywords
+ '("STOP" "SKIP" "CHAOS" "if" "then" "else" "channel" "datatype"
+ "nametype" "let" "ldot" "lambda" "within" "and" "or" "not"
+ "transparent" "true" "false"))
+
+;;;
+;;; Regular expressions used to calculate indent, etc.
+;;;
+(defconst csp-symbol-re "\\<[a-zA-Z_][a-zA-Z_0-9.!?,_]*'*\\>")
+(defconst csp-name-re "\\<\\([a-zA-Z][a-zA-Z_0-9_]*'*\\([ \t]*([ \ta-zA-Z0-9_\\+\\-\\*/%&|'().]+\\(,[ \ta-zA-Z0-9_\\+\\-\\*/%&|'().]+\\)*)\\)?\\)")
+(defconst csp-declaration-re
+ (concat "^[ \t]*\\(\\<\\(channel\\|datatype\\|nametype\\|transparent\\)\\>\\|"
+ csp-name-re "[ \t]*\\(\\(=[^=]\\)\\|:\\)\\)"))
+(defconst csp-defun-re (concat "^[ \t]*" csp-name-re "[ \t]*=[^=]"))
+(defconst csp-assert-re "[ \t]*\\<\\(assert\\)\\>")
+(defconst csp-sub-block-re "(*\\<\\(then\\|else\\)\\>")
+(defconst csp-noindent-re "\\<\\(then\\|else\\)\\>")
+(defconst csp-nosemi-re "\\<\\(then\\|else\\)\\>")
+(defconst csp-autoindent-lines-re "\\<\\(else\\)\\>")
+(defconst csp-logical-op-re "\\<\\(and\\|or\\|not\\)\\>")
+(defconst csp-boolean-re "\\<\\(true\\|false\\)\\>")
+(defconst csp-logical-op-re "\\<\\(and\\|or\\|not\\)\\>")
+(defconst csp-op-re "\\<\\(and\\|or\\|not\\)\\>\\|<=\\|>=\\|@\\|-?>\\|<-?\\|*\\|==\\|!=\\|!\\|\\\\\\|/\\|:\\|;\\|?\\|#\\|&\\||~|\\|\\[\\]\\|\\[\\[\\|\\]\\]\\|\\[|?\\||?\\]\\|{|?\\||?}\\|||?|?\\|\\^\\|\\+\\|\\%\\|\\[\\([TF]\\|FD\\)=")
+
+(defvar csp-mode-syntax-table nil
+ "Syntax table in use in csp-mode buffers.")
+
+(if csp-mode-syntax-table
+ ()
+ (setq csp-mode-syntax-table (make-syntax-table))
+ (modify-syntax-entry ?\\ "." csp-mode-syntax-table)
+ (modify-syntax-entry ?/ "." csp-mode-syntax-table)
+ (modify-syntax-entry ?( "()" csp-mode-syntax-table)
+ (modify-syntax-entry ?) ")(" csp-mode-syntax-table)
+ (modify-syntax-entry ?* "." csp-mode-syntax-table)
+ (modify-syntax-entry ?{ "(} 1" csp-mode-syntax-table)
+ (modify-syntax-entry ?} "){ 4" csp-mode-syntax-table)
+ (modify-syntax-entry ?+ "." csp-mode-syntax-table)
+ (modify-syntax-entry ?- ". 123b" csp-mode-syntax-table)
+ (modify-syntax-entry ?= "." csp-mode-syntax-table)
+ (modify-syntax-entry ?% "." csp-mode-syntax-table)
+ (modify-syntax-entry ?< "." csp-mode-syntax-table)
+ (modify-syntax-entry ?> "." csp-mode-syntax-table)
+ (modify-syntax-entry ?& "." csp-mode-syntax-table)
+ (modify-syntax-entry ?| "." csp-mode-syntax-table)
+ (modify-syntax-entry ?[ "." csp-mode-syntax-table)
+ (modify-syntax-entry ?] "." csp-mode-syntax-table)
+ (modify-syntax-entry ?_ "w" csp-mode-syntax-table)
+ (modify-syntax-entry ?\' "w" csp-mode-syntax-table)
+ (modify-syntax-entry ?? "." csp-mode-syntax-table)
+ (modify-syntax-entry ?! "." csp-mode-syntax-table)
+ (modify-syntax-entry ?\n "> b" csp-mode-syntax-table))
+
+
+(setq csp-font-lock-keywords-1
+ (list
+ (cons "\\<\\(assert\\|channel\\|datatype\\|nametype\\|transparent\\|[Ii]nter\\|[Uu]nion\\|diff\\|card\\)\\>" 'font-lock-type-face)
+ (cons "{-\\(\\([^-]*\\)\\|\\(-+[^-}]+\\)\\)*-}" 'font-lock-comment-face)))
+
+(setq csp-font-lock-keywords-2
+ (append csp-font-lock-keywords-1
+ (list
+ (cons (concat csp-sub-block-re "\\|\\<if\\>\\|"
+ csp-boolean-re "\\|"
+ "\\<\\(let\\|within\\|lambda\\|ldot\\)\\>")
+ 'font-lock-keyword-face)
+ (cons "\\<\\(SKIP\\|STOP\\|CHAOS\\)\\>"
+ 'font-lock-function-name-face)
+ (cons csp-defun-re '(1 'font-lock-function-name-face)))))
+
+(setq csp-font-lock-keywords-3
+ (append csp-font-lock-keywords-2
+ (list
+ (cons "\\[\\([TF]\\|FD\\)=" 'font-lock-reference-face)
+ (cons csp-op-re 'font-lock-reference-face)
+ (cons "\\<[a-zA-Z0-9_]\\(\\([a-zA-Z0-9.!?,_]*'+\\)\\|\\([a-zA-Z0-9.!?,_]*[a-zA-Z0-9!?,_]\\)\\)?\\>\\(\\.\\.?\\)\\<[a-zA-Z0-9_][a-zA-Z_0-9.!?,_]*'*\\>" '(4 'font-lock-reference-face)))))
+
+(setq csp-font-lock-keywords csp-font-lock-keywords-2)
+
+(defvar csp-indent-level 4
+ "*Indentation of csp statements with respect to containing block.")
+
+(defvar csp-untabify t
+ "*Non-nil means each TAB in csp mode will be converted into spaces.")
+
+(defvar csp-auto-newline nil
+ "*Non-nil means automatically newline after semicolons and the punctuation
+mark after an end.")
+
+(defvar csp-tab-always-indent t
+ "*Non-nil means TAB in csp mode should always reindent the current line,
+regardless of where in the line point is when the TAB command is used.")
+
+(defvar csp-validate-error-regexps
+ '(("\\(error\\|warning\\) at \\([^,]+\\), line \\([0-9]+\\)" 2 3))
+ "Alist of regexps to recognize error messages from csp-validate.")
+
+(defvar csp-offer-save t
+ "*If non-nil, ask about saving modified buffers before \\[csp-validate] is run.")
+
+(defvar csp-validate-command
+ "csp_parser"
+ "*The command to validate buffer.
+The file name of current buffer's file will be appended to this,
+separated by a space.")
+
+(defvar csp-saved-validate-command nil
+ "The command last used to validate in this buffer.")
+
+;;;
+;;; Macros
+;;;
+
+(defsubst csp-get-beg-of-line (&optional arg)
+ (save-excursion
+ (beginning-of-line arg)
+ (point)))
+
+(defsubst csp-get-end-of-line (&optional arg)
+ (save-excursion
+ (end-of-line arg)
+ (point)))
+
+(defsubst csp-within-string ()
+ (save-excursion
+ (nth 3 (parse-partial-sexp (csp-get-beg-of-line) (point)))))
+
+
+;;;###autoload
+(defun csp-mode ()
+ "Major mode for editing CSP code written for fdr. \\<csp-mode-map>
+TAB indents for csp code. Delete converts tabs to spaces as it moves back.
+LFD terminates current line after indenting it correctly. The next line is indented as well.
+
+Other useful functions are:
+
+\\[csp-comment-area]\t- Put marked area in a comment.
+\\[csp-uncomment-area]\t- Uncomment an area commented with \
+\\[csp-comment-area] or \"--\".
+\\[electric-csp-semi]\t- If csp-auto-newline is set, will insert a semicolon at current position and terminate current line indenting the next.
+\\[electric-csp-arrow]\t- Same as before, but inserts an arrow at current position.
+
+Variables controlling indentation/edit style:
+
+ csp-indent-level (default 4)
+ Indentation of csp statements with respect to containing block.
+ csp-auto-newline (default nil)
+ Non-nil means automatically newline after semicolons and the arrow
+ mark after an end.
+ csp-tab-always-indent (default t)
+ Non-nil means TAB in csp mode should always reindent the current line,
+ regardless of where in the line point is when the TAB command is used.
+ csp-untabify (default t)
+ Non-nil means TAB in csp mode will always be converted into spaces.
+
+See also the user variables csp-type-keywords, csp-start-keywords and
+csp-separator-keywords.
+
+Turning on csp mode calls the value of the variable csp-mode-hook with
+no args, if that value is non-nil."
+ (interactive)
+ (kill-all-local-variables)
+ (use-local-map csp-mode-map)
+ (setq major-mode 'csp-mode)
+ (setq mode-name "csp-mode")
+ (setq local-abbrev-table csp-mode-abbrev-table)
+ (set-syntax-table csp-mode-syntax-table)
+ (make-local-variable 'indent-line-function)
+ (setq indent-line-function 'csp-indent-line)
+ (make-local-variable 'parse-sexp-ignore-comments)
+ (setq parse-sexp-ignore-comments nil)
+ (make-local-variable 'case-fold-search)
+ (setq case-fold-search t)
+ (make-local-variable 'comment-start)
+ (setq comment-start " --")
+ (make-local-variable 'comment-start-skip)
+ (setq comment-start-skip "--+ *")
+ (make-local-variable 'comment-end)
+ (setq comment-end "")
+ ;; Font lock support
+ (make-local-variable 'font-lock-defaults)
+ (setq font-lock-defaults '(csp-font-lock-keywords nil t))
+ (run-hooks 'csp-mode-hook))
+
+;;;
+;;; Electric functions
+;;;
+(defun electric-csp-terminate-line ()
+ "Terminate line and indent next line."
+ (interactive)
+ ;; First, indent current line
+ (save-excursion
+ (beginning-of-line)
+ (skip-chars-forward " \t")
+ (csp-indent-line))
+ (delete-horizontal-space) ; Removes trailing whitespaces
+ (newline)
+ ;; Indent next line
+ (csp-indent-line))
+
+;;;
+;;; Interactive functions
+;;;
+(defun csp-comment-area (start end)
+ "Put the region into a csp comment."
+ (interactive "r")
+ (save-excursion
+ (goto-char start)
+ (beginning-of-line)
+ (while (< (point) end)
+ (if (not (looking-at "^[ \t]*--"))
+ (insert "--"))
+ (forward-line 1))))
+
+
+(defun csp-uncomment-area ()
+ "Uncomment a commented area."
+ (interactive)
+ (save-excursion
+ (beginning-of-line)
+ (if (not (looking-at "^[ \t]*--"))
+ ()
+ (if (re-search-backward
+ "^[ \t]*\\([^- \t]+\\|\\(-\\([^-]\\|$\\)\\)\\)" (point-min) t)
+ ()
+ (goto-char (point-min)))
+ (if (not (looking-at "^[ \t]*--"))
+ (forward-line 1))
+ (skip-chars-forward " \t")
+ (while (looking-at "--")
+ (delete-backward-char -2)
+ (forward-line 1)
+ (skip-chars-forward " \t")))))
+
+;;;
+;;; Indentation
+;;;
+(defconst csp-indent-alist
+ '((block . (+ ind csp-indent-level))
+; '((block . (+ ind-levl csp-indent-level))
+; (declaration . (+ ind csp-indent-level))
+ (declaration . ind)
+ (paramlist . (csp-indent-paramlist t))
+ (comment . (csp-indent-comment t))
+ (defun . ind) (contexp . ind)
+ (unknown . 0) (string . 0)
+ (assertion . 0)))
+
+(defun csp-indent-to (col)
+ "Indent from current point to column col. Tabs will be converted to sapces unless csp-untabify is set to nil."
+ (let ((oldpos (point)))
+ (indent-to col)
+ (if csp-untabify
+ (untabify oldpos (point)))))
+
+(defun csp-insert-tab ()
+ "Inserts as many spaces as a TAB-character represents at current position unless csp-untabify is set to nil."
+ (let ((oldpos (point)))
+ (insert "\t")
+ (if csp-untabify
+ (untabify oldpos (point)))))
+
+(defun csp-indent-level ()
+ "Return the indent-level the current statement has.
+Do not count declarations or definitions."
+ (save-excursion
+ (let ((re " \t"))
+ (beginning-of-line)
+ (if (looking-at csp-defun-re)
+ (search-forward "=" nil t)
+ (if (looking-at (concat "^[ \t]*" csp-name-re "[ \t]*:"))
+ (search-forward ":" nil t)
+ (setq re " \t()")))
+ (skip-chars-forward re)
+ (current-column))))
+
+(defun csp-indent-comment (&optional arg)
+ "Indent current line as comment.
+If optional arg is non-nil, just return the
+column number the line should be indented to."
+ (let* ((stcol (save-excursion
+ (re-search-backward "--" nil t)
+ (1+ (current-column)))))
+ (if arg stcol
+ (delete-horizontal-space)
+ (csp-indent-to stcol))))
+
+(defun csp-indent-declaration (&optional arg start end)
+ "Indent current lines as declaration."
+ (let ((pos (point-marker)))
+ (if (and (not (or arg start)) (not (csp-declaration-beg)))
+ ()
+ (let ((stpos (if start start
+ (forward-word 2) (backward-word 1) (point)))
+ (edpos (set-marker (make-marker)
+ (if end end
+ (max (progn (csp-declaration-end)
+ (point))
+ pos))))
+ ind)
+
+ (goto-char stpos)
+ ;; Indent lines
+ (if arg
+ (while (<= (point) (marker-position edpos))
+ (beginning-of-line)
+ (delete-horizontal-space)
+ (csp-indent-to (+ arg csp-indent-level))
+ (forward-line 1)))
+
+ ;; If arg - move point
+ (if arg (forward-line -1)
+ (goto-char (marker-position pos)))))))
+
+(defun csp-indent-line (&optional state)
+ "Indent current line as a csp statement."
+ (let* ((indent-str (csp-calculate-indent))
+ (type (car indent-str))
+ (ind (car (cdr indent-str)))
+ (branch (nth 1 (if state
+ state
+ (csp-get-branch (point) (parse-partial-sexp (point-min) (point)))))))
+ (delete-horizontal-space)
+ ;; Some things should not be indented
+ (if (and (eq type 'declaration) (looking-at csp-declaration-re))
+ ()
+ ;; Other things should have no extra indent
+ (if (and (eq type 'block) branch)
+ (let* ((nest 1)
+ (noind (looking-at csp-noindent-re))
+ (ind-levl (save-excursion (if (not branch)
+ 0
+ (goto-char branch)
+ (current-column)))))
+ (if noind
+ (csp-indent-to ind-levl)
+ (csp-indent-to (+ ind-levl csp-indent-level))))
+ ;; But most lines are treated this way:
+ (csp-indent-to (eval (cdr (assoc type csp-indent-alist))))
+ ))))
+
+(defun csp-declaration-beg ()
+ (numberp (re-search-backward csp-declaration-re (csp-get-beg-of-line 0) t)))
+
+
+(defun csp-declaration-end ()
+ (numberp (re-search-forward csp-declaration-re (save-excursion (end-of-line 2) (point)) t)))
+
+(defsubst csp-within-comment ()
+ (save-excursion
+ (nth 4 (parse-partial-sexp (csp-get-beg-of-line) (point)))))
+
+(defun csp-get-branch (pos state)
+ "Get regexp and position for then- or else-branch pos is in. If it is not in an if-statement return nil."
+ (let ((re nil)
+ (thenpos nil)
+ (elsepos nil)
+ (ifpos nil)
+ (ps nil)
+ (minpos (if (nth 1 state) (nth 1 state) (point-min))))
+ (setq thenpos (save-excursion
+ (goto-char pos)
+ (catch 'p (let ((res nil))
+ (while t
+ (setq res (re-search-backward "\\<then\\>" minpos t))
+ (if (not res)
+ (throw 'p nil)
+ (if (= (car state) (car (parse-partial-sexp (point-min) (point))))
+ (throw 'p res)))))))
+ elsepos (save-excursion
+ (goto-char pos)
+ (if (looking-at "\\<else\\>")
+ (point)
+ (catch 'p (while t
+ (let ((res (re-search-backward "\\<else\\>" minpos t)))
+ (if (not res)
+ (throw 'p nil)
+ (if (= (car state) (car (parse-partial-sexp (point-min) (point))))
+ (throw 'p res)))))))))
+ (cond (thenpos (if elsepos
+ (if (> thenpos elsepos)
+ (setq re "\\<then\\>" ps thenpos)
+ (setq re "\\<else\\>" ps elsepos))
+ (setq re "\\<then\\>" ps thenpos)))
+ (elsepos (setq re "\\<else\\>" ps elsepos))) ;thenpos must be nil !
+ (if ps
+ (save-excursion
+ (goto-char ps)
+ (setq ifpos (catch 'p (let ((res nil) (nest 0))
+ (while t
+ (setq res (re-search-backward (concat re "\\|\\<if\\>") minpos t))
+ (if (not res)
+ (throw 'p nil)
+ (if (not (= (car state) (car (parse-partial-sexp (point-min) (point)))))
+ ()
+ (if (not (looking-at "\\<if\\>"))
+ (setq nest (1+ nest))
+ (if (= nest 0)
+ (throw 'p res)
+ (setq nest (1- nest))))))))))))
+ (list re ifpos thenpos elsepos)))
+
+(defun csp-calculate-indent ()
+ "Calculate the indent of the current csp line.
+Return a list of two elements: (INDENT-TYPE INDENT-LEVEL)."
+ (save-excursion
+ (let* ((parse-sexp-ignore-comments t)
+ (oldpos (point))
+ (state (save-excursion (parse-partial-sexp (point-min) (point))))
+ (nest 0) (par 0) (complete (looking-at (concat csp-declaration-re "\\|" csp-assert-re)))
+ (elsed (looking-at "[ \t]*else\\>"))
+ (nestpos nil)
+ (type (catch 'nesting
+ ;; Check if inside a string, comment or parenthesis
+ (cond ((nth 3 state) (throw 'nesting 'string))
+ ((nth 4 state) (throw 'nesting 'comment))
+ ((> (car state) 0)
+ (setq nestpos (csp-get-branch oldpos state))
+ (if (nth 1 nestpos)
+ (progn (setq nest 1)
+ (throw 'nesting 'block))
+ (goto-char (scan-lists (point) -1 1))
+ (setq par (1+ (current-column)))
+ (throw 'nesting 'declaration)))
+ ((looking-at "--")
+ (throw 'nesting 'unknown)))
+ ;; Loop until correct indent is found
+ (while t
+ (backward-sexp 1)
+ (cond (;--comment start
+ (looking-at comment-start)
+ (throw 'nesting 'unknown))
+ (;--Declaration part
+ (looking-at csp-declaration-re)
+ (if (save-excursion
+ (goto-char oldpos)
+ (forward-line -1)
+ (looking-at "^[ \t]*$"))
+ (throw 'nesting 'unknown)
+ (throw 'nesting 'declaration)))
+ (;--assertion
+ (looking-at csp-assert-re)
+ (throw 'nesting 'assertion))
+ (;--If, else or while statement
+ (and (not complete)
+ (looking-at csp-sub-block-re))
+ (throw 'nesting 'block))
+ (;--Found complete statement
+ (save-excursion (forward-sexp 1)
+ (looking-at csp-declaration-re))
+ (setq complete t))
+ (;--No known statements
+ (bobp)
+ (throw 'nesting 'unknown))
+ )))))
+
+ ;; Return type of block and indent level.
+ (if (> par 0) ; Unclosed Parenthesis
+ (list 'contexp par)
+ (if (> nest 0)
+ (progn
+ (goto-char (nth 1 nestpos))
+ (list type (csp-indent-level)))
+ (list type (csp-indent-level)))))))
+
+(defun csp-validate (command)
+ "Validate CSP code.
+Runs COMMAND, a shell command, in a separate process asynchronously
+with output going to the buffer *compilation*.
+You can then use the command \\[next-error] to find the next error message
+and move to the line in the CSP program that caused it."
+ (interactive
+ (list (read-string "Validate command: "
+ (or csp-saved-validate-command
+ (concat csp-validate-command
+ " "
+ (let ((name (buffer-file-name)))
+ (and name
+ (file-name-nondirectory name))))))))
+ (setq csp-saved-validate-command command)
+ (if csp-offer-save
+ (save-some-buffers nil nil))
+ (compile-internal command "No more errors" "CSP validation"
+ nil
+ csp-validate-error-regexps))
+
+(defun electric-csp-tab ()
+ "Function called when TAB is pressed in csp mode."
+ (interactive)
+ ;; Do nothing if within a string
+ (if (or (csp-within-string) (csp-within-comment))
+ (csp-insert-tab)
+ ;; If csp-tab-always-indent, indent the beginning of the line.
+ (if csp-tab-always-indent
+ (save-excursion
+ (beginning-of-line)
+ (csp-indent-line))
+ (if (save-excursion
+ (skip-chars-backward " \t")
+ (bolp))
+ (csp-indent-line)
+ (csp-insert-tab)))
+ (csp-indent-command)))
+
+(defun csp-indent-command ()
+ "Indent for special part of code."
+ (let* ((indent-str (csp-calculate-indent))
+ (type (car indent-str))
+ (ind (car (cdr indent-str))))
+ (cond ((eq type 'declaration)
+ (csp-indent-declaration)))
+ (if (looking-at "[ \t]+$")
+ (skip-chars-forward " \t"))))
+
+(defun electric-csp-semi ()
+ "Insert `;' reindent the line."
+ (interactive)
+ (insert last-command-char)
+ (save-excursion
+ (beginning-of-line)
+ (csp-indent-line))
+ (if csp-auto-newline
+ (electric-csp-terminate-line)))
+
+(defun electric-csp-arrow ()
+ "Insert ` ->' reindent the line."
+ (interactive)
+ (insert " ->")
+ (save-excursion
+ (beginning-of-line)
+ (csp-indent-line))
+ (if csp-auto-newline
+ (electric-csp-terminate-line)))
+
+(defun csp-generic-insert-op (s)
+ "Insert arg1 if preceding char is space or TAB, space followed by arg1 otherwise."
+ (let ((ie nil))
+ (backward-char 1)
+ (if (looking-at "[ \t]")
+ (setq ie s)
+ (setq ie (concat " " s)))
+ (forward-char 1)
+ (insert ie)))
+
+(defun electric-csp-external-choice ()
+ "Insert `[]' at current position."
+ (interactive)
+ (csp-generic-insert-op "[] "))
+
+(defun electric-csp-internal-choice ()
+ "Insert `|~|' at current position."
+ (interactive)
+ (csp-generic-insert-op "|~| "))
+
+(defun electric-csp-interleave ()
+ "Insert `|||' at current position."
+ (interactive)
+ (csp-generic-insert-op "||| "))
+
+(defun electric-csp-sync ()
+ "Insert `[| |]' at current position."
+ (interactive)
+ (csp-generic-insert-op "[| |] ")
+ (backward-char 4))
+
+(defun electric-csp-channel-set ()
+ "Insert `{| |}' at current position."
+ (interactive)
+ (csp-generic-insert-op "{| |} ")
+ (backward-char 4))
+
+(defun electric-csp-renaming ()
+ "Insert `[[ ]]' at current position."
+ (interactive)
+ (csp-generic-insert-op "[[ ]] ")
+ (backward-char 4))
+
+;; assign csp-mode to some file extension
+(setq auto-mode-alist
+ (append '(("\\.csp$" . csp-mode)
+ ("\\.fdr.?$" . csp-mode))
+ auto-mode-alist))
+
+(provide 'csp-mode)
+
+;;; csp-mode.el ends here
View
BIN  csp-mode.elc
Binary file not shown
View
0  csp-mode.fn
No changes.
View
210 csp-mode.info
@@ -0,0 +1,210 @@
+This is csp-mode.info, produced by makeinfo version 4.0 from
+csp-mode.texi.
+
+ This file documents the major mode csp version 1.0.1 for editing CSP
+code in FDR2-syntax.
+
+ Copyright (C) 2000 Olaf Bergmann, Markus Dahlweid
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies (see the GNU General Public License).
+
+
+File: csp-mode.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
+
+* Menu:
+
+* Introduction:: what is csp mode
+* Keybindings:: description of the commands and keybindings
+* Customizing:: how to change the behaviour of csp
+* Bugs:: unfortunately is this page not empty
+
+ A mode for programming CSP in Emacs.
+
+ Designed and written by
+
+ Olaf Bergmann bergmann@informatik.uni-bremen.de
+ Markus Dahlweid dahlweid@informatik.uni-bremen.de
+ Uwe Schulze uschulze@informatik.uni-bremen.de
+
+* Menu:
+
+* Introduction:: what is csp mode
+* Keybindings:: description of the commands and keybindings
+* Customizing:: how to change the behaviour of csp
+* Bugs:: unfortunately is this page not empty
+
+ --- The Detailed Node Listing ---
+
+
+
+* Introduction:: what is csp mode
+* Keybindings:: description of the commands and keybindings
+* Customizing:: how to change the behaviour of csp
+* Bugs:: unfortunately is this page not empty
+
+
+Introduction
+
+* History::
+
+
+File: csp-mode.info, Node: Introduction, Next: Keybindings, Prev: Top, Up: Top
+
+Introduction
+************
+
+ Csp-Mode is a major mode for use with Emacs.
+
+* Menu:
+
+* History::
+
+
+File: csp-mode.info, Node: History, Prev: Introduction, Up: Introduction
+
+History
+=======
+
+ In winter 1996/1997 there were some students of computer science at
+the University of Bremen, Germany, who felt that there was need of a
+mode for editing CSP-code using the ASCII representation for the
+FDR2-model-checker.
+
+
+File: csp-mode.info, Node: Keybindings, Next: Customizing, Prev: Introduction, Up: Top
+
+Commands and keybindings
+************************
+
+ As usual for common major modes dealing with program languages, there
+are some often used keys which take care for correct indentation of
+expressions and comments. The indentation itself may be controlled by a
+number of parameters we look at in the following chapter.
+
+ * Pressing `TAB' `(electric-csp-tab)' as usual indents the current
+ line looking at its preceding line. Each tab is converted to
+ spaces if and only if `csp-untabify' is set to `t'.
+
+ * Pressing `LFD' `(electric-csp-terminate-line)'indents the current
+ line correctly and terminates it. The next line is indented as
+ well.
+
+ * `C-c C-c' `(csp-comment-area)' will comment out the currently
+ marked area. This is done by inserting the b-style
+ comment-start-sequence `--' at the beginning of each in line in the
+ current region. If there is already such a character combination,
+ nothing is inserted. This may cause problems when you press `C-c
+ C-c' being in a block-comment since executing the inverse operation
+ `csp-uncomment-area' will delete all leading
+ comment-start-sequence characters.
+
+ * `C-c C-u' `(csp-uncomment-area)' removes all leading
+ comment-start-sequence characters in the commented area
+ surrounding the current position. The first commented line in this
+ area will be searched. The actual "Area" is then delimited by the
+ first and the last line which have no leading
+ comment-start-sequence (i.e. they even might be empty).
+
+ * Pressing `;' `(electric-csp-semi)' and `csp-auto-newline' is
+ non-nil will cause a semicolon to be inserted at the current
+ position. After that, the current line is terminated and the
+ following line will be indented correctly.
+
+ * `C->' `(electric-csp-arrow)' does the same as `electric-csp-semi'
+ described before, but the arrow-operator `->' is inserted at the
+ end of the current line.
+
+ * `C-c e' `(electric-csp-external-choice)' inserts an external
+ choice operator `[]' at current position.
+
+ * `C-c l' `(electric-csp-interleave)' inserts an interleave operator
+ `|||' at current position.
+
+ * `C-c ~' or `C-c i' `(electric-csp-internal-choice)' inserts an
+ internal choice operator `|~|' at current position.
+
+ * `C-c |' or `C-c p' `(electric-csp-sync)' inserts a synchronisation
+ operator `[| |]' at current position and places the point centered
+ between the two vertical bars.
+
+ * `C-c {' or `C-c s' `(electric-csp-channel-set)' inserts a set
+ operator `{| |}' at current position and places the point centered
+ between the two vertical bars.
+
+ * `C-c C-v' `(csp-validate)' invokes the validation command
+ specified in `csp-validate-command'. If errors occurred, you can
+ use `next-error' to find the actual code line corresponding to the
+ line given in the message.
+
+
+
+File: csp-mode.info, Node: Customizing, Next: Bugs, Prev: Keybindings, Up: Top
+
+Customizing
+***********
+
+ This chapter describes the variables you can use to customize the
+behaviour of csp mode. At least there are switches to determine whether
+lines are allowed to be indented or tabs to be converted into spaces
+automatically.
+
+ * `csp-indent-level' is an integer-value denoting the amount of
+ spaces which are inserted when a line is indented with respect to a
+ containig block. Its default value is `3'.
+
+ * If `csp-auto-newline' is non-nil, this means that there will be
+ inserted a newline automatically after inserting a semicolon or the
+ array-operator. The default is set to `t'.
+
+ * `csp-tab-always-indent' means that a `TAB' in Csp-mode should
+ always reindent the current line, regardless of where in the line
+ point is when the `TAB' command is used. Default is `t'.
+
+ * `csp-untabify' specifies whether tabs should be converted into
+ spaces or not. If `t' which is the default value, tabs will be
+ converted.
+
+ * `csp-validate-error-regexps' contains an alist of regular
+ expressions to recognize error messages from `csp-validate'.
+
+ * `csp-offer-save'. If this is `t', invocation of `csp-validate'
+ will cause Emacs to ask whether modified buffers should be saved
+ before executing `csp-validate'. Default is `t'.
+
+ * `csp-validate-command' contains the shell-command to validate the
+ CSP program in current buffer. The file name of the buffer will be
+ appended, seperated by a space.
+
+
+
+File: csp-mode.info, Node: Bugs, Prev: Customizing, Up: Top
+
+Bugs
+****
+
+ There are several bugs known by now, but none of them are severe. As
+for the most syntax-controlled programming modes, correct statements
+will be indented correctly, but the result of indenting wrong
+statements will sometimes have funny effects. Fortunately, most of them
+indicate incorrect use of the language's constructs, so this will help
+you not to make too many syntactic errors. However, there still remain
+some dirty effects even if typed syntax is correct. Here is a list of
+the known bugs:
+
+ * Block comments are not recognized correctly if there is a normal
+ comment starting with `--' in it.
+
+
+
+
+Tag Table:
+Node: Top428
+Node: Introduction1618
+Node: History1802
+Node: Keybindings2124
+Node: Customizing5122
+Node: Bugs6698
+
+End Tag Table
View
0  csp-mode.ky
No changes.
View
189 csp-mode.log
@@ -0,0 +1,189 @@
+This is pdfTeX, Version 3.14159-13d (Web2C 7.3.1) (format=pdftex 2001.3.25) 1 JAN 2002 21:47
+**/home/rscholz/el/csp-mode/csp-mode.texi
+(/home/rscholz/el/csp-mode/csp-mode.texi[/usr/share/texmf/pdftex/config/pdftex.
+cfg]
+Babel <v3.6x> and hyphenation patterns for american, french, german, ngerman, n
+ohyphenation, loaded.
+(/usr/share/texmf/pdftex/texinfo/texinfo.tex
+(/usr/share/texmf/pdftex/texinfo/pdftexinfo.tex
+Loading texinfo [version 1999-03-26.17]:
+(/usr/share/texmf/pdftex/plain/misc/pdfcolor.tex) Basics,
+\bindingoffset=\dimen16
+\normaloffset=\dimen17
+\pagewidth=\dimen18
+\pageheight=\dimen19
+\outerhsize=\dimen20
+\outervsize=\dimen21
+\cornerlong=\dimen22
+\cornerthick=\dimen23
+\topandbottommargin=\dimen24
+\headlinebox=\box16
+\footlinebox=\box17
+\margin=\insert252
+\EMsimple=\toks12
+\singlespaceskip=\skip18
+\groupinvalidhelp=\toks13
+\mil=\dimen25
+\exdentamount=\skip19
+\inmarginspacing=\skip20
+ fonts,
+\sffam=\fam8
+\mainmagstep=\count26
+\fontdepth=\count27
+
+page headings,
+\titlepagetopglue=\skip21
+\titlepagebottomglue=\skip22
+\evenheadline=\toks14
+\oddheadline=\toks15
+\evenfootline=\toks16
+\oddfootline=\toks17
+ tables,
+\tableindent=\dimen26
+\itemindent=\dimen27
+\itemmargin=\dimen28
+\itemmax=\dimen29
+\itemno=\count28
+\multitableparskip=\skip23
+\multitableparindent=\skip24
+\multitablecolspace=\dimen30
+\multitablelinespace=\skip25
+\colcount=\count29
+ conditionals, indexing,
+\toksA=\toks18
+\toksB=\toks19
+\toksC=\toks20
+\toksD=\toks21
+\countA=\count30
+\boxA=\box18
+\secondaryindent=\skip26
+\partialpage=\box19
+\doublecolumnhsize=\dimen31
+ sectioning,
+\chapno=\count31
+\secno=\count32
+\subsecno=\count33
+\subsubsecno=\count34
+\appendixno=\count35
+\absseclevel=\count36
+\secbase=\count37
+\chapheadingskip=\skip27
+\secheadingskip=\skip28
+\subsecheadingskip=\skip29
+ toc,
+\tocfile=\write0
+\contentsrightmargin=\skip30
+\savepageno=\count38
+\lastnegativepageno=\count39
+\tempnum=\count40
+ PDF outlines,
+(csp-mode.toc) (csp-mode.toc)
+\shortappendixwidth=\dimen32
+\tocindent=\dimen33
+ environments,
+\dblarrowbox=\box20
+\longdblarrowbox=\box21
+\pushcharbox=\box22
+\bullbox=\box23
+\equivbox=\box24
+\errorbox=\box25
+\lispnarrowing=\skip31
+\envskipamount=\skip32
+\circthick=\dimen34
+\cartouter=\dimen35
+\cartinner=\dimen36
+\normbskip=\skip33
+\normpskip=\skip34
+\normlskip=\skip35
+\lskip=\skip36
+\rskip=\skip37
+ defuns,
+\defbodyindent=\skip38
+\defargsindent=\skip39
+\deftypemargin=\skip40
+\deflastargmargin=\skip41
+\parencount=\count41
+ macros,
+\macscribble=\write1
+\paramno=\count42
+\macname=\toks22
+ cross references,
+\auxfile=\write2
+\@savsk=\dimen37
+\@savsf=\count43
+\filename=\toks23
+\filenamelength=\count44
+\footnoteno=\count45
+
+(/usr/share/texmf/tex/plain/dvips/epsf.tex
+\epsffilein=\read0
+\epsfframemargin=\dimen38
+\epsfframethickness=\dimen39
+\epsfrsize=\dimen40
+\epsftmp=\dimen41
+\epsftsize=\dimen42
+\epsfxsize=\dimen43
+\epsfysize=\dimen44
+\pspoints=\dimen45
+\epsfnoopenhelp=\toks24
+)
+\noepsfhelp=\toks25
+ localization,
+\nolanghelp=\toks26
+\defaultparindent=\dimen46
+
+and turning on texinfo input format.)) (csp-mode.aux)
+@cpindfile=@write3
+@fnindfile=@write4
+@vrindfile=@write5
+@tpindfile=@write6
+@kyindfile=@write7
+@pgindfile=@write8
+ [1
+\openout2 = `csp-mode.aux'.
+
+\openout3 = `csp-mode.cp'.
+
+\openout4 = `csp-mode.fn'.
+
+\openout5 = `csp-mode.vr'.
+
+\openout6 = `csp-mode.tp'.
+
+\openout7 = `csp-mode.ky'.
+
+\openout8 = `csp-mode.pg'.
+
+[/usr/share/texmf/dvips/config/pdftex.map]] Chapter 1
+Warning (ext1): destination with the same identifier (name{1@}) already exists!
+
+\onepageout ...fdest name {\mkpgn {\the \pageno }}
+ xyz}}\advancepageno \ifnu...
+<output> {\onepageout {\pagecontents \PAGE }
+ }
+<to be read again>
+ \footnoteno
+\supereject ->\par \penalty -20000\footnoteno
+ =0
+\chapmacro #1#2->\pchapsepmacro
+ {\chapfonts \rm \def \chapnum {#2}\setbox 0 ...
+
+\chapterzzz ...pno }\chapmacro {#1}{\the \chapno }
+ \gdef \thissection {#1}\gd...
+...
+l.89 @chapter Introduction
+ [1]
+\openout0 = `csp-mode.toc'.
+
+ Chapter 2 [2] Chapter 3 [3] Chapter 4 [4]
+[5] )
+Here is how much of TeX's memory you used:
+ 1401 strings out of 12654
+ 15021 string characters out of 466977
+ 36727 words of memory out of 263001
+ 2382 multiletter control sequences out of 10000+0
+ 30088 words of font info for 104 fonts, out of 400000 for 1000
+ 19 hyphenation exceptions out of 1000
+ 12i,4n,10p,286b,250s stack positions out of 300i,100n,500p,50000b,4000s
+<cmsy10.pfb><cmtt10.pfb><cmr10.pfb><cmbx12.pfb>
+Output written on csp-mode.pdf (6 pages, 52325 bytes).
View
BIN  csp-mode.pdf
Binary file not shown
View
0  csp-mode.pg
No changes.
View
260 csp-mode.texi
@@ -0,0 +1,260 @@
+\input texinfo @c -*-texinfo-*-
+@comment %**start of header
+@setfilename csp-mode.info
+@settitle CSP-Mode V@value{cspver}
+@comment %**end of header
+
+@c $Author: rscholz $
+@c $Date: 2002/01/01 20:46:33 $
+@c $Source: /var/local/cvs/csp-mode/csp-mode.texi,v $
+@c $Revision: 1.1.1.1 $
+
+
+@set cspver 1.0.1
+@set docver 2
+@set printdate @today{}
+@set reldate Nov 2001
+
+@ifinfo
+This file documents the major mode csp version @value{cspver} for editing CSP code in FDR2-syntax.
+
+Copyright @copyright{} 2000 Olaf Bergmann, Markus Dahlweid
+
+Permission is granted to make and distribute verbatim copies of this manual
+provided the copyright notice and this permission notice are preserved
+on all copies (see the GNU General Public License).
+@end ifinfo
+
+@titlepage
+@title CSP-Mode
+@subtitle The Emacs major mode for editing CSP code in FDR2-syntax, Edition @value{docver}
+@subtitle @value{reldate}
+
+@author by Olaf Bergmann, Markus Dahlweid
+
+@end titlepage
+@node Top, Introduction, (dir), (dir)
+@comment node-name, next, previous, up
+@menu
+* Introduction:: what is csp mode
+* Keybindings:: description of the commands and keybindings
+* Customizing:: how to change the behaviour of csp
+* Bugs:: unfortunately is this page not empty
+@end menu
+
+A mode for programming CSP in Emacs.
+
+Designed and written by
+
+@example
+Olaf Bergmann bergmann@@informatik.uni-bremen.de
+Markus Dahlweid dahlweid@@informatik.uni-bremen.de
+Uwe Schulze uschulze@@informatik.uni-bremen.de
+
+@end example
+
+
+
+
+@menu
+* Introduction:: what is csp mode
+* Keybindings:: description of the commands and keybindings
+* Customizing:: how to change the behaviour of csp
+* Bugs:: unfortunately is this page not empty
+
+ --- The Detailed Node Listing ---
+
+
+
+* Introduction:: what is csp mode
+* Keybindings:: description of the commands and keybindings
+* Customizing:: how to change the behaviour of csp
+* Bugs:: unfortunately is this page not empty
+
+
+Introduction
+
+* History::
+@end menu
+
+
+
+
+
+
+
+
+@node Introduction, Keybindings, Top, Top
+@comment node-name, next, previous, up
+@chapter Introduction
+
+Csp-Mode is a major mode for use with Emacs.
+
+@menu
+* History::
+@end menu
+
+@node History, , Introduction, Introduction
+@comment node-name, next, previous, up
+@section History
+
+In winter 1996/1997 there were some students of computer science at the
+University of Bremen, Germany, who felt that there was need of a mode
+for editing CSP-code using the ASCII representation for the
+FDR2-model-checker.
+
+@node Keybindings, Customizing, Introduction, Top
+@comment node-name, next, previous, up
+@chapter Commands and keybindings
+
+As usual for common major modes dealing with program languages, there
+are some often used keys which take care for correct indentation of
+expressions and comments. The indentation itself may be controlled by a
+number of parameters we look at in the following chapter.
+
+@itemize @bullet
+@item
+Pressing @code{TAB} @code{(electric-csp-tab)} as usual indents the current line looking at its
+preceding line. Each tab is converted to spaces if and only if @code{csp-untabify} is set to @code{t}.
+
+@item
+Pressing @code{LFD} @code{(electric-csp-terminate-line)}indents the current line correctly and terminates it. The next line is indented as well.
+
+@item
+@code{C-c C-c} @code{(csp-comment-area)} will comment out the
+currently marked area. This is done by inserting the b-style
+comment-start-sequence @code{--} at the beginning of each in line in the
+current region. If there is already such a character combination,
+nothing is inserted. This may cause problems when you press @code{C-c
+C-c} being in a block-comment since executing the inverse operation
+@code{csp-uncomment-area} will delete all leading
+comment-start-sequence characters.
+
+@item
+@code{C-c C-u} @code{(csp-uncomment-area)} removes all leading
+comment-start-sequence characters in the commented area surrounding the
+current position. The first commented line in this area will be
+searched. The actual ``Area'' is then delimited by the first and the
+last line which have no leading comment-start-sequence (i.e. they even
+might be empty).
+
+@item
+Pressing @code{;} @code{(electric-csp-semi)} and
+@code{csp-auto-newline} is non-nil will cause a semicolon to be
+inserted at the current position. After that, the current line is
+terminated and the following line will be indented correctly.
+
+@ifinfo
+@item
+@code{C->} @code{(electric-csp-arrow)} does the same as
+@code{electric-csp-semi} described before, but the arrow-operator
+@code{->} is inserted at the end of the current line.
+@end ifinfo
+
+@iftex
+@item
+@code{C->} @code{(electric-csp-arrow)} does the same as
+@code{electric-csp-semi} described before, but the arrow-operator
+@tex
+$\rightarrow$ is inserted at the end of the current line.
+@end tex
+@end iftex
+
+@item
+@code{C-c e} @code{(electric-csp-external-choice)} inserts an external
+choice operator @code{[]} at current position.
+
+@item
+@code{C-c l} @code{(electric-csp-interleave)} inserts an interleave
+operator @code{|||} at current position.
+
+@item
+@code{C-c ~} or @code{C-c i} @code{(electric-csp-internal-choice)}
+inserts an internal choice operator @code{|~|} at current position.
+
+@item
+@code{C-c |} or @code{C-c p} @code{(electric-csp-sync)} inserts a
+synchronisation operator @code{[| |]} at current position and places
+the point centered between the two vertical bars.
+
+@item
+@code{C-c @{} or @code{C-c s} @code{(electric-csp-channel-set)}
+inserts a set operator @code{@{| |@}} at current position and places
+the point centered between the two vertical bars.
+
+@item
+@code{C-c C-v} @code{(csp-validate)} invokes the validation command
+specified in @code{csp-validate-command}. If errors occurred, you can
+use @code{next-error} to find the actual code line corresponding to the
+line given in the message.
+
+@end itemize
+
+@node Customizing, Bugs, Keybindings, Top
+@comment node-name, next, previous, up
+@chapter Customizing
+
+This chapter describes the variables you can use to customize the
+behaviour of csp mode. At least there are switches to determine
+whether lines are allowed to be indented or tabs to be converted into
+spaces automatically.
+
+@itemize @bullet
+
+@item
+@code{csp-indent-level} is an integer-value denoting the amount of
+spaces which are inserted when a line is indented with respect to a
+containig block. Its default value is @code{3}.
+
+@item
+If @code{csp-auto-newline} is non-nil, this means that there will be
+inserted a newline automatically after inserting a semicolon or the
+array-operator. The default is set to @code{t}.
+
+@item
+@code{csp-tab-always-indent} means that a @code{TAB} in Csp-mode
+should always reindent the current line, regardless of where in the line
+point is when the @code{TAB} command is used. Default is @code{t}.
+
+@item
+@code{csp-untabify} specifies whether tabs should be converted into
+spaces or not. If @code{t} which is the default value, tabs will be
+converted.
+
+@item
+@code{csp-validate-error-regexps} contains an alist of regular
+expressions to recognize error messages from @code{csp-validate}.
+
+@item
+@code{csp-offer-save}. If this is @code{t}, invocation of
+@code{csp-validate} will cause Emacs to ask whether modified buffers
+should be saved before executing @code{csp-validate}. Default is
+@code{t}.
+
+@item
+@code{csp-validate-command} contains the shell-command to validate the
+CSP program in current buffer. The file name of the buffer will be
+appended, seperated by a space.
+
+@end itemize
+
+@node Bugs, , Customizing, Top
+@comment node-name, next, previous, up
+@chapter Bugs
+
+There are several bugs known by now, but none of them are severe. As for
+the most syntax-controlled programming modes, correct statements will be
+indented correctly, but the result of indenting wrong statements will
+sometimes have funny effects. Fortunately, most of them indicate
+incorrect use of the language's constructs, so this will help you not to
+make too many syntactic errors. However, there still remain some dirty
+effects even if typed syntax is correct. Here is a list of the known bugs:
+
+@itemize @bullet
+
+@item
+Block comments are not recognized correctly if there is a normal comment starting with @code{--} in it.
+
+@end itemize
+
+@bye
View
5 csp-mode.toc
@@ -0,0 +1,5 @@
+\chapentry{Introduction}{1}{2}
+\secentry{History}{1}{1}{2}
+\chapentry{Commands and keybindings}{2}{3}
+\chapentry{Customizing}{3}{4}
+\chapentry{Bugs}{4}{5}
View
0  csp-mode.tp
No changes.
View
0  csp-mode.vr
No changes.
View
2  makefile.pkg
@@ -0,0 +1,2 @@
+PACKAGE = csp-mode
+ELFILES = csp-mode.el
Please sign in to comment.
Something went wrong with that request. Please try again.