 
 
 (provide 'setup-smart-mode-line)
+
+
+;; Variables used in display-time-format
+;; Source: http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/Commontimeformatvariables
+;; %y = year in numbers (2-digit)
+;; %Y = year in numbers (4-digit)
+;; %m = month in number (eg: 12)
+;; %B = full month name (eg: December)
+;; %b = short month name (eg: Dec)
+;; %d = day in numbers, with leading zeros (eg: 08)
+;; %e = day in numbers, no leading zeros (eg: 8)
+;; %A = full weekday name (eg: Sunday)
+;; %a = short weekday name (eg: Sun)
+;; %H = hours in 24-clock, with leading zeros
+;; %k = hours in 24-clock, no leading zeros
+;; %l = hours in 12-clock, with leading zeros
+;; %p = am/pm
+;; %T = time in 24-hour notation (%H:%M:%S)

            (":\\(.*_EX\\):\\([a-z0-9_]\\{3\\}\\).*?/"
             (lambda (string) (concat ":\\1:"
                                      (match-string 2 string)
                                      ":") ) )
            ;; Prefix with first 2 letters and last letter of project name
            ;; To distinguish between projects that could have same first 3 letters
            ;; Using "\,(upcase ...)" only works when calling `replace-regexp` interactively.
            ;; In lisp code you have to give it a function. So we need to change the
            ;; replacement string to,
            ;; `(lambda (string) (concat ":" (upcase (match-string 1 string)) ":")))`.
            ("/proj.*?/\\([a-z0-9_]\\{2\\}\\).*?\\([a-z0-9_]\\)/[so]+_\\([a-z0-9]+\\)/\\([a-z0-9_]\\{3\\}\\).*?/"
             (lambda (string) (concat ":"
                                      (capitalize (match-string 1 string))
                                      (upcase (match-string 2 string))
                                      (when (not (string= (match-string 3 string) (getenv "USER")))
                                        (concat "[" (match-string 3 string) "]"))
                                      ":" (upcase (match-string 4 string)) ":"
                                      ) ) )
            (":\\(.*\\):DIG:tb/"                        ":\\1:TB:" )
            (":\\(.*\\):TB:agents/"                     ":\\1:AGT:" )
            (":\\(.*\\):TB:patterns/"                   ":\\1:PAT:" )
            (":\\(.*\\):DIG:design_code/"               ":\\1:DSGN:")
            (":\\(.*\\):DSGN:rtl/"                      ":\\1:RTL:" )
            (":\\(.*\\):DSGN:analog_partition_rtl/"     ":\\1:ANA:" )
            )
          display-time-format "%l:%M %b %d %a" ;; customize the date and time display format in mode-line
          ;; Variables used in display-time-format
          ;; Source: http://docs.splunk.com/Documentation/Splunk/5.0.2/SearchReference/Commontimeformatvariables
          ;; %y = year in numbers (2-digit)
          ;; %Y = year in numbers (4-digit)
          ;; %m = month in number (eg: 12)
          ;; %B = full month name (eg: December)
          ;; %b = short month name (eg: Dec)
          ;; %d = day in numbers, with leading zeros (eg: 08)
          ;; %e = day in numbers, no leading zeros (eg: 8)
          ;; %A = full weekday name (eg: Sunday)
          ;; %a = short weekday name (eg: Sun)
          ;; %H = hours in 24-clock, with leading zeros
          ;; %k = hours in 24-clock, no leading zeros
          ;; %l = hours in 12-clock, with leading zeros
          ;; %p = am/pm
          ;; %T = time in 24-hour notation (%H:%M:%S)
          display-time-default-load-average nil ;; do NOT show average system load time
          line-number-mode t ;; show line # in mode-line
          column-number-mode t ;; show column # in mode-line
          )
    (setq rm-excluded-modes
          '(" Guide"        ; guide-key mode
            " hc"           ; hardcore mode

            " SliNav"       ; elisp-slime-nav
            " Fly"          ; Flycheck
            " PgLn"         ; page-line-break
            " ElDoc"        ; eldoc
            " hl-highlight" ; hl-anything
            " Helm"         ; Helm
