diff options
| author | Juanma Barranquero | 2007-09-26 00:25:26 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2007-09-26 00:25:26 +0000 |
| commit | febd1e86fc3e3d1cd0c6b9701b52b93637319a48 (patch) | |
| tree | 948b11e88492de6f70151ac5ef7280f675825577 | |
| parent | 88f43129a846b261d4144956bcce59d73e75318b (diff) | |
| download | emacs-febd1e86fc3e3d1cd0c6b9701b52b93637319a48.tar.gz emacs-febd1e86fc3e3d1cd0c6b9701b52b93637319a48.zip | |
(delphi-search-directory, delphi-find-unit-file, delphi-debug-mode-map,
delphi-mode-map, delphi-mode): Use `mapc' rather than `mapcar'.
| -rw-r--r-- | lisp/progmodes/delphi.el | 104 |
1 files changed, 52 insertions, 52 deletions
diff --git a/lisp/progmodes/delphi.el b/lisp/progmodes/delphi.el index 99f03f8a545..6cbef6f426d 100644 --- a/lisp/progmodes/delphi.el +++ b/lisp/progmodes/delphi.el | |||
| @@ -1677,21 +1677,21 @@ before the indent, the point is moved to the indent." | |||
| 1677 | (unit-file (downcase unit))) | 1677 | (unit-file (downcase unit))) |
| 1678 | (catch 'done | 1678 | (catch 'done |
| 1679 | ;; Search for the file. | 1679 | ;; Search for the file. |
| 1680 | (mapcar #'(lambda (file) | 1680 | (mapc #'(lambda (file) |
| 1681 | (let ((path (concat dir "/" file))) | 1681 | (let ((path (concat dir "/" file))) |
| 1682 | (if (and (string= unit-file (downcase file)) | 1682 | (if (and (string= unit-file (downcase file)) |
| 1683 | (delphi-is-file path)) | 1683 | (delphi-is-file path)) |
| 1684 | (throw 'done path)))) | 1684 | (throw 'done path)))) |
| 1685 | files) | 1685 | files) |
| 1686 | 1686 | ||
| 1687 | ;; Not found. Search subdirectories. | 1687 | ;; Not found. Search subdirectories. |
| 1688 | (when recurse | 1688 | (when recurse |
| 1689 | (mapcar #'(lambda (subdir) | 1689 | (mapc #'(lambda (subdir) |
| 1690 | (unless (member subdir '("." "..")) | 1690 | (unless (member subdir '("." "..")) |
| 1691 | (let ((path (delphi-search-directory | 1691 | (let ((path (delphi-search-directory |
| 1692 | unit (concat dir "/" subdir) recurse))) | 1692 | unit (concat dir "/" subdir) recurse))) |
| 1693 | (if path (throw 'done path))))) | 1693 | (if path (throw 'done path))))) |
| 1694 | files)) | 1694 | files)) |
| 1695 | 1695 | ||
| 1696 | ;; Not found. | 1696 | ;; Not found. |
| 1697 | nil)))) | 1697 | nil)))) |
| @@ -1721,7 +1721,7 @@ before the indent, the point is moved to the indent." | |||
| 1721 | ((stringp delphi-search-path) | 1721 | ((stringp delphi-search-path) |
| 1722 | (delphi-find-unit-in-directory unit delphi-search-path)) | 1722 | (delphi-find-unit-in-directory unit delphi-search-path)) |
| 1723 | 1723 | ||
| 1724 | ((mapcar | 1724 | ((mapc |
| 1725 | #'(lambda (dir) | 1725 | #'(lambda (dir) |
| 1726 | (let ((file (delphi-find-unit-in-directory unit dir))) | 1726 | (let ((file (delphi-find-unit-in-directory unit dir))) |
| 1727 | (if file (throw 'done file)))) | 1727 | (if file (throw 'done file)))) |
| @@ -1888,39 +1888,39 @@ comment block. If not in a // comment, just does a normal newline." | |||
| 1888 | 1888 | ||
| 1889 | (defvar delphi-debug-mode-map | 1889 | (defvar delphi-debug-mode-map |
| 1890 | (let ((kmap (make-sparse-keymap))) | 1890 | (let ((kmap (make-sparse-keymap))) |
| 1891 | (mapcar #'(lambda (binding) (define-key kmap (car binding) (cadr binding))) | 1891 | (mapc #'(lambda (binding) (define-key kmap (car binding) (cadr binding))) |
| 1892 | '(("n" delphi-debug-goto-next-token) | 1892 | '(("n" delphi-debug-goto-next-token) |
| 1893 | ("p" delphi-debug-goto-previous-token) | 1893 | ("p" delphi-debug-goto-previous-token) |
| 1894 | ("t" delphi-debug-show-current-token) | 1894 | ("t" delphi-debug-show-current-token) |
| 1895 | ("T" delphi-debug-tokenize-buffer) | 1895 | ("T" delphi-debug-tokenize-buffer) |
| 1896 | ("W" delphi-debug-tokenize-window) | 1896 | ("W" delphi-debug-tokenize-window) |
| 1897 | ("g" delphi-debug-goto-point) | 1897 | ("g" delphi-debug-goto-point) |
| 1898 | ("s" delphi-debug-show-current-string) | 1898 | ("s" delphi-debug-show-current-string) |
| 1899 | ("a" delphi-debug-parse-buffer) | 1899 | ("a" delphi-debug-parse-buffer) |
| 1900 | ("w" delphi-debug-parse-window) | 1900 | ("w" delphi-debug-parse-window) |
| 1901 | ("f" delphi-debug-fontify-window) | 1901 | ("f" delphi-debug-fontify-window) |
| 1902 | ("F" delphi-debug-fontify-buffer) | 1902 | ("F" delphi-debug-fontify-buffer) |
| 1903 | ("r" delphi-debug-parse-region) | 1903 | ("r" delphi-debug-parse-region) |
| 1904 | ("c" delphi-debug-unparse-buffer) | 1904 | ("c" delphi-debug-unparse-buffer) |
| 1905 | ("x" delphi-debug-show-is-stable) | 1905 | ("x" delphi-debug-show-is-stable) |
| 1906 | )) | 1906 | )) |
| 1907 | kmap) | 1907 | kmap) |
| 1908 | "Keystrokes for delphi-mode debug commands.") | 1908 | "Keystrokes for delphi-mode debug commands.") |
| 1909 | 1909 | ||
| 1910 | (defvar delphi-mode-map | 1910 | (defvar delphi-mode-map |
| 1911 | (let ((kmap (make-sparse-keymap))) | 1911 | (let ((kmap (make-sparse-keymap))) |
| 1912 | (mapcar #'(lambda (binding) (define-key kmap (car binding) (cadr binding))) | 1912 | (mapc #'(lambda (binding) (define-key kmap (car binding) (cadr binding))) |
| 1913 | (list '("\r" delphi-newline) | 1913 | (list '("\r" delphi-newline) |
| 1914 | '("\t" delphi-tab) | 1914 | '("\t" delphi-tab) |
| 1915 | '("\177" backward-delete-char-untabify) | 1915 | '("\177" backward-delete-char-untabify) |
| 1916 | ;; '("\C-cd" delphi-find-current-def) | 1916 | ;; '("\C-cd" delphi-find-current-def) |
| 1917 | ;; '("\C-cx" delphi-find-current-xdef) | 1917 | ;; '("\C-cx" delphi-find-current-xdef) |
| 1918 | ;; '("\C-cb" delphi-find-current-body) | 1918 | ;; '("\C-cb" delphi-find-current-body) |
| 1919 | '("\C-cu" delphi-find-unit) | 1919 | '("\C-cu" delphi-find-unit) |
| 1920 | '("\M-q" delphi-fill-comment) | 1920 | '("\M-q" delphi-fill-comment) |
| 1921 | '("\M-j" delphi-new-comment-line) | 1921 | '("\M-j" delphi-new-comment-line) |
| 1922 | ;; Debug bindings: | 1922 | ;; Debug bindings: |
| 1923 | (list "\C-c\C-d" delphi-debug-mode-map))) | 1923 | (list "\C-c\C-d" delphi-debug-mode-map))) |
| 1924 | kmap) | 1924 | kmap) |
| 1925 | "Keymap used in Delphi mode.") | 1925 | "Keymap used in Delphi mode.") |
| 1926 | 1926 | ||
| @@ -1981,17 +1981,17 @@ no args, if that value is non-nil." | |||
| 1981 | (set-syntax-table delphi-mode-syntax-table) | 1981 | (set-syntax-table delphi-mode-syntax-table) |
| 1982 | 1982 | ||
| 1983 | ;; Buffer locals: | 1983 | ;; Buffer locals: |
| 1984 | (mapcar #'(lambda (var) | 1984 | (mapc #'(lambda (var) |
| 1985 | (let ((var-symb (car var)) | 1985 | (let ((var-symb (car var)) |
| 1986 | (var-val (cadr var))) | 1986 | (var-val (cadr var))) |
| 1987 | (make-local-variable var-symb) | 1987 | (make-local-variable var-symb) |
| 1988 | (set var-symb var-val))) | 1988 | (set var-symb var-val))) |
| 1989 | (list '(indent-line-function delphi-indent-line) | 1989 | (list '(indent-line-function delphi-indent-line) |
| 1990 | '(comment-indent-function delphi-indent-line) | 1990 | '(comment-indent-function delphi-indent-line) |
| 1991 | '(case-fold-search t) | 1991 | '(case-fold-search t) |
| 1992 | '(delphi-progress-last-reported-point nil) | 1992 | '(delphi-progress-last-reported-point nil) |
| 1993 | '(delphi-ignore-changes nil) | 1993 | '(delphi-ignore-changes nil) |
| 1994 | (list 'font-lock-defaults delphi-font-lock-defaults))) | 1994 | (list 'font-lock-defaults delphi-font-lock-defaults))) |
| 1995 | 1995 | ||
| 1996 | ;; We need to keep track of changes to the buffer to determine if we need | 1996 | ;; We need to keep track of changes to the buffer to determine if we need |
| 1997 | ;; to retokenize changed text. | 1997 | ;; to retokenize changed text. |