From 47e456d8a6e1c818b820a31f447496b89ed45445 Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Mon, 21 Apr 2014 19:25:27 +0200 Subject: [PATCH] org.el (org-mode): Use `org-back-to-heading' and `org-end-of-subtree' for C-M-a and C-M-e * org.el (org-mode): Use `org-back-to-heading' and `org-end-of-subtree' for C-M-a and C-M-e. This partially reverts commit 76fa97922. Thanks to Leo Liu for reporting this. --- lisp/org.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 31f0433d8..5e4514e63 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5377,8 +5377,9 @@ The following commands are available: ;; Comments. (org-setup-comments-handling) ;; Beginning/end of defun - (org-set-local 'beginning-of-defun-function 'org-backward-element) - (org-set-local 'end-of-defun-function 'org-forward-element) + (org-set-local 'beginning-of-defun-function 'org-back-to-heading) + (org-set-local 'end-of-defun-function + (lambda () (interactive) (org-end-of-subtree nil t))) ;; Next error for sparse trees (org-set-local 'next-error-function 'org-occur-next-match) ;; Make sure dependence stuff works reliably, even for users who set it