Revision: mange@freemail.hu--2005/emacs-jabber--cvs-head--0--patch-479

Creator:  Magnus Henoch <mange@freemail.hu>

Merge autotools and test suite

Patches applied:

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--base-0
   tag of mange@freemail.hu--2005/emacs-jabber--cvs-head--0--patch-477

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-1
   Add Makefile.am and configure.ac

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-2
   Don't require jabber-muc-nick-completion from jabber-alert, but add an autoload

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-3
   Require external notifiers from jabber.el, not jabber-alert.el

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-4
   External notifiers require jabber-alert when compiling

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-5
   Build autoloads

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-6
   Break lines in Makefile.am

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-7
   Rearrange Makefile.am to avoid circular dependency

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-8
   Remove unnecessary BUILT_SOURCES

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-9
   Add jabber.texi to Makefile.am

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-10
   Maintainer-clean jabber-autoload.el

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-11
   Distribute and install xmppuri.sh

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-12
   Create zip file too

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-13
   Remove explicit autoloads from jabber.el; add corresponding cookies

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-14
   Merge CDATA fix

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-15
   Add comment explaining double-compilation

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-16
   Add test suite

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-17
   Use subdirectory makefile for tests

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-18
   Distribute tests

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-19
   -Wall and -Werror for automake

 * mange@freemail.hu--2005/emacs-jabber--autotools--0--patch-20
   Use makefile variables instead of autoconf ones
This commit is contained in:
Magnus Henoch 2008-04-20 06:21:40 +00:00 committed by Kirill A. Korinskiy
parent a2056a0397
commit f2405e37e6
17 changed files with 102 additions and 48 deletions

36
Makefile.am Normal file
View File

@ -0,0 +1,36 @@
my_lisp_sources=fsm.el jabber-activity.el jabber-ahc-presence.el \
jabber-ahc.el jabber-alert.el jabber-autoaway.el jabber-avatar.el \
jabber-bookmarks.el jabber-browse.el jabber-chat.el \
jabber-chatbuffer.el jabber-chatstates.el jabber-compose.el \
jabber-conn.el jabber-core.el jabber-disco.el jabber-events.el \
jabber-export.el jabber-feature-neg.el jabber-festival.el \
jabber-ft-client.el jabber-ft-common.el jabber-ft-server.el \
jabber-gmail.el jabber-history.el jabber-iq.el jabber-keepalive.el \
jabber-keymap.el jabber-logon.el jabber-menu.el jabber-modeline.el \
jabber-muc-nick-completion.el jabber-muc.el jabber-newdisco.el \
jabber-osd.el jabber-presence.el jabber-private.el jabber-ratpoison.el \
jabber-register.el jabber-roster.el jabber-sasl.el jabber-sawfish.el \
jabber-screen.el jabber-search.el jabber-si-client.el \
jabber-si-common.el jabber-si-server.el jabber-socks5.el \
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-xml.el jabber.el srv.el
dist_lisp_LISP=$(my_lisp_sources) jabber-autoload.el
MAINTAINERCLEANFILES=jabber-autoload.el
# The autoload file will cause Lisp sources to be rebuilt _twice_: the
# timestamp of the Lisp compilation is set _before_ the autoloads are
# regenerated, which means that jabber-autoload.el is once again
# considered new, which means that everything will be built again.
# Suggestions welcome.
jabber-autoload.el: $(my_lisp_sources)
$(EMACS) --batch --eval "(setq generated-autoload-file \"$(abs_builddir)/$@\")" -f batch-update-autoloads $(srcdir)
info_TEXINFOS=jabber.texi
dist_libexec_SCRIPTS = xmppuri.sh
SUBDIRS = . tests

7
configure.ac Normal file
View File

@ -0,0 +1,7 @@
AC_INIT([jabber.el], [0.8.0], [emacs-jabber-general@lists.sourceforge.net], [emacs-jabber])
AM_INIT_AUTOMAKE([-Wall -Werror foreign dist-zip])
AM_PATH_LISPDIR
AC_CONFIG_FILES([Makefile tests/Makefile])
AC_OUTPUT

View File

@ -21,7 +21,6 @@
(require 'jabber-util)
(require 'jabber-muc-nick-completion) ;jabber-muc-looks-like-personal-p needs for define-personal-jabber-alert
(require 'cl)
(defgroup jabber-alerts nil "auditory and visual alerts for jabber events"
@ -276,15 +275,6 @@ Examples:
(define-jabber-alert beep "Beep on event"
(lambda (&rest ignore) (beep)))
;; External notifiers
(require 'jabber-screen)
(require 'jabber-ratpoison)
(require 'jabber-sawfish)
(require 'jabber-festival)
(require 'jabber-xmessage)
(require 'jabber-wmii)
(require 'jabber-osd)
;; Message alert hooks
(defun jabber-message-default-message (from buffer text)
(when (or jabber-message-alert-same-buffer

View File

@ -29,6 +29,7 @@ Bookmarks are what has been retrieved from the server, as list of
XML elements. This is nil if bookmarks have not been retrieved,
and t if no bookmarks where found.")
;;;###autoload
(defun jabber-get-conference-data (jc conference-jid cont &optional key)
"Get bookmark data for CONFERENCE-JID.
KEY may be nil or one of :name, :autojoin, :nick and :password.
@ -65,6 +66,7 @@ The plist may contain the keys :jid, :name, :autojoin,
:password (car (jabber-xml-node-children
(car (jabber-xml-get-children node 'password)))))))
;;;###autoload
(defun jabber-get-bookmarks (jc cont &optional refresh)
"Retrieve bookmarks (if needed) and call CONT.
Arguments to CONT are JC and the bookmark list. CONT will be
@ -99,6 +101,7 @@ on success or failure, respectively."
callback t
callback nil))
;;;###autoload
(defun jabber-edit-bookmarks (jc)
"Create a buffer for editing bookmarks interactively."
(interactive (list (jabber-read-account)))

View File

@ -25,6 +25,7 @@
(defvar jabber-import-subscription-p-widget nil)
;;;###autoload
(defun jabber-export-roster (jc)
"Export roster for connection JC."
(interactive (list (jabber-read-account)))
@ -59,6 +60,7 @@ not affect your actual roster.
(goto-char (point-min))
(switch-to-buffer (current-buffer))))
;;;###autoload
(defun jabber-import-roster (jc file)
"Create buffer for roster import for connection JC from FILE."
(interactive (list (jabber-read-account)

View File

@ -19,6 +19,8 @@
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
(eval-when-compile (require 'jabber-alert))
(condition-case e
(progn
;; Most people don't have Festival, so this will often fail

View File

@ -68,6 +68,7 @@
(assoc room jabber-muc-default-nicknames)))
))
;;;###autoload
(defun jabber-muc-looks-like-personal-p (message &optional group)
"Return non-nil if jabber MESSAGE is addresed to me.
Optional argument GROUP to look."

View File

@ -19,6 +19,8 @@
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
(eval-when-compile (require 'jabber-alert))
(condition-case e
(progn
;; Most people don't have osd.el, so this will often fail

View File

@ -19,6 +19,7 @@
;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02111-1307, USA.
;;;###autoload
(defun jabber-private-get (jc node-name namespace success-callback error-callback)
"Retrieve an item from private XML storage.
The item to retrieve is identified by NODE-NAME (a symbol) and
@ -42,6 +43,7 @@ result."
(car (jabber-xml-node-children
(jabber-iq-query xml-data)))))
;;;###autoload
(defun jabber-private-set (jc fragment &optional
success-callback success-closure-data
error-callback error-closure-data)

View File

@ -18,6 +18,8 @@
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(eval-when-compile (require 'jabber-alert))
(defun jabber-ratpoison-message (msg)
"Show MSG in Ratpoison"
;; Possible errors include not finding the ratpoison binary, and

View File

@ -18,6 +18,8 @@
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(eval-when-compile (require 'jabber-alert))
(defcustom jabber-sawfish-display-time 3
"Time in seconds for displaying a jabber message through the
Sawfish window manager."

View File

@ -18,6 +18,8 @@
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(eval-when-compile (require 'jabber-alert))
(defun jabber-screen-message (msg)
"Show MSG in screen"
(call-process "screen" nil nil nil "-X" "echo" msg))

View File

@ -18,6 +18,8 @@
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(eval-when-compile (require 'jabber-alert))
(defvar jabber-wmii-color "#ffffff #335577 #447799"
"Color specification as needed by the wmii window manager for the jabber alert messages.")

View File

@ -19,6 +19,8 @@
;; along with this program; if not, write to the Free Software
;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
(eval-when-compile (require 'jabber-alert))
(defcustom jabber-xmessage-timeout 15
"Timeout in seconds for xmessage alerts.
Set this to nil to have no timeout."

View File

@ -143,44 +143,17 @@ configure a Google Talk account like this:
(require 'jabber-ft-server)
(require 'jabber-socks5)
;; XXX: automate this some time
(autoload 'jabber-export-roster "jabber-export"
"Create buffer from which roster can be exported to a file."
t)
(autoload 'jabber-import-roster "jabber-export"
"Create buffer for roster import from FILE."
t)
(autoload 'jabber-compose "jabber-compose"
"Create a buffer for composing a Jabber message."
t)
(autoload 'jabber-private-get "jabber-private"
"Retrieve an item from private XML storage.
The item to retrieve is identified by NODE-NAME (a symbol) and
NAMESPACE (a string).
On success, SUCCESS-CALLBACK is called with the retrieved XML fragment.
On error, ERROR-CALLBACK is called with the entire IQ result."
nil)
(autoload 'jabber-private-set "jabber-private"
"Store FRAGMENT in private XML storage.
SUCCESS-CALLBACK, SUCCESS-CLOSURE-DATA, ERROR-CALLBACK and
ERROR-CLOSURE-DATA are used as in `jabber-send-iq'."
nil)
(autoload 'jabber-get-bookmarks "jabber-bookmarks"
"Retrieve bookmarks (if needed) and call CONT.
Arguments to CONT are JC and the bookmark list. CONT will be
called as the result of a filter function or a timer.
If REFRESH is non-nil, always fetch bookmarks."
nil)
(autoload 'jabber-edit-bookmarks "jabber-bookmarks"
"Create a buffer for editing bookmarks interactively."
t)
(autoload 'jabber-get-conference-data "jabber-bookmarks"
"Get bookmark data for CONFERENCE-JID.
KEY may be nil or one of :name, :autojoin, :nick and :password.
If KEY is nil, a plist containing the above keys is returned.
CONT is called when the result is available, with JC and the
result as arguments."
nil)
;; External notifiers
(require 'jabber-screen)
(require 'jabber-ratpoison)
(require 'jabber-sawfish)
(require 'jabber-festival)
(require 'jabber-xmessage)
(require 'jabber-wmii)
(require 'jabber-osd)
(require 'jabber-autoload)
(defvar *jabber-current-status* nil
"the users current presence staus")

3
tests/Makefile.am Normal file
View File

@ -0,0 +1,3 @@
TESTS_ENVIRONMENT = $(EMACS) -batch -L $(top_builddir) -l
TESTS = skip-tag-forward.el
dist_noinst_DATA = $(TESTS)

23
tests/skip-tag-forward.el Normal file
View File

@ -0,0 +1,23 @@
;; Tests for jabber-xml-skip-tag-forward
(require 'jabber-xml)
(require 'cl)
(flet ((parses-p
(text)
(with-temp-buffer
(insert text)
(goto-char (point-min))
(catch 'unfinished
(jabber-xml-skip-tag-forward)
(= (point) (point-max))))))
;; 1. Just plain XML
(unless (parses-p "<stream:features><starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/><mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'><mechanism>ANONYMOUS</mechanism><mechanism>DIGEST-MD5</mechanism><mechanism>PLAIN</mechanism></mechanisms><register xmlns='http://jabber.org/features/iq-register'/></stream:features>")
(error "Testcase 1 failed"))
;; 2. XML with CDATA
(unless (parses-p "<message><body><![CDATA[<foo & bar>]]></body></message>")
(error "Testcase 2 failed")))
;; arch-tag: a99d8666-0e6b-11dd-bd33-000a95c2fcd0