Skip to content

Instantly share code, notes, and snippets.

@takaxp
Created January 12, 2012 07:05
Show Gist options
  • Save takaxp/1599131 to your computer and use it in GitHub Desktop.
Save takaxp/1599131 to your computer and use it in GitHub Desktop.
my-find-headings
(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)))
@takaxp
Copy link
Author

takaxp commented Jan 12, 2012

うう.たくさんのコメントありがとうございます(T-T)
ノウハウを色々と教えていただいたので本当に勉強になりますっ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment