Kaynağa Gözat

Fix bug in `org-toggle-fixed-width-section'.

Fixed-width sections start with a column followed by a space.
This function now toggle fixed-width sections accordingly to
the manual.
Bastien Guerry 16 yıl önce
ebeveyn
işleme
730ef5f5f6
2 değiştirilmiş dosya ile 8 ekleme ve 3 silme
  1. 5 0
      lisp/ChangeLog
  2. 3 3
      lisp/org.el

+ 5 - 0
lisp/ChangeLog

@@ -1,3 +1,8 @@
+2009-03-14  Bastien Guerry  <bzg@altern.org>
+
+	* org.el (org-toggle-fixed-width-section): Bug fix: insert a
+	column and a space, not only a column.
+
 2009-03-14  Carsten Dominik  <carsten.dominik@gmail.com>
 
 	* org-export-latex.el (org-export-latex-emphasis-alist): Better

+ 3 - 3
lisp/org.el

@@ -15267,7 +15267,7 @@ this line is also exported in fixed-width font."
 	 (end (if regionp (region-end)))
 	 (nlines (or arg (if (and beg end) (count-lines beg end) 1)))
 	 (case-fold-search nil)
-	 (re "[ \t]*\\(:\\)")
+	 (re "[ \t]*\\(: \\)")
 	 off)
     (if regionp
 	(save-excursion
@@ -15281,11 +15281,11 @@ this line is also exported in fixed-width font."
 	    (cond
 	     (arg
 	      (org-move-to-column cc t)
-	      (insert ":\n")
+	      (insert ": \n")
 	      (forward-line -1))
 	     ((and off (looking-at re))
 	      (replace-match "" t t nil 1))
-	     ((not off) (org-move-to-column cc t) (insert ":")))
+	     ((not off) (org-move-to-column cc t) (insert ": ")))
 	    (forward-line 1)))
       (save-excursion
 	(org-back-to-heading)