emacs: Use makefile-gmake-mode in Makefile*s Use `makefile-gmake-mode' instead of `makefile-mode' because the former also highlights ifdef et al. while the latter does not. "./Makefile.global" and one "Makefile.local" failed to specify any major mode at all but doing so is necessary because Emacs does not automatically figure out that these are Makefiles (of any flavor).
completion: more complete completion for zsh. This adds completion files for zsh that cover most of notmuch's cli. The files in completion/zsh are formatted so that they can be found by zsh's completion system if put $fpath. They are also registered to the notmuch-* pattern, so they can be called externally using _dispatch. Update installation recipe and drop debian/notmuch.examples to avoid breakage. This means zsh completion is not installed for debian, to be fixed in a future commit. Amended by db: use regexp searching for address completion. This seems to be fast enough to work without a cache.
build: Add support for non-source-directory builds. Such as: mkdir build cd build ../configure make This is implemented by having the configure script set a srcdir variable in Makefile.config, and then sprinkling $(srcdir) into various make rules. We also use vpath directives to convince GNU make to find the source files from the original source directory.
Makefile: Quote variables used as filenames in shell commands This allows support for filenames with spaces in them.
Fix installation of zsh completion
configure: add options to disable emacs/zsh/bash and choose install dir. add --bashcompletiondir and --zshcompletiondir (like --emacslispdir) to choose installation dir for bash/zsh completion files Make some features optional: --without-emacs / --with-emacs=no do not install lisp file --without-bash-completion / --with-bash-completion=no do not install bash files --without-zsh-completion / --with-zsh-completion=no do not install zsh files By default, everything is enabled. You can reenable something with --with-feature=yes
Makefile: Move the completion-specific commands to completion/Makefile.local For much better modularity.