branch: elpa/toc-org
commit c4c61c5a382f94a3a4537e254243006dec2dcca4
Merge: aef220c266 663e5ec281
Author: Sergei Nosov <[email protected]>
Commit: GitHub <[email protected]>

    Merge pull request #73 from syohex/correct-sample
    
    Correct sample configuration to valid code
---
 README.org | 19 ++++++++++---------
 toc-org.el | 11 ++++++-----
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/README.org b/README.org
index d47c37eb7d..243bb38671 100644
--- a/README.org
+++ b/README.org
@@ -38,11 +38,12 @@ repository and then put the following snippet in your 
~/.emacs file
 
 #+BEGIN_SRC elisp
   (if (require 'toc-org nil t)
-      (add-hook 'org-mode-hook 'toc-org-mode)
+      (progn
+        (add-hook 'org-mode-hook 'toc-org-mode)
 
-      ;; enable in markdown, too
-      (add-hook 'markdown-mode-hook 'toc-org-mode)
-      (define-key markdown-mode-map (kbd "\C-c\C-o") 
'toc-org-markdown-follow-thing-at-point))
+        ;; enable in markdown, too
+        (add-hook 'markdown-mode-hook 'toc-org-mode)
+        (define-key markdown-mode-map (kbd "\C-c\C-o") 
'toc-org-markdown-follow-thing-at-point))
     (warn "toc-org not found"))
 #+END_SRC
 
@@ -55,13 +56,13 @@ repository and then put the following snippet in your 
~/.emacs file
   #+END_SRC
 - Put this in your ~/.emacs file
   #+BEGIN_SRC elisp
-    (add-to-list 'load-path "~/.emacs.d/toc-org")
     (if (require 'toc-org nil t)
-        (add-hook 'org-mode-hook 'toc-org-mode)
+        (progn
+          (add-hook 'org-mode-hook 'toc-org-mode)
 
-        ;; enable in markdown, too
-        (add-hook 'markdown-mode-hook 'toc-org-mode)
-        (define-key markdown-mode-map (kbd "\C-c\C-o") 
'toc-org-markdown-follow-thing-at-point))
+          ;; enable in markdown, too
+          (add-hook 'markdown-mode-hook 'toc-org-mode)
+          (define-key markdown-mode-map (kbd "\C-c\C-o") 
'toc-org-markdown-follow-thing-at-point))
       (warn "toc-org not found"))
   #+END_SRC
 
diff --git a/toc-org.el b/toc-org.el
index e2fff1d882..5ca0f010e9 100644
--- a/toc-org.el
+++ b/toc-org.el
@@ -33,11 +33,12 @@
 ;; After installation put into your .emacs file something like
 
 ;; (if (require 'toc-org nil t)
-;;     (add-hook 'org-mode-hook 'toc-org-mode)
-
-;;     ;; enable in markdown, too
-;;     (add-hook 'markdown-mode-hook 'toc-org-mode)
-;;     (define-key markdown-mode-map (kbd "\C-c\C-o") 
'toc-org-markdown-follow-thing-at-point)
+;;     (progn
+;;       (add-hook 'org-mode-hook 'toc-org-mode)
+;;
+;;       ;; enable in markdown, too
+;;       (add-hook 'markdown-mode-hook 'toc-org-mode)
+;;       (define-key markdown-mode-map (kbd "\C-c\C-o") 
'toc-org-markdown-follow-thing-at-point))
 ;;   (warn "toc-org not found"))
 
 ;; And every time you'll be saving an org file, the first headline with a :TOC:

Reply via email to