Browse Source

Fixed yasnippet related config example.

- The call to `make-variable-buffer-local' was terrible.
- Fixed code snippet to match Org manual:
  http://orgmode.org/manual/Conflicts.html
Le 10 years ago
parent
commit
ea1b1efb09
1 changed files with 14 additions and 15 deletions
  1. 14 15
      org-configs/org-config-examples.org

+ 14 - 15
org-configs/org-config-examples.org

@@ -27,21 +27,20 @@ find useful.
 # this example
 
 #+begin_example
-(add-hook 'org-mode-hook (lambda ()
-                           (local-set-key "\M-n" 'outline-next-visible-heading)
-                           (local-set-key "\M-p" 'outline-previous-visible-heading)
-			   ;; table
-			   (local-set-key "\M-\C-w" 'org-table-copy-region)
-			   (local-set-key "\M-\C-y" 'org-table-paste-rectangle)
-			   (local-set-key "\M-\C-l" 'org-table-sort-lines)
-			   ;; display images
-			   (local-set-key "\M-I" 'org-toggle-iimage-in-org)
-			   ;; fix tab
-			   (local-set-key "\C-y" 'yank)
-			   ;; yasnippet (allow yasnippet to do it's thing in org files)
-			   (make-variable-buffer-local 'yas/trigger-key)
-			   (setq yas/trigger-key [tab])
-			   (define-key yas/keymap [tab] 'yas/next-field-group)))
+  (add-hook 'org-mode-hook (lambda ()
+                             (local-set-key "\M-n" 'outline-next-visible-heading)
+                             (local-set-key "\M-p" 'outline-previous-visible-heading)
+                             ;; table
+                             (local-set-key "\M-\C-w" 'org-table-copy-region)
+                             (local-set-key "\M-\C-y" 'org-table-paste-rectangle)
+                             (local-set-key "\M-\C-l" 'org-table-sort-lines)
+                             ;; display images
+                             (local-set-key "\M-I" 'org-toggle-iimage-in-org)
+                             ;; fix tab
+                             (local-set-key "\C-y" 'yank)
+                             ;; yasnippet (allow yasnippet to do it's thing in org files)
+                             (org-set-local 'yas/trigger-key [tab])
+                             (define-key yas/keymap [tab] 'yas/next-field-group)))
 #+end_example
 
 References and Explanations of the above: