changeset 85229:b5270c62a294

(eudc-display-records) (eudc-filter-duplicate-attributes) (eudc-distribute-field-on-records, eudc-query-form) (eudc-process-form): Use mapc rather than mapcar.
author Glenn Morris <rgm@gnu.org>
date Sat, 13 Oct 2007 03:02:57 +0000
parents 631c2c083474
children e2575abf895a
files lisp/net/eudc.el
diffstat 1 files changed, 34 insertions(+), 34 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/net/eudc.el	Sat Oct 13 03:02:35 2007 +0000
+++ b/lisp/net/eudc.el	Sat Oct 13 03:02:57 2007 +0000
@@ -502,15 +502,15 @@
 		 records))
 	  ;; Display the records
 	  (setq first-record (point))
-	  (mapcar
+	  (mapc
 	   (function
 	    (lambda (record)
 	      (setq beg (point))
 	      ;; Map over the record fields to print the attribute/value pairs
-	      (mapcar (function
-		       (lambda (field)
-			 (eudc-print-record-field field width)))
-		      record)
+	      (mapc (function
+		     (lambda (field)
+		       (eudc-print-record-field field width)))
+		    record)
 	      ;; Store the record internal format in some convenient place
 	      (overlay-put (make-overlay beg (point))
 			   'eudc-record
@@ -540,13 +540,13 @@
     (if (not (and (boundp 'eudc-form-widget-list)
 		  eudc-form-widget-list))
 	(error "Not in a directory query form buffer")
-      (mapcar (function
-	       (lambda (wid-field)
-		 (setq value (widget-value (cdr wid-field)))
-		 (if (not (string= value ""))
-		     (setq query-alist (cons (cons (car wid-field) value)
-					     query-alist)))))
-	      eudc-form-widget-list)
+      (mapc (function
+	     (lambda (wid-field)
+	       (setq value (widget-value (cdr wid-field)))
+	       (if (not (string= value ""))
+		   (setq query-alist (cons (cons (car wid-field) value)
+					   query-alist)))))
+	    eudc-form-widget-list)
       (kill-buffer (current-buffer))
       (eudc-display-records (eudc-query query-alist) eudc-use-raw-directory-names))))
 
@@ -565,15 +565,15 @@
 
     (if (null (eudc-cdar rec))
 	(list record)			; No duplicate attrs in this record
-      (mapcar (function
-	       (lambda (field)
-		 (if (listp (cdr field))
-		     (setq duplicates (cons field duplicates))
-		   (setq unique (cons field unique)))))
-	      record)
+      (mapc (function
+	     (lambda (field)
+	       (if (listp (cdr field))
+		   (setq duplicates (cons field duplicates))
+		 (setq unique (cons field unique)))))
+	    record)
       (setq result (list unique))
       ;; Map over the record fields that have multiple values
-      (mapcar
+      (mapc
        (function
 	(lambda (field)
 	  (let ((method (if (consp eudc-duplicate-attribute-handling-method)
@@ -641,7 +641,7 @@
     (while values
       (setcdr values (delete (car values) (cdr values)))
       (setq values (cdr values)))
-    (mapcar
+    (mapc
      (function
       (lambda (value)
 	(let ((result-list (copy-sequence records)))
@@ -974,11 +974,11 @@
 				   (capitalize (symbol-name field)))))
 			    fields)))
     ;; Loop over prompt strings to find the longest one
-    (mapcar (function
-	     (lambda (prompt)
-		     (if (> (length prompt) width)
-			 (setq width (length prompt)))))
-	    prompts)
+    (mapc (function
+	   (lambda (prompt)
+	     (if (> (length prompt) width)
+		 (setq width (length prompt)))))
+	  prompts)
     ;; Insert the first widget out of the mapcar to leave the cursor
     ;; in the first field
     (widget-insert "\n\n" (format (concat "%" (int-to-string width) "s: ") (car prompts)))
@@ -988,15 +988,15 @@
 				      eudc-form-widget-list))
     (setq fields (cdr fields))
     (setq prompts (cdr prompts))
-    (mapcar (function
-	     (lambda (field)
-	       (widget-insert "\n\n" (format (concat "%" (int-to-string width) "s: ") (car prompts)))
-	       (setq widget (widget-create 'editable-field
-					   :size 15))
-	       (setq eudc-form-widget-list (cons (cons field widget)
-						 eudc-form-widget-list))
-	       (setq prompts (cdr prompts))))
-	    fields)
+    (mapc (function
+	   (lambda (field)
+	     (widget-insert "\n\n" (format (concat "%" (int-to-string width) "s: ") (car prompts)))
+	     (setq widget (widget-create 'editable-field
+					 :size 15))
+	     (setq eudc-form-widget-list (cons (cons field widget)
+					       eudc-form-widget-list))
+	     (setq prompts (cdr prompts))))
+	  fields)
     (widget-insert "\n\n")
     (widget-create 'push-button
 		   :notify (lambda (&rest ignore)