From mboxrd@z Thu Jan 1 00:00:00 1970 From: Trevor Murphy Subject: [PATCH] org.el: Don't flyspell check within source code blocks Date: Sat, 25 May 2013 03:17:26 -0400 Message-ID: <1369466246-5113-2-git-send-email-trevor.m.murphy@gmail.com> References: <1369466246-5113-1-git-send-email-trevor.m.murphy@gmail.com> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:37876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ug8mK-0001Fw-3u for emacs-orgmode@gnu.org; Sat, 25 May 2013 03:20:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ug8mF-0007JZ-8j for emacs-orgmode@gnu.org; Sat, 25 May 2013 03:20:36 -0400 Received: from mail-yh0-x22f.google.com ([2607:f8b0:4002:c01::22f]:47003) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ug8mF-0007JV-4f for emacs-orgmode@gnu.org; Sat, 25 May 2013 03:20:31 -0400 Received: by mail-yh0-f47.google.com with SMTP id z20so325409yhz.20 for ; Sat, 25 May 2013 00:20:30 -0700 (PDT) In-Reply-To: <1369466246-5113-1-git-send-email-trevor.m.murphy@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Cc: Trevor Murphy * lisp/org.el (org-mode-flyspell-verify): Check if `org-element-at-point' is of type `src-block', and don't flyspell if that's the case. TINYCHANGE --- lisp/org.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index 94078f9..81428f5 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -23596,7 +23596,8 @@ To get rid of the restriction, use \\[org-agenda-remove-restriction-lock]." (not (member-ignore-case word (org-get-export-keywords))) (not (member-ignore-case word (mapcar 'car org-element-block-name-alist))) - (not (member-ignore-case word '("BEGIN" "END" "ATTR")))))) + (not (member-ignore-case word '("BEGIN" "END" "ATTR"))) + (not (not (eq (org-element-type (org-element-at-point)) 'src-block)))))) (defun org-remove-flyspell-overlays-in (beg end) "Remove flyspell overlays in region." -- 1.8.2.3