Editing .xpi files directly in Emacs

One cool feature of Emacs is that it lets you directly edit the contents of various archive files like .zip, .tar, .lzh, .jar, etc. Out of the box, though, Emacs isn’t setup to edit .xpi files automatically, but it’s easy to correct that since .xpi files are just .zip files in disguise and Emacs is eminently customizable…

Just add this to your ~/.emacs file:

(setq auto-mode-alist (cons '("\\.xpi$" . archive-mode) auto-mode-alist))

Ad: Interested in developing Firefox or Thunderbird extensions? Check
out Creating
Applications with Mozilla
from O’Reilly Books. For more Emacs tips, check out Learning GNU Emacs, also from O’Reilly.

2 thoughts on “Editing .xpi files directly in Emacs

Leave a Reply

Your email address will not be published. Required fields are marked *