Browse Source

Only use `visual-line-mode' if it's bound.

* org.el (org-kill-line): Access `visual-line-mode' only if it's
bound.

TINYCHANGE
Mike Sperber 13 năm trước cách đây
mục cha
commit
872a6f75c9
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      lisp/org.el

+ 1 - 1
lisp/org.el

@@ -20801,7 +20801,7 @@ 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))