;;; sieve-manage.el --- Implementation of the managesive protocol in elisp
;; Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-;; 2008 Free Software Foundation, Inc.
+;; 2008, 2009, 2010 Free Software Foundation, Inc.
;; Author: Simon Josefsson <simon@josefsson.org>
;; Internal utility functions
-(defsubst sieve-manage-disable-multibyte ()
+(defmacro sieve-manage-disable-multibyte ()
"Enable multibyte in the current buffer."
- (when (fboundp 'set-buffer-multibyte)
- (set-buffer-multibyte nil)))
+ (unless (featurep 'xemacs)
+ '(set-buffer-multibyte nil)))
(declare-function password-read "password-cache" (prompt &optional key))
(declare-function password-cache-add "password-cache" (key password))
(defun sieve-sasl-auth (buffer mech)
"Login to server using the SASL MECH method."
(message "sieve: Authenticating using %s..." mech)
- (if (sieve-manage-interactive-login
+ (if (sieve-manage-interactive-login
buffer
(lambda (user passwd)
(let (client step tag data rsp)
sieve-manage-capability))
(push (list str) sieve-manage-capability))
(forward-line)))
- (when (re-search-forward (concat "^OK" sieve-manage-server-eol) nil t)
+ (when (re-search-forward (concat "^OK.*" sieve-manage-server-eol) nil t)
(setq sieve-manage-state 'nonauth)))
(defalias 'sieve-manage-parse-greeting-1 'sieve-manage-parse-capability-1)
(provide 'sieve-manage)
-;; arch-tag: 321c4640-1371-4495-9baf-8ccb71dd5bd1
;; sieve-manage.el ends here