Skip to content
An Emacs mode writing in the Pollen Markup language
Emacs Lisp
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Pollen Mode

An Emacs mode for writing files in the Pollen Markup language. For now, it only provides simple syntax highlighting via font-lock. Feel free to add more features and submit a pull request.

The code is based on Xah Lee's Emacs Major Mode tutorial and the Scribble Emacs mode.


Download pollen-mode to your emacs lisp directory.

    git clone ~/.emacs.d/lisp/pollen-mode

Then add the following to ~/.emacs.d/init.el:

	(add-to-list 'load-path (expand-file-name "lisp/pollen-mode" user-emacs-directory))
    (autoload 'pollen-mode "pollen" "A major mode for the pollen preprocessor." t)

Restart emacs. pollen-mode should activate when you open a file with a .pp extension.

Syntax highlighting

Currently the mode provides the following syntax highlighting using Emacs' predefined font-lock faces:

  • Tag names beginning with ◊ (lozenge) are highlighted as function names.
  • Attribute keys starting with a single quote or backtick are highlighted as constants.
  • Quote-delimited strings in attributes (or in the Racket-mode argument to tags) are highlighted as strings.
  • The #lang language line is highlighted as a preprocessor directive.
You can’t perform that action at this time.