compat: Add `org-newline-and-indent'
* lisp/org-compat.el (org-newline-and-indent): New function. * lisp/org.el (org--newline): Use new function.
This commit is contained in:
parent
e304d58978
commit
e47b053d9a
|
@ -102,6 +102,12 @@ is nil)."
|
|||
(defun org-time-convert-to-list (time)
|
||||
(seconds-to-time (float-time time))))
|
||||
|
||||
;; `newline-and-indent' did not take a numeric argument before 27.1.
|
||||
(if (version< emacs-version "27")
|
||||
(defsubst org-newline-and-indent (&optional _arg)
|
||||
(newline-and-indent))
|
||||
(defalias 'org-newline-and-indent #'newline-and-indent))
|
||||
|
||||
|
||||
;;; Emacs < 26.1 compatibility
|
||||
|
||||
|
|
|
@ -17654,7 +17654,7 @@ indent unconditionally; otherwise, call `newline' with ARG and
|
|||
INTERACTIVE, which can trigger indentation if
|
||||
`electric-indent-mode' is enabled."
|
||||
(if indent
|
||||
(newline-and-indent)
|
||||
(org-newline-and-indent arg)
|
||||
(newline arg interactive)))
|
||||
|
||||
(defun org-return (&optional indent arg interactive)
|
||||
|
|
Loading…
Reference in New Issue