mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2025-01-15 17:00:45 +00:00
Allow for extra indentation of block contents.
This commit is contained in:
parent
5f3b2c275c
commit
737757a5fd
@ -1,5 +1,8 @@
|
||||
2009-06-08 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org-src.el (org-edit-src-content-indentation): New option.
|
||||
(org-edit-src-exit): Apply extra indentation.
|
||||
|
||||
* org-exp.el (org-export-format-source-code-or-example): Run
|
||||
`org-src-mode-hook'.
|
||||
|
||||
|
@ -80,6 +80,14 @@ These are the regions where each line starts with a colon."
|
||||
(const fundamental-mode)
|
||||
(function :tag "Other (specify)")))
|
||||
|
||||
(defcustom org-edit-src-content-indentation 2
|
||||
"Indentation for the content is a source code block.
|
||||
This should be the number of spaces added to the indentation of the #+begin
|
||||
line in order to compute the indentation of the block content after
|
||||
editing it with \\[org-edit-src-code]."
|
||||
:group 'org-edit-structure
|
||||
:type 'integer)
|
||||
|
||||
(defcustom org-edit-src-persistent-message t
|
||||
"Non-nil means show persistent exit help message while editing src examples.
|
||||
The message is shown in the header-line, which will be created in the
|
||||
@ -426,7 +434,8 @@ the language, a switch telling of the content should be in a single line."
|
||||
(while (re-search-forward "^" nil t)
|
||||
(replace-match ": ")))
|
||||
(when nindent
|
||||
(setq nindent (make-string nindent ?\ ))
|
||||
(setq nindent (make-string (+ org-edit-src-content-indentation nindent)
|
||||
?\ ))
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^" nil t)
|
||||
(replace-match nindent)))
|
||||
|
Loading…
Reference in New Issue
Block a user