Browse Source

Merge branch 'maint'

Bastien 4 years ago
parent
commit
0c85c8d7ed
2 changed files with 5 additions and 10 deletions
  1. 4 5
      lisp/org-src.el
  2. 1 5
      lisp/org.el

+ 4 - 5
lisp/org-src.el

@@ -453,15 +453,14 @@ Assume point is in the corresponding edit buffer."
       (insert (org-no-properties contents))
       (goto-char (point-min))
       (when (functionp write-back) (save-excursion (funcall write-back)))
-      ;; Add INDENTATION-OFFSET to every non-empty line in buffer,
+      ;; Add INDENTATION-OFFSET to every line in buffer,
       ;; unless indentation is meant to be preserved.
       (when (> indentation-offset 0)
 	(while (not (eobp))
 	  (skip-chars-forward " \t")
-	  (unless (eolp)		;ignore blank lines
-	    (let ((i (current-column)))
-	      (delete-region (line-beginning-position) (point))
-	      (indent-to (+ i indentation-offset))))
+	  (let ((i (current-column)))
+	    (delete-region (line-beginning-position) (point))
+	    (indent-to (+ i indentation-offset)))
 	  (forward-line))))))
 
 (defun org-src--edit-element

+ 1 - 5
lisp/org.el

@@ -18018,10 +18018,6 @@ object (e.g., within a comment).  In these case, you need to use
 	     (delete-and-extract-region (point) (line-end-position))))
 	(org--newline indent arg interactive)
 	(save-excursion (insert trailing-data))))
-     ;; FIXME: In a source block, don't try to indent as it may result
-     ;; in weird results due to `electric-indent-mode' being `t'.
-     ((eq element-type 'src-block)
-      (org--newline nil nil nil))
      (t
       ;; Do not auto-fill when point is in an Org property drawer.
       (let ((auto-fill-function (and (not (org-at-property-p))
@@ -19167,7 +19163,7 @@ Also align node properties according to `org-property-format'."
 		       (line-beginning-position 2))))
 	     nil)
 	    ((and (eq type 'src-block)
-                  org-src-tab-acts-natively
+		  org-src-tab-acts-natively
 		  (> (line-beginning-position)
 		     (org-element-property :post-affiliated element))
 		  (< (line-beginning-position)