From: Mark Wooding Date: Mon, 14 Aug 2017 17:14:54 +0000 (+0100) Subject: Makefile: Only set up `bracketed-paste' on Emacs 24.3 or later. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/profile/commitdiff_plain/486623cb8d2a0c229b36a81f6fc03ef9e093ae93 Makefile: Only set up `bracketed-paste' on Emacs 24.3 or later. It depends on `cl-macs', which only became its own proper library in 24.2.90. The tricky part was the new machinery to discover the Emacs version in detail. --- diff --git a/Makefile b/Makefile index 7668ee2..342f3ef 100644 --- a/Makefile +++ b/Makefile @@ -68,11 +68,21 @@ ifneq ($(EMACS),nil) 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