Prechádzať zdrojové kódy

Untabify ASCII image before returning to Org-mode.

When an ASCII image is edited with C-c ', it will in the end be quoted
by prepending colons to each line.  If tabulators are used in the
image, this may mess up the alignment.  Since tabulators are not a
good idea in ASCII images anyway, this patch makes sure that any
tabulators are replaced by spaces.
Carsten Dominik 16 rokov pred
rodič
commit
29c5bfd7b5
2 zmenil súbory, kde vykonal 17 pridanie a 0 odobranie
  1. 16 0
      lisp/ChangeLog
  2. 1 0
      lisp/org.el

+ 16 - 0
lisp/ChangeLog

@@ -1,3 +1,19 @@
+2008-11-12  Carsten Dominik  <carsten.dominik@gmail.com>
+
+	* org.el (org-edit-src-exit): Untabify ASCII image before
+	returning.
+
+
+
+
+
+
+
+
+
+
+
+
 2008-11-11  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org.el (org-yank): Make any prefix force normal yanking.

+ 1 - 0
lisp/org.el

@@ -5711,6 +5711,7 @@ the language, a switch telling of the content should be in a single line."
       (font-lock-unfontify-region (point-min) (point-max)))
     (put-text-property (point-min) (point-max) 'font-lock-fontified t))
   (when (org-bound-and-true-p org-edit-src-picture)
+    (untabify (point-min) (point-max))
     (goto-char (point-min))
     (while (re-search-forward "^" nil t)
       (replace-match ": "))