Browse Source

Fix minor bug.

Carsten Dominik 15 years ago
parent
commit
ca19fab380
2 changed files with 4 additions and 2 deletions
  1. 1 0
      lisp/ChangeLog
  2. 3 2
      lisp/org.el

+ 1 - 0
lisp/ChangeLog

@@ -3,6 +3,7 @@
 	* org.el (org-hide-archived-subtrees): Don't jump to end of
 	subtree if the match was not in a headline.
 	(org-inside-latex-macro-p): Allow more complex arguments.
+	(org-emphasize): Protect against use at end of buffer.
 
 2010-02-15  Carsten Dominik  <carsten.dominik@gmail.com>
 

+ 3 - 2
lisp/org.el

@@ -4557,8 +4557,9 @@ will be prompted for."
 		(string-match (concat "[" (nth 0 erc) "\n]")
 			      (char-to-string (char-before (point)))))
       (insert " "))
-    (unless (string-match (concat "[" (nth 1 erc) "\n]")
-			  (char-to-string (char-after (point))))
+    (unless (or (eobp)
+		(string-match (concat "[" (nth 1 erc) "\n]")
+			      (char-to-string (char-after (point)))))
       (insert " ") (backward-char 1))
     (insert string)
     (and move (backward-char 1))))