-;; Time-stamp: <2016-08-11 16:58:25 kmodi>
+;; Time-stamp: <2016-08-25 13:45:37 kmodi>
 
 ;; Verilog
 


;;;; modi/verilog-selective-indent
    ;; http://emacs.stackexchange.com/a/8033/115
    (defun modi/verilog-selective-indent (&rest args)
      "Return non-nil if point is on certain types of comment lines.

If either of the below is true:
- The current line starts with optional whitespace and then \"// *(space)\".
  Here that * represents one or more consecutive '*' chars.
- The current line contains \"//.\".
  Here that . represents a literal '.' char.

If the comment is of \"// *(space)\" style, delete any preceding white space, do
not indent that comment line at all.

`outline-mode'or `outshine' functionality.

The match with \"//.\" resolves this issue:
  http://www.veripool.org/issues/922-Verilog-mode-Consistent-comment-column
"
      (save-excursion
        (beginning-of-line)
        (let* ((outline-comment (looking-at "^[[:blank:]]*// \\*+\\s-")) ; // *(space)
               (dont-touch-indentation (looking-at "^.*//\\.")) ; Line contains "//."
               (is-in-multi-line-define (looking-at "^.*\\\\$")) ; \ at EOL
               (do-not-run-orig-fn (or outline-comment
                                       dont-touch-indentation
                                       is-in-multi-line-define
                                       modi/verilog-multi-line-define-line-cache)))
          ;; Cache the current value of `is-in-multi-line-define'
          (setq modi/verilog-multi-line-define-line-cache is-in-multi-line-define)
          ;; Force remove any indentation for outline comments
          (when outline-comment
            (delete-horizontal-space))
