changeset 84927:40125c532944

(table--generate-source-epilogue, table-insert, table--generate-source-cells-in-a-row, table--make-cell-map, *table--cell-describe-bindings): Use `mapc' rather than `mapcar'.
author Juanma Barranquero <lekktu@gmail.com>
date Wed, 26 Sep 2007 00:34:07 +0000
parents a3f296488aca
children 2d6454dca5fb
files lisp/textmodes/table.el
diffstat 1 files changed, 41 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/table.el	Wed Sep 26 00:32:27 2007 +0000
+++ b/lisp/textmodes/table.el	Wed Sep 26 00:34:07 2007 +0000
@@ -1376,7 +1376,7 @@
 ;;
 
 ;; Point Motion Only Group
-(mapcar
+(mapc
  (lambda (command)
    (let ((func-symbol (intern (format "*table--cell-%s" command)))
 	 (doc-string (format "Table remapped function for `%s'." command)))
@@ -1409,7 +1409,7 @@
    backward-paragraph))
 
 ;; Extraction Group
-(mapcar
+(mapc
  (lambda (command)
    (let ((func-symbol (intern (format "*table--cell-%s" command)))
 	 (doc-string (format "Table remapped function for `%s'." command)))
@@ -1443,7 +1443,7 @@
    backward-kill-sexp))
 
 ;; Pasting Group
-(mapcar
+(mapc
  (lambda (command)
    (let ((func-symbol (intern (format "*table--cell-%s" command)))
 	 (doc-string (format "Table remapped function for `%s'." command)))
@@ -1469,7 +1469,7 @@
    insert))
 
 ;; Formatting Group
-(mapcar
+(mapc
  (lambda (command)
    (let ((func-symbol (intern (format "*table--cell-%s" command)))
 	 (doc-string (format "Table remapped function for `%s'." command)))
@@ -1641,20 +1641,20 @@
   (if (numberp cell-width) (setq cell-width (cons cell-width nil)))
   (if (numberp cell-height) (setq cell-height (cons cell-height nil)))
   ;; test validity of the arguments.
-  (mapcar (lambda (arg)
-	    (let* ((value (symbol-value arg))
-		   (error-handler
-		    (function (lambda ()
-				(error "%s must be a positive integer%s" arg
-				       (if (listp value) " or a list of positive integers" ""))))))
-	      (if (null value) (funcall error-handler))
-	      (mapcar (function (lambda (arg1)
-				  (if (or (not (integerp arg1))
-					  (< arg1 1))
-				      (funcall error-handler))))
-		      (if (listp value) value
-			(cons value nil)))))
-	  '(columns rows cell-width cell-height))
+  (mapc (lambda (arg)
+	  (let* ((value (symbol-value arg))
+		 (error-handler
+		  (function (lambda ()
+		    (error "%s must be a positive integer%s" arg
+			   (if (listp value) " or a list of positive integers" ""))))))
+	    (if (null value) (funcall error-handler))
+	    (mapcar (function (lambda (arg1)
+		      (if (or (not (integerp arg1))
+			      (< arg1 1))
+			  (funcall error-handler))))
+		    (if (listp value) value
+		      (cons value nil)))))
+	'(columns rows cell-width cell-height))
   (let ((orig-coord (table--get-coordinate))
 	(coord (table--get-coordinate))
 	r i cw ch cell-str border-str)
@@ -3141,7 +3141,7 @@
       (set-marker-insertion-type (table-get-source-info 'colspec-marker) t) ;; insert before
       (save-excursion
 	(goto-char (table-get-source-info 'colspec-marker))
-	(mapcar
+	(mapc
 	 (lambda (col)
 	   (insert (format "    <colspec colnum=\"%d\" colname=\"c%d\"/>\n" col col)))
 	 (sort (table-get-source-info 'colnum-list) '<)))
@@ -3223,11 +3223,11 @@
 	      (if (> colspan 1)
 		  (let ((scol (table-get-source-info 'current-column))
 			(ecol (+ (table-get-source-info 'current-column) colspan -1)))
-		    (mapcar (lambda (col)
-			      (unless (memq col (table-get-source-info 'colnum-list))
-				(table-put-source-info 'colnum-list
-						       (cons col (table-get-source-info 'colnum-list)))))
-			    (list scol ecol))
+		    (mapc (lambda (col)
+			    (unless (memq col (table-get-source-info 'colnum-list))
+			      (table-put-source-info 'colnum-list
+						     (cons col (table-get-source-info 'colnum-list)))))
+			  (list scol ecol))
 		    (insert (format " namest=\"c%d\" nameend=\"c%d\"" scol ecol))))
 	      (if (> rowspan 1) (insert (format " morerows=\"%d\"" (1- rowspan))))
 	      (if (and alignment
@@ -3910,19 +3910,19 @@
 	  (remap-alist table-command-remap-alist))
       ;; table-command-prefix mode specific bindings
       (if (vectorp table-command-prefix)
-	  (mapcar (lambda (binding)
-		    (let ((seq (copy-sequence (car binding))))
-		      (and (vectorp seq)
-			   (listp (aref seq 0))
-			   (eq (car (aref seq 0)) 'control)
-			   (progn
-			     (aset seq 0 (cadr (aref seq 0)))
-			     (define-key map (vconcat table-command-prefix seq) (cdr binding))))))
-		  table-cell-bindings))
+	  (mapc (lambda (binding)
+		  (let ((seq (copy-sequence (car binding))))
+		    (and (vectorp seq)
+			 (listp (aref seq 0))
+			 (eq (car (aref seq 0)) 'control)
+			 (progn
+			   (aset seq 0 (cadr (aref seq 0)))
+			   (define-key map (vconcat table-command-prefix seq) (cdr binding))))))
+		table-cell-bindings))
       ;; shorthand control bindings
-      (mapcar (lambda (binding)
-		(define-key map (car binding) (cdr binding)))
-	      table-cell-bindings)
+      (mapc (lambda (binding)
+	      (define-key map (car binding) (cdr binding)))
+	    table-cell-bindings)
       ;; remap normal commands to table specific version
       (while remap-alist
 	(define-key map (vector 'remap (caar remap-alist)) (cdar remap-alist))
@@ -4092,11 +4092,11 @@
 ---             -------
 
 ")
-      (mapcar (lambda (binding)
-		(princ (format "%-16s%s\n"
-			       (key-description (car binding))
-			       (cdr binding))))
-	      table-cell-bindings)
+      (mapc (lambda (binding)
+	      (princ (format "%-16s%s\n"
+			     (key-description (car binding))
+			     (cdr binding))))
+	    table-cell-bindings)
       (print-help-return-message))))
 
 (defun *table--cell-dabbrev-expand (arg)