diff options
| author | Glenn Morris | 2013-06-21 20:35:51 -0400 |
|---|---|---|
| committer | Glenn Morris | 2013-06-21 20:35:51 -0400 |
| commit | 3d94f3ad819bb61ec54e8ed5b905aa28368b02eb (patch) | |
| tree | ff67e4b15eeac88ce41cb91dc4e2aceac9beabcc | |
| parent | f72e2fdb68783ddebadca00a6af59e24d85769a2 (diff) | |
| download | emacs-3d94f3ad819bb61ec54e8ed5b905aa28368b02eb.tar.gz emacs-3d94f3ad819bb61ec54e8ed5b905aa28368b02eb.zip | |
* lisp/progmodes/gdb-mi.el (gdb-mapcar*): Remove, replace with cl-mapcar.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/progmodes/gdb-mi.el | 20 |
2 files changed, 7 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 62e15d5c948..223620b6f48 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2013-06-22 Glenn Morris <rgm@fencepost.gnu.org> | ||
| 2 | |||
| 3 | * progmodes/gdb-mi.el (gdb-mapcar*): Remove, replace with cl-mapcar. | ||
| 4 | |||
| 1 | 2013-06-22 Dmitry Gutov <dgutov@yandex.ru> | 5 | 2013-06-22 Dmitry Gutov <dgutov@yandex.ru> |
| 2 | 6 | ||
| 3 | * progmodes/ruby-mode.el (auto-mode-alist): Do not use | 7 | * progmodes/ruby-mode.el (auto-mode-alist): Do not use |
diff --git a/lisp/progmodes/gdb-mi.el b/lisp/progmodes/gdb-mi.el index 0b52302a98d..2c4d6a0e3d7 100644 --- a/lisp/progmodes/gdb-mi.el +++ b/lisp/progmodes/gdb-mi.el | |||
| @@ -2642,20 +2642,6 @@ Return position where LINE begins." | |||
| 2642 | (row-properties nil) | 2642 | (row-properties nil) |
| 2643 | (right-align nil)) | 2643 | (right-align nil)) |
| 2644 | 2644 | ||
| 2645 | (defun gdb-mapcar* (function &rest seqs) | ||
| 2646 | "Apply FUNCTION to each element of SEQS, and make a list of the results. | ||
| 2647 | If there are several SEQS, FUNCTION is called with that many | ||
| 2648 | arguments, and mapping stops as soon as the shortest list runs | ||
| 2649 | out." | ||
| 2650 | (let ((shortest (apply #'min (mapcar #'length seqs)))) | ||
| 2651 | (mapcar (lambda (i) | ||
| 2652 | (apply function | ||
| 2653 | (mapcar | ||
| 2654 | (lambda (seq) | ||
| 2655 | (nth i seq)) | ||
| 2656 | seqs))) | ||
| 2657 | (number-sequence 0 (1- shortest))))) | ||
| 2658 | |||
| 2659 | (defun gdb-table-add-row (table row &optional properties) | 2645 | (defun gdb-table-add-row (table row &optional properties) |
| 2660 | "Add ROW of string to TABLE and recalculate column sizes. | 2646 | "Add ROW of string to TABLE and recalculate column sizes. |
| 2661 | 2647 | ||
| @@ -2673,7 +2659,7 @@ calling `gdb-table-string'." | |||
| 2673 | (setf (gdb-table-row-properties table) | 2659 | (setf (gdb-table-row-properties table) |
| 2674 | (append row-properties (list properties))) | 2660 | (append row-properties (list properties))) |
| 2675 | (setf (gdb-table-column-sizes table) | 2661 | (setf (gdb-table-column-sizes table) |
| 2676 | (gdb-mapcar* (lambda (x s) | 2662 | (cl-mapcar (lambda (x s) |
| 2677 | (let ((new-x | 2663 | (let ((new-x |
| 2678 | (max (abs x) (string-width (or s ""))))) | 2664 | (max (abs x) (string-width (or s ""))))) |
| 2679 | (if right-align new-x (- new-x)))) | 2665 | (if right-align new-x (- new-x)))) |
| @@ -2688,11 +2674,11 @@ calling `gdb-table-string'." | |||
| 2688 | (let ((column-sizes (gdb-table-column-sizes table))) | 2674 | (let ((column-sizes (gdb-table-column-sizes table))) |
| 2689 | (mapconcat | 2675 | (mapconcat |
| 2690 | 'identity | 2676 | 'identity |
| 2691 | (gdb-mapcar* | 2677 | (cl-mapcar |
| 2692 | (lambda (row properties) | 2678 | (lambda (row properties) |
| 2693 | (apply 'propertize | 2679 | (apply 'propertize |
| 2694 | (mapconcat 'identity | 2680 | (mapconcat 'identity |
| 2695 | (gdb-mapcar* (lambda (s x) (gdb-pad-string s x)) | 2681 | (cl-mapcar (lambda (s x) (gdb-pad-string s x)) |
| 2696 | row column-sizes) | 2682 | row column-sizes) |
| 2697 | sep) | 2683 | sep) |
| 2698 | properties)) | 2684 | properties)) |