changeset 104735:214b3e5da89a

(ldap-search-internal): Use with-current-buffer and push.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Sun, 30 Aug 2009 14:24:09 +0000
parents 714ab1b8092b
children cc62eac5991f
files lisp/ChangeLog lisp/net/ldap.el
diffstat 2 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Aug 30 14:23:21 2009 +0000
+++ b/lisp/ChangeLog	Sun Aug 30 14:24:09 2009 +0000
@@ -1,5 +1,7 @@
 2009-08-30  Stefan Monnier  <monnier@iro.umontreal.ca>
 
+	* net/ldap.el (ldap-search-internal): Use with-current-buffer and push.
+
 	* net/imap.el (imap-send-command): Simplify.
 	(imap-wait-for-tag): point-max - buffer-size.
 
--- a/lisp/net/ldap.el	Sun Aug 30 14:23:21 2009 +0000
+++ b/lisp/net/ldap.el	Sun Aug 30 14:24:09 2009 +0000
@@ -524,8 +524,7 @@
 	    (equal "" filter))
 	(error "No search filter"))
     (setq filter (cons filter attributes))
-    (save-excursion
-      (set-buffer buf)
+    (with-current-buffer buf
       (erase-buffer)
       (if (and host
 	       (not (equal "" host)))
@@ -597,8 +596,7 @@
 	    ;; Do not try to open non-existent files
 	    (if (equal value "")
 		(setq value " ")
-	      (save-excursion
-		(set-buffer bufval)
+	      (with-current-buffer bufval
 		(erase-buffer)
 		(set-buffer-multibyte nil)
 		(insert-file-contents-literally value)
@@ -607,9 +605,9 @@
 	    (setq record (cons (list name value)
 			       record))
 	    (forward-line 1))
-	  (setq result (cons (if withdn
-				 (cons dn (nreverse record))
-			       (nreverse record)) result))
+	  (push (if withdn
+		    (cons dn (nreverse record))
+		  (nreverse record)) result)
 	  (setq record nil)
 	  (skip-chars-forward " \t\n")
 	  (message "Parsing results... %d" numres)