Created
January 12, 2012 07:05
-
-
Save takaxp/1599131 to your computer and use it in GitHub Desktop.
my-find-headings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my-find-headings () | |
(let ((eob (point-max)) | |
(head-list '())) | |
(save-excursion | |
(goto-char (point-min)) | |
(while (when (search-forward-regexp "^\*\\([^*]\\|$\\)" eob t) | |
(setq head-list (cons (match-beginning 0) head-list)) | |
(forward-line)))) | |
(reverse head-list))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
うう.たくさんのコメントありがとうございます(T-T)
ノウハウを色々と教えていただいたので本当に勉強になりますっ