
(setq mode-line-format (delete 'global-mode-string default-mode-line-format))
;;(setq mode-line-format (delete "   " default-mode-line-format))

(defun d--mapcar--default-mode-line-format (arg)
  (let ((match-1-a "   %[(")
        (match-1-b "  %[(")
        (match-2   ")%]--"))
    (cond
     ((and (stringp arg)
           (string= arg match-1-a))
      (list match-1-b))
     ((and (stringp arg)
           (string= arg match-2))
      (list match-2 'global-mode-string "--"))
     (t
      (list arg)))))

(setq mode-line-format (apply 'nconc (mapcar 'd--mapcar--default-mode-line-format mode-line-format)))

(setq default-mode-line-format mode-line-format)

;; (nconc '(1 2 3) '(4 5 6))
;; (apply 'nconc '( (1 2 3) ( 4 5 6)))

(provide 'd-modeline)
;;; d-modeline.el ends here
