From fff33826f42e040dad7ef64ea312d85215d3b0a1 Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Fri, 28 Sep 2018 00:20:15 +0100 Subject: [PATCH] Use srv.el from package repository srv.el is now a separate package in MELPA, so let's depend on that. Keep a copy in jabber-fallback-lib for the time being. --- Makefile.am | 5 +++-- jabber-conn.el | 11 ++++++++++- srv.el => jabber-fallback-lib/srv.el | 0 jabber-pkg.el.in | 2 +- 4 files changed, 14 insertions(+), 4 deletions(-) rename srv.el => jabber-fallback-lib/srv.el (100%) diff --git a/Makefile.am b/Makefile.am index 5eed578..7df29d0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,9 +23,10 @@ jabber-time.el jabber-truncate.el jabber-util.el \ jabber-vcard-avatars.el jabber-vcard.el jabber-version.el \ jabber-watch.el jabber-widget.el jabber-wmii.el jabber-xmessage.el \ jabber-muc-nick-coloring.el \ -jabber-xml.el jabber.el srv.el jabber-tmux.el jabber-ourversion.el +jabber-xml.el jabber.el jabber-tmux.el jabber-ourversion.el -compat_lisp_sources = jabber-fallback-lib/hexrgb.el jabber-fallback-lib/fsm.el +compat_lisp_sources = jabber-fallback-lib/hexrgb.el jabber-fallback-lib/fsm.el \ + jabber-fallback-lib/srv.el dist_lisp_LISP=$(my_lisp_sources) $(compat_lisp_sources) jabber-autoloads.el MAINTAINERCLEANFILES=jabber-autoloads.el diff --git a/jabber-conn.el b/jabber-conn.el index 6a4c2d5..ab88a89 100644 --- a/jabber-conn.el +++ b/jabber-conn.el @@ -36,7 +36,16 @@ (ignore-errors (require 'starttls)) -(require 'srv) +(eval-and-compile + (or (ignore-errors (require 'srv)) + (ignore-errors + (let ((load-path (cons (expand-file-name + "jabber-fallback-lib" + (file-name-directory (locate-library "jabber"))) + load-path))) + (require 'srv))) + (error + "srv not found in `load-path' or jabber-fallback-lib/ directory."))) (defgroup jabber-conn nil "Jabber Connection Settings" :group 'jabber) diff --git a/srv.el b/jabber-fallback-lib/srv.el similarity index 100% rename from srv.el rename to jabber-fallback-lib/srv.el diff --git a/jabber-pkg.el.in b/jabber-pkg.el.in index bcd7f48..43067fa 100644 --- a/jabber-pkg.el.in +++ b/jabber-pkg.el.in @@ -1,5 +1,5 @@ ;; For ELPA: http://tromey.com/elpa/ (define-package "jabber" "@PACKAGE_VERSION@" "A Jabber client for Emacs." - '((fsm "0.2"))) + '((fsm "0.2") (srv "0.2"))) ;; arch-tag: fa652136-12f7-11dd-b4c4-000a95c2fcd0