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:23:55 -0400 Message-ID: <1369466635-8217-2-git-send-email-trevor.m.murphy@gmail.com> References: <1369466635-8217-1-git-send-email-trevor.m.murphy@gmail.com> Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39082) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ug8sY-00042X-7c for emacs-orgmode@gnu.org; Sat, 25 May 2013 03:27:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ug8sS-0000Yf-5X for emacs-orgmode@gnu.org; Sat, 25 May 2013 03:27:02 -0400 Received: from mail-yh0-x229.google.com ([2607:f8b0:4002:c01::229]:53578) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ug8sS-0000Ya-1A for emacs-orgmode@gnu.org; Sat, 25 May 2013 03:26:56 -0400 Received: by mail-yh0-f41.google.com with SMTP id i72so489676yha.28 for ; Sat, 25 May 2013 00:26:55 -0700 (PDT) In-Reply-To: <1369466635-8217-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..ce48bb0 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 (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