Skip to content

Instantly share code, notes, and snippets.

@kanru
Created March 2, 2012 06:18
Show Gist options
  • Save kanru/1956176 to your computer and use it in GitHub Desktop.
Save kanru/1956176 to your computer and use it in GitHub Desktop.
org-mode Emacs 22 compat
diff --git a/lisp/org.el b/lisp/org.el
index abafde8..e1d1caa 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -20745,7 +20745,9 @@ depending on context."
(not (y-or-n-p "Kill hidden subtree along with headline? ")))
(error "C-k aborted - would kill hidden subtree")))
(call-interactively
- (if visual-line-mode 'kill-visual-line 'kill-line)))
+ (if (and (boundp 'visual-line-mode)
+ visual-line-mode)
+ 'kill-visual-line 'kill-line)))
((looking-at (org-re ".*?\\S-\\([ \t]+\\(:[[:alnum:]_@#%:]+:\\)\\)[ \t]*$"))
(kill-region (point) (match-beginning 1))
(org-set-tags nil t))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment