Explorar o código

org.el (org-mode): New default value for *-of-defun-function

* org.el (org-mode): Use `org-backward-element' and
`org-forward-element' for `beginning-of-defun-function' and
`end-of-defun-function': this allows using C-M-a and C-M-e
before the first headline.
Bastien Guerry %!s(int64=12) %!d(string=hai) anos
pai
achega
76fa979225
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      lisp/org.el

+ 2 - 4
lisp/org.el

@@ -5205,8 +5205,6 @@ The following commands are available:
   ;; Calc embedded
   (org-set-local 'calc-embedded-open-mode "# ")
   ;; Modify a few syntax entries
-  (modify-syntax-entry ?< "(")
-  (modify-syntax-entry ?> ")")
   (modify-syntax-entry ?{ "(")
   (modify-syntax-entry ?} ")")
   (modify-syntax-entry ?@ "w")
@@ -5233,8 +5231,8 @@ The following commands are available:
   ;; Comments.
   (org-setup-comments-handling)
   ;; Beginning/end of defun
-  (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)))
+  (org-set-local 'beginning-of-defun-function 'org-backward-element)
+  (org-set-local 'end-of-defun-function 'org-forward-element)
   ;; 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