|
From: | David Rogoff |
Subject: | Re: [O] Minor org mode for achieve code folding effects |
Date: | Tue, 10 Jan 2012 17:21:40 -0800 |
User-agent: | Postbox 3.0.2 (Macintosh/20111203) |
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 " [*]+ "))) |
[Prev in Thread] | Current Thread | [Next in Thread] |