summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Henoch <mange@freemail.hu>2008-04-20 06:21:40 +0000
committerKirill A. Korinskiy <catap@catap.ru>2008-04-20 06:21:40 +0000
commitf2405e37e63247b0df867fa756f50b0b5ce5c568 (patch)
tree639393484939c3d0d8ac120fc4c345c5c2e3dbf9
parenta2056a03978453967ad12802fe83a095e65c3352 (diff)
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
-rw-r--r--Makefile.am36
-rw-r--r--configure.ac7
-rw-r--r--jabber-alert.el10
-rw-r--r--jabber-bookmarks.el3
-rw-r--r--jabber-export.el2
-rw-r--r--jabber-festival.el2
-rw-r--r--jabber-muc-nick-completion.el1
-rw-r--r--jabber-osd.el2
-rw-r--r--jabber-private.el2
-rw-r--r--jabber-ratpoison.el2
-rw-r--r--jabber-sawfish.el2
-rw-r--r--jabber-screen.el2
-rw-r--r--jabber-wmii.el2
-rw-r--r--jabber-xmessage.el2
-rw-r--r--jabber.el49
-rw-r--r--tests/Makefile.am3
-rw-r--r--tests/skip-tag-forward.el23
17 files changed, 102 insertions, 48 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..ce899dd
--- /dev/null
+++ b/Makefile.am
@@ -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
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..3321311
--- /dev/null
+++ b/configure.ac
@@ -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
diff --git a/jabber-alert.el b/jabber-alert.el
index e47f952..be2b6f4 100644
--- a/jabber-alert.el
+++ b/jabber-alert.el
@@ -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
diff --git a/jabber-bookmarks.el b/jabber-bookmarks.el
index 53adc4a..9fc4277 100644
--- a/jabber-bookmarks.el
+++ b/jabber-bookmarks.el
@@ -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)))
diff --git a/jabber-export.el b/jabber-export.el
index 0b34bd9..63b7df5 100644
--- a/jabber-export.el
+++ b/jabber-export.el
@@ -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)
diff --git a/jabber-festival.el b/jabber-festival.el
index 23b0b96..82b80f0 100644
--- a/jabber-festival.el
+++ b/jabber-festival.el
@@ -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
diff --git a/jabber-muc-nick-completion.el b/jabber-muc-nick-completion.el
index 8357426..70869f4 100644
--- a/jabber-muc-nick-completion.el
+++ b/jabber-muc-nick-completion.el
@@ -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."
diff --git a/jabber-osd.el b/jabber-osd.el
index 54c8718..ce0b0e2 100644
--- a/jabber-osd.el
+++ b/jabber-osd.el
@@ -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
diff --git a/jabber-private.el b/jabber-private.el
index 0c0b143..d748f0f 100644
--- a/jabber-private.el
+++ b/jabber-private.el
@@ -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)
diff --git a/jabber-ratpoison.el b/jabber-ratpoison.el
index 141f290..910ca0c 100644
--- a/jabber-ratpoison.el
+++ b/jabber-ratpoison.el
@@ -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
diff --git a/jabber-sawfish.el b/jabber-sawfish.el
index 6da7ed3..15546f5 100644
--- a/jabber-sawfish.el
+++ b/jabber-sawfish.el
@@ -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."
diff --git a/jabber-screen.el b/jabber-screen.el
index 7b00320..851aba2 100644
--- a/jabber-screen.el
+++ b/jabber-screen.el
@@ -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))
diff --git a/jabber-wmii.el b/jabber-wmii.el
index 5446618..b5df044 100644
--- a/jabber-wmii.el
+++ b/jabber-wmii.el
@@ -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.")
diff --git a/jabber-xmessage.el b/jabber-xmessage.el
index af18bed..814593a 100644
--- a/jabber-xmessage.el
+++ b/jabber-xmessage.el
@@ -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."
diff --git a/jabber.el b/jabber.el
index 7781709..4e0545a 100644
--- a/jabber.el
+++ b/jabber.el
@@ -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")
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..3892e34
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,3 @@
+TESTS_ENVIRONMENT = $(EMACS) -batch -L $(top_builddir) -l
+TESTS = skip-tag-forward.el
+dist_noinst_DATA = $(TESTS)
diff --git a/tests/skip-tag-forward.el b/tests/skip-tag-forward.el
new file mode 100644
index 0000000..2e7bf44
--- /dev/null
+++ b/tests/skip-tag-forward.el
@@ -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