From f26547e320ac768f6806cd8c02184da9df8fe926 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 25 Feb 2013 10:52:11 +0100 Subject: [PATCH] Fix false positives in `org-in-verbatim-emphasis' * lisp/org.el (org-in-verbatim-emphasis): Fix false positive when point is just after the closing emphasis marker. --- lisp/org.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 4c5aa2498..c306205bb 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -20733,7 +20733,10 @@ With prefix arg UNCOMPILED, load the uncompiled versions." (defun org-in-verbatim-emphasis () (save-match-data - (and (org-in-regexp org-emph-re 2) (member (match-string 3) '("=" "~"))))) + (and (org-in-regexp org-emph-re 2) + (>= (point) (match-beginning 3)) + (<= (point) (match-end 4)) + (member (match-string 3) '("=" "~"))))) (defun org-goto-marker-or-bmk (marker &optional bookmark) "Go to MARKER, widen if necessary. When marker is not live, try BOOKMARK." -- 2.11.4.GIT