[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nnimap 0.86 -> 0.87 patches



Index: nnimap/ChangeLog
diff -c nnimap/ChangeLog:1.152 nnimap/ChangeLog:1.155
*** nnimap/ChangeLog:1.152	Sat Dec 19 14:23:50 1998
--- nnimap/ChangeLog	Mon Dec 21 12:32:13 1998
***************
*** 1,3 ****
--- 1,16 ----
+ 1998-12-21 21:29:46  Simon Josefsson  <jas@pdc.kth.se>
+ 
+ 	* nnimap 0.87 released.
+ 
+ 1998-12-21 21:18:07  Simon Josefsson  <jas@pdc.kth.se>
+ 
+ 	* nnimap.el: `remassoc' and `destructive-plist-to-alist'
+ 	compatibility.
+ 
+ 1998-12-21 21:08:11  Simon Josefsson  <jas@pdc.kth.se>
+ 
+ 	* imap.el: Disable multibyte in buffers.
+ 
  1998-12-19 23:21:02  Simon Josefsson  <jas@pdc.kth.se>
  
  	* nnimap 0.86 released.
Index: nnimap/imap.el
diff -c nnimap/imap.el:1.87 nnimap/imap.el:1.89
*** nnimap/imap.el:1.87	Sat Dec 19 14:28:50 1998
--- nnimap/imap.el	Mon Dec 21 12:26:15 1998
***************
*** 298,303 ****
--- 298,327 ----
    "Random debug spew.")
  
  
