This works, but is probably not the best way to do it: (defun th-outline-regexp () "Calculate the outline regexp for the current mode." (let ((comment-starter (replace-regexp-in-string "[[:space:]]+" "" comment-start))) (when (string= comment-starter ";") (setq comment-starter ";;")) (when (string= comment-starter "#") (setq comment-starter "##")) (when (eq major-mode 'verilog-mode) (setq comment-starter "\\s-*//")) ;; for verilog-mode, define comment-starter as any amount of whitespace followed by "//". This allows indented comments as outline levels (concat comment-starter " [*]+ "))) |
- [O] Minor org mode for achieve code folding effects Giovanni Giorgi
- Re: [O] Minor org mode for achieve code folding effec... Carsten Dominik
- Re: [O] Minor org mode for achieve code folding effec... Eric S Fraga
- Re: [O] Minor org mode for achieve code folding e... Leo Alekseyev
- Re: [O] Minor org mode for achieve code folding effec... Eric S Fraga
- Re: [O] Minor org mode for achieve code folding e... Leo Alekseyev
- Re: [O] Minor org mode for achieve code folding effec... David Rogoff
- Re: [O] Minor org mode for achieve code folding e... David Rogoff
- Re: [O] Minor org mode for achieve code foldi... Leo Alekseyev
- Re: [O] Minor org mode for achieve code f... Tassilo Horn
- Re: [O] Minor org mode for achieve code folding e... David Rogoff
- Re: [O] Minor org mode for achieve code foldi... David Rogoff