Mercurial > emacs
diff lisp/net/ldap.el @ 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 | a9dc0e7c3f2b |
children | 1d1d5d9bd884 |
line wrap: on
line diff
--- 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)