     (save-excursion
       (back-to-indentation)
       (setq oldindent (current-column))
+      ;; not in first line
       (when (> (current-line) 1)
         (save-excursion
           (setq left


(defvar zomp-imenu-generic-expression nil)
(defun zomp-id (str)
  (replace-regexp-in-string "ID" "\\(?:[a-zA-Z0-9:*+-/!=><_|&]\\|\\[\\|\\]\\)+" str t t))
(setq zomp-imenu-generic-expression
      `((nil ,(zomp-id "^(?macro +\\(ID\\)") 1)
        (nil ,(zomp-id "^(?func +ID +\\(ID\\)") 1)
        (nil ,(zomp-id "^(?var +ID +\\(ID\\)") 1)
        (nil ,(zomp-id "^(?const +ID +\\(ID\\)") 1)
        (nil ,(zomp-id "^(?type +\\(ID\\)") 1)
        (nil ,(zomp-id "^(?struct +\\(ID\\)") 1)
        (nil ,(zomp-id "^(?template +\\(ID\\)") 1)
        (nil ,(zomp-id "^\\(/// *.* *///\\) *$") 1)
        (nil ,(zomp-id "^\\(/// +Section: +.*\\)") 1)

          (let ((w (zomp-symbol-at-point)))
            (cond ((looking-at "\\*")
                   (setq left (- left 1)))
                  ;; ((member w zomp-indent-keywords)
                  ;;  (setq left (+ left 2)))
                  ((looking-at "end}")
                   (setq left (+ left 2)))
                  ))

          (end-of-line)
          (when (looking-back " *:")
            (setq left (+ left 2)))
          (when (looking-back " *[+-*/=><&|,(]")
            (setq left (+ left 4)))
          (next-line)

          ;; (let* ((line-start (progn (beginning-of-line) (point)))
          ;;       (line-end (progn (end-of-line) (point)))
          ;;       (open-parens (how-many "[({]" line-start line-end))
          ;;       (closing-parens (how-many "[)}]" line-start line-end)))
          ;;   (cond ((> open-parens closing-parens) (setq left (+ left 2)))
          ;;         ((< open-parens closing-parens) (setq left (- left 2))))
          ;;   (next-line))))
          ))

      (beginning-of-line)

