Function: ede-project-sort-targets-list

ede-project-sort-targets-list is a byte-compiled function defined in custom.el.gz.

Signature

(ede-project-sort-targets-list)

Documentation

Sort the target list while using ede-project-sort-targets.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/ede/custom.el.gz
(defun ede-project-sort-targets-list ()
  "Sort the target list while using `ede-project-sort-targets'."
  (save-excursion
    (let ((targets (oref ede-object-project targets))
          (inhibit-read-only t)
          (inhibit-modification-hooks t))
      (goto-char (point-min))
      (forward-line 2)
      (delete-region (point) (point-max))
      (dotimes (count (length targets))
        (if (> count 0)
            (widget-create 'push-button
                           :notify (lambda (&rest _ignore)
                                     (let ((cur ede-project-sort-targets-order))
                                       (add-to-ordered-list
                                        'ede-project-sort-targets-order
                                        (nth count cur)
                                        (1- count))
                                       (add-to-ordered-list
                                        'ede-project-sort-targets-order
                                        (nth (1- count) cur) count))
                                     (ede-project-sort-targets-list))
                           " Up ")
          (widget-insert "      "))
        (if (< count (1- (length targets)))
            (widget-create 'push-button
                           :notify (lambda (&rest _ignore)
                                     (let ((cur ede-project-sort-targets-order))
                                       (add-to-ordered-list
                                        'ede-project-sort-targets-order
                                        (nth count cur) (1+ count))
                                       (add-to-ordered-list
                                        'ede-project-sort-targets-order
                                        (nth (1+ count) cur) count))
                                     (ede-project-sort-targets-list))
                           " Down ")
          (widget-insert "        "))
        (widget-insert (concat " " (number-to-string (1+ count)) ".:   "
                               (oref (nth (nth count ede-project-sort-targets-order)
                                          targets)
                                     name)
                               "\n"))))))