EMACSLIB = $(HOME)/lib/emacs
+EMACS_VERSION := $(shell $(EMACS) 2>&1 -Q --batch --eval \
+ '(message "%s %s" emacs-major-version emacs-minor-version)')
+emacs-version-p = $(shell set -- $(EMACS_VERSION); \
+ if [ $$1 -gt $1 ] || ([ $$1 -eq $1 ] && [ $$2 -ge $2 ]); then \
+ echo t; \
+ fi)
+
ELISP += make-regexp ew-hols
ELISP += mdw-gnus-patch
ELISP += mdw-multiple-cursors
ELISP += git git-blame vc-git stgit quilt
+
+ifeq ($(call emacs-version-p,24,3),t)
ELISP += bracketed-paste
+endif
ELISP += dot-emacs
dot-emacs_DEPS = make-regexp
## Shells.
DOTLINKS += .profile .shell-rc .shell-logout
DOTLINKS += .shrc .rcrc
-DOTLINKS += .zprofile .zshrc .zshenv
-DOTLINKS += .bash_profile .bash_completion .bashrc .inputrc
+DOTLINKS += .zprofile .zshrc .zlogout .zshenv
+DOTLINKS += .bash_profile .bash_completion .bash_logout
+DOTLINKS += .bashrc .inputrc
.bash_profile_SRC = bash-profile
.bash_completion_SRC = bash-completion
+.bash_logout_SRC = shell-logout
+.zlogout_SRC = shell-logout
## Git.
DOTSUBST += .gitconfig
+SCRIPTLINKS += git-copyright-dates
DOTLINKS += .cgrc .tigrc
.gitconfig_SUBSTS = \
$(call substvar,releasekey,$(call mdw-conf,release-key,481334C2))
DOTLINKS += .gdbinit .toprc .aspell.conf
DOTLINKS += .dircolors .colordiffrc .screenrc .tmux.conf
DOTLINKS += .cvsrc .indent.pro .ditz-config
+DOTLINKS += .lftp/rc
+.lftp/rc_SRC = lftp-rc
DOTSUBST += .mykermrc
SCRIPTLINKS += lesspipe.sh
SCRIPTLINKS += xinitcmd lock-screen xshutdown
SCRIPTLINKS += un-backslashify-selection
SCRIPTLINKS += xpra-start-xdummy
+SCRIPTLINKS += play-rawk
DOTCPP += .Xdefaults
Xdefaults_DEFS = -DEMACSWD=$(call mdw-conf,emacs-width,77)
SUBSTS += $(call substvar,profile,$(HERE))
all:: $(addprefix $(HOME)/, $(DOTSUBST))
$(addprefix $(HOME)/, $(subst %,\%,$(DOTSUBST))): $(HOME)/%: \
- $$(call dotsubst-source,$$*,.in) Makefile
+ $$(call dotfile-source,$$*,.in) Makefile
$(call v_tag,SUBST)mkdir -p $(dir $@) && \
rm -f $@.new && \
sed -e "1i\