+ ;; Utility functions:
+ 
+ (defsubst imap-disable-multibyte ()
+   "Enable multibyte in the current buffer."
+   (when (fboundp 'set-buffer-multibyte)
+     (set-buffer-multibyte nil)))
+ 
+ (defun imap-encode-string (string)
+   ;; xxx make literal if strange characters in string
+   (concat "\"" string "\""))
+ 
+ (defun imap-read-passwd (prompt &rest args)
+   "Read a password using PROMPT. If ARGS, PROMPT is used as an
+ argument to `format'."
+   (let ((prompt (if args
+ 		    (apply 'format prompt args)
+ 		  prompt)))
+     (funcall (if (load "passwd" t)
+ 		 'read-passwd
+ 	       (unless (fboundp 'ange-ftp-read-passwd)
+ 		 (autoload 'ange-ftp-read-passwd "ange-ftp"))
+ 	       'ange-ftp-read-passwd) prompt)))
+ 
+ 
  ;; Server functions; stream stuff:
  
  (defun imap-kerberos4s-p (buffer)
***************
*** 322,327 ****
--- 346,353 ----
  	  (sit-for 1))
  	(and imap-log
  	     (with-current-buffer (get-buffer-create imap-log)
+ 	       (imap-disable-multibyte)
+ 	       (buffer-disable-undo)
  	       (goto-char (point-max))
  	       (insert-buffer (process-buffer process))))
  	(let ((response (match-string 1)))
***************
*** 497,502 ****
--- 523,529 ----
        (if (imap-opened buffer)
  	  (imap-close buffer)
  	(mapc 'make-variable-buffer-local imap-local-variables)
+ 	(imap-disable-multibyte)
  	(buffer-disable-undo))
        (if server (setq imap-server server))
        (if port (setq imap-port port))
***************
*** 824,829 ****
--- 851,858 ----
        (setq cmdstr (concat cmdstr imap-client-eol))
        (and imap-log
  	   (with-current-buffer (get-buffer-create imap-log)
+ 	     (imap-disable-multibyte)
+ 	     (buffer-disable-undo)
  	     (goto-char (point-max))
  	     (insert cmdstr)))
        (process-send-string imap-process cmdstr)
***************
*** 859,864 ****
--- 888,895 ----
      (insert string)
      (and imap-log
  	 (with-current-buffer (get-buffer-create imap-log)
+ 	   (imap-disable-multibyte)
+ 	   (buffer-disable-undo)
  	   (goto-char (point-max))
  	   (insert string)))
      (goto-char (point-min))
***************
*** 1445,1469 ****
  (defun imap-parse-body ()
    ;; xxx: does not handle literals
    (read (current-buffer)))
- 
- 
- ;; Utility functions.
- 
- (defun imap-encode-string (string)
-   ;; xxx make literal if strange characters in string
-   (concat "\"" string "\""))
- 
- (defun imap-read-passwd (prompt &rest args)
-   "Read a password using PROMPT. If ARGS, PROMPT is used as an
- argument to `format'."
-   (let ((prompt (if args
- 		    (apply 'format prompt args)
- 		  prompt)))
-     (funcall (if (load "passwd" t)
- 		 'read-passwd
- 	       (unless (fboundp 'ange-ftp-read-passwd)
- 		 (autoload 'ange-ftp-read-passwd "ange-ftp"))
- 	       'ange-ftp-read-passwd) prompt)))
  
  (when imap-debug ; (untrace-all)
    (require 'trace)
--- 1476,1481 ----
Index: nnimap/nnimap.el
diff -c nnimap/nnimap.el:1.112 nnimap/nnimap.el:1.115
*** nnimap/nnimap.el:1.112	Sat Dec 19 14:23:31 1998
--- nnimap/nnimap.el	Mon Dec 21 12:31:42 1998
***************
*** 96,102 ****
  
  (nnoo-declare nnimap) ; we derive from no one
  
! (defconst nnimap-version "nnimap 0.86")
  
  ;; Various server variables.
  
--- 96,102 ----
  
  (nnoo-declare nnimap) ; we derive from no one
  
! (defconst nnimap-version "nnimap 0.87")
  
  ;; Various server variables.
  
***************
*** 1067,1072 ****
--- 1067,1086 ----
      (or (member "\\*" (imap-mailbox-get 'permanentflags group))
  	(member (nnimap-mark-to-flag mark) (imap-mailbox-get 'permanentflags
  							    group)))))
+ 
+ (eval-and-compile  
+   (if (not (fboundp 'remassoc))
+       (defun remassoc (key alist)
+ 	"Delete by side effect any elements of LIST whose car is
+ `equal' to KEY.  The modified LIST is returned.  If the first member
+ of LIST has a car that is `equal' to KEY, there is no way to remove it
+ by side effect; therefore, write `(setq foo (remassoc key foo))' to be
+ sure of changing the value of `foo'."
+ 	(when alist
+ 	  (if (equal key (caar alist))
+ 	      (cdr alist)
+ 	    (setcdr alist (remassoc key (cdr alist)))
+ 	    alist)))))
    
  (defun nnimap-update-alist-soft (key value alist)
    (if value 
***************
*** 1174,1179 ****
--- 1188,1221 ----
        (error "Expunging only available for nnimap groups"))
      (when (nnimap-possibly-change-group mailbox (cadr method))
        (nnimap-send-command-wait "EXPUNGE" nnimap-server-buffer))))
+ 
+ (eval-and-compile  
+   (if (not (fboundp 'destructive-plist-to-alist)) ;; From XEmacs subr.el 
+       (defun destructive-plist-to-alist (plist)
+ 	"Convert property list PLIST into the equivalent
+ association-list form.  The alist is returned.  This converts from
+ 
+ \(a 1 b 2 c 3)
+ 
+ into
+ 
+ \((a . 1) (b . 2) (c . 3))
+ 
+ The original plist is destroyed in the process of constructing the
+ alist.  See also `plist-to-alist'."
+ 	(let ((head plist)
+ 	      next)
+ 	  (while plist
+ 	    ;; remember the next plist pair.
+ 	    (setq next (cddr plist))
+ 	    ;; make the cons holding the property value into the alist element.
+ 	    (setcdr (cdr plist) (cadr plist))
+ 	    (setcar (cdr plist) (car plist))
+ 	    ;; reattach into alist form.
+ 	    (setcar plist (cdr plist))
+ 	    (setcdr plist next)
+ 	    (setq plist next))
+ 	  head))))
  
  (defun gnus-group-nnimap-edit-acl (group)
    "Edit the Access Control List of current nnimap GROUP."