picolisp-mode

https://github.com/flexibeast/picolisp-mode.git

git clone 'git://github.com/flexibeast/picolisp-mode.git'
2

picolisp-mode - Major mode for PicoLisp programming

Author: Alexis mailto:flexibeast@gmail.com
URL: https://github.com/flexibeast/picolisp-mode

picolisp-mode provides a major mode for PicoLisp programming.

This package is not based on, nor connected with, the PicoLisp support for Emacs provided in the PicoLisp distribution, or the more recently updated version of that support. At this stage, the main advantages provided by this package are:

Table of Contents

Features

Installation

Install picolisp-mode from MELPA, or put the picolisp-mode folder in your load-path and do a (require 'picolisp-mode).

Usage

Syntax highlighting

Enable syntax highlighting for a PicoLisp source buffer with M-x picolisp-mode.

REPL

Start a pil REPL session with M-x picolisp-repl or, from a picolisp-mode buffer, with C-c C-r (picolisp-repl).

Documentation

Access documentation for the function at point with C-c C-d (picolisp-describe-symbol). By default, documentation will be displayed via the lynx HTML browser. However, one can set the value of picolisp-documentation-method to either a string containing the absolute path to an alternative browser, or - for users of Emacs 24.4 and above - to the symbol picolisp--shr-documentation; this function uses the shr library to display the documentation in an Emacs buffer. The absolute path to the documentation is specified via picolisp-documentation-directory, and defaults to /usr/share/picolisp/doc/.

ElDoc support is available; note, however, that documentation is not yet accessible for some symbols - in particular, the c[ad]*ar functions - due to edge-cases in the reference documentation structure.

Commenting

Comment a region in a picolisp-mode buffer with C-c C-; (picolisp-comment-region); uncomment a region in a picolisp-mode buffer with C-c C-: (picolisp-uncomment-region). By default one ‘#’ character is added/removed; to specify more, supply a numeric prefix argument to either command.

Indentation

Indent a region in a picolisp-mode buffer with C-c M-q (picolisp-indent-region). Indentation is done via the pilIndent script provided with the current PicoLisp distribution; the path to the script is specified via the picolisp-pilindent-executable variable.

Miscellaneous

SLIME users should read the below note on SLIME.

The various customisation options, including the faces used for syntax highlighting, are available via the picolisp customize-group.

A note on syntax highlighting

PicoLisp's creator is opposed to syntax highlighting of symbols in PicoLisp, for good reasons. However, some - such as the author of this package! - feel that, even taking such issues into consideration, the benefits can outweigh the costs. (For example, when learning PicoLisp, it can be useful to get immediate visual feedback about unintentionally redefining a PicoLisp ‘builtin’.) To accommodate both views, syntax highlighting can be enabled or disabled via the picolisp-syntax-highlighting-p variable; by default, it is set to t (enabled).

A note on SLIME

The design of SLIME is such that it can override picolisp-mode functionality. (The documentation for picolisp--disable-slime-modes provides details.) The user-customisable variable picolisp-disable-slime-p specifies whether to override these overrides, and defaults to t.

TODO

Issues / bugs

If you discover an issue or bug in picolisp-mode not already noted:

please create a new issue with as much detail as possible, including:

License

GNU General Public License version 3, or (at your option) any later version.

— Converted from picolisp-mode.el by el2markdown.