0
0
Fork 0
forked from lix-project/lix
lix/misc/emacs
Eelco Dolstra 95c74eae26 Allow dashes in identifiers
In Nixpkgs, the attribute in all-packages.nix corresponding to a
package is usually equal to the package name.  However, this doesn't
work if the package contains a dash, which is fairly common.  The
convention is to replace the dash with an underscore (e.g. "dbus-lib"
becomes "dbus_glib"), but that's annoying.  So now dashes are valid in
variable / attribute names, allowing you to write:

  dbus-glib = callPackage ../development/libraries/dbus-glib { };

and

  buildInputs = [ dbus-glib ];

Since we don't have a negation or subtraction operation in Nix, this
is unambiguous.
2012-09-27 15:49:20 -04:00
..
Makefile.am * Support for srcdir != builddir (NIX-41). 2006-05-12 11:47:45 +00:00
nix-mode.el Allow dashes in identifiers 2012-09-27 15:49:20 -04:00
README * README for the Emacs mode (written a while ago, but forgot to commit). 2004-06-20 19:08:59 +00:00

The Nix Emacs mode supports syntax highlighting, somewhat sensible
indenting, and refilling of comments.

To enable Nix mode in Emacs, add something like this to your ~/.emacs
file:

  (load "/nix/share/emacs/site-lisp/nix-mode.el")

This automatically causes Nix mode to be activated for all files with
extension `.nix'.