changeset 84919:73311bfc1e1e

(delphi-search-directory, delphi-find-unit-file, delphi-debug-mode-map, delphi-mode-map, delphi-mode): Use `mapc' rather than `mapcar'.
author Juanma Barranquero <lekktu@gmail.com>
date Wed, 26 Sep 2007 00:25:26 +0000
parents 6c8465b69c48
children 0aa483c9d53e
files lisp/progmodes/delphi.el
diffstat 1 files changed, 52 insertions(+), 52 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/delphi.el	Wed Sep 26 00:24:29 2007 +0000
+++ b/lisp/progmodes/delphi.el	Wed Sep 26 00:25:26 2007 +0000
@@ -1677,21 +1677,21 @@
           (unit-file (downcase unit)))
       (catch 'done
         ;; Search for the file.
-        (mapcar #'(lambda (file)
-                    (let ((path (concat dir "/" file)))
-                      (if (and (string= unit-file (downcase file))
-                               (delphi-is-file path))
-                          (throw 'done path))))
-                files)
+        (mapc #'(lambda (file)
+		  (let ((path (concat dir "/" file)))
+		    (if (and (string= unit-file (downcase file))
+			     (delphi-is-file path))
+			(throw 'done path))))
+	      files)
 
         ;; Not found. Search subdirectories.
         (when recurse
-          (mapcar #'(lambda (subdir)
-                      (unless (member subdir '("." ".."))
-                        (let ((path (delphi-search-directory
-                                     unit (concat dir "/" subdir) recurse)))
-                          (if path (throw 'done path)))))
-                  files))
+          (mapc #'(lambda (subdir)
+		    (unless (member subdir '("." ".."))
+		      (let ((path (delphi-search-directory
+				   unit (concat dir "/" subdir) recurse)))
+			(if path (throw 'done path)))))
+		files))
 
         ;; Not found.
         nil))))
@@ -1721,7 +1721,7 @@
           ((stringp delphi-search-path)
            (delphi-find-unit-in-directory unit delphi-search-path))
 
-          ((mapcar
+          ((mapc
               #'(lambda (dir)
                   (let ((file (delphi-find-unit-in-directory unit dir)))
                     (if file (throw 'done file))))
@@ -1888,39 +1888,39 @@
 
 (defvar delphi-debug-mode-map
   (let ((kmap (make-sparse-keymap)))
-    (mapcar #'(lambda (binding) (define-key kmap (car binding) (cadr binding)))
-            '(("n" delphi-debug-goto-next-token)
-              ("p" delphi-debug-goto-previous-token)
-              ("t" delphi-debug-show-current-token)
-              ("T" delphi-debug-tokenize-buffer)
-              ("W" delphi-debug-tokenize-window)
-              ("g" delphi-debug-goto-point)
-              ("s" delphi-debug-show-current-string)
-              ("a" delphi-debug-parse-buffer)
-              ("w" delphi-debug-parse-window)
-              ("f" delphi-debug-fontify-window)
-              ("F" delphi-debug-fontify-buffer)
-              ("r" delphi-debug-parse-region)
-              ("c" delphi-debug-unparse-buffer)
-              ("x" delphi-debug-show-is-stable)
-              ))
+    (mapc #'(lambda (binding) (define-key kmap (car binding) (cadr binding)))
+	  '(("n" delphi-debug-goto-next-token)
+	    ("p" delphi-debug-goto-previous-token)
+	    ("t" delphi-debug-show-current-token)
+	    ("T" delphi-debug-tokenize-buffer)
+	    ("W" delphi-debug-tokenize-window)
+	    ("g" delphi-debug-goto-point)
+	    ("s" delphi-debug-show-current-string)
+	    ("a" delphi-debug-parse-buffer)
+	    ("w" delphi-debug-parse-window)
+	    ("f" delphi-debug-fontify-window)
+	    ("F" delphi-debug-fontify-buffer)
+	    ("r" delphi-debug-parse-region)
+	    ("c" delphi-debug-unparse-buffer)
+	    ("x" delphi-debug-show-is-stable)
+	    ))
     kmap)
   "Keystrokes for delphi-mode debug commands.")
 
 (defvar delphi-mode-map
   (let ((kmap (make-sparse-keymap)))
-    (mapcar #'(lambda (binding) (define-key kmap (car binding) (cadr binding)))
-            (list '("\r" delphi-newline)
-                  '("\t" delphi-tab)
-                  '("\177" backward-delete-char-untabify)
-;;                '("\C-cd" delphi-find-current-def)
-;;                '("\C-cx" delphi-find-current-xdef)
-;;                '("\C-cb" delphi-find-current-body)
-                  '("\C-cu" delphi-find-unit)
-                  '("\M-q" delphi-fill-comment)
-                  '("\M-j" delphi-new-comment-line)
-                  ;; Debug bindings:
-                  (list "\C-c\C-d" delphi-debug-mode-map)))
+    (mapc #'(lambda (binding) (define-key kmap (car binding) (cadr binding)))
+	  (list '("\r" delphi-newline)
+		'("\t" delphi-tab)
+		'("\177" backward-delete-char-untabify)
+;;              '("\C-cd" delphi-find-current-def)
+;;              '("\C-cx" delphi-find-current-xdef)
+;;              '("\C-cb" delphi-find-current-body)
+		'("\C-cu" delphi-find-unit)
+		'("\M-q" delphi-fill-comment)
+		'("\M-j" delphi-new-comment-line)
+		;; Debug bindings:
+		(list "\C-c\C-d" delphi-debug-mode-map)))
     kmap)
   "Keymap used in Delphi mode.")
 
@@ -1981,17 +1981,17 @@
   (set-syntax-table delphi-mode-syntax-table)
 
   ;; Buffer locals:
-  (mapcar #'(lambda (var)
-              (let ((var-symb (car var))
-                    (var-val (cadr var)))
-                (make-local-variable var-symb)
-                (set var-symb var-val)))
-          (list '(indent-line-function delphi-indent-line)
-                '(comment-indent-function delphi-indent-line)
-                '(case-fold-search t)
-                '(delphi-progress-last-reported-point nil)
-                '(delphi-ignore-changes nil)
-                (list 'font-lock-defaults delphi-font-lock-defaults)))
+  (mapc #'(lambda (var)
+	    (let ((var-symb (car var))
+		  (var-val (cadr var)))
+	      (make-local-variable var-symb)
+	      (set var-symb var-val)))
+	(list '(indent-line-function delphi-indent-line)
+	      '(comment-indent-function delphi-indent-line)
+	      '(case-fold-search t)
+	      '(delphi-progress-last-reported-point nil)
+	      '(delphi-ignore-changes nil)
+	      (list 'font-lock-defaults delphi-font-lock-defaults)))
 
   ;; We need to keep track of changes to the buffer to determine if we need
   ;; to retokenize changed text.