From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjarte Johansen Subject: More flyspell-overlays removed Date: Fri, 20 Jul 2012 22:14:02 +0200 Message-ID: Mime-Version: 1.0 (Apple Message framework v1278) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsJb4-0005mw-Na for emacs-orgmode@gnu.org; Fri, 20 Jul 2012 16:15:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SsJaQ-0006WE-Tv for emacs-orgmode@gnu.org; Fri, 20 Jul 2012 16:14:46 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:65020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SsJaQ-0006Vy-DM for emacs-orgmode@gnu.org; Fri, 20 Jul 2012 16:14:06 -0400 Received: by lbjn8 with SMTP id n8so6766979lbj.0 for ; Fri, 20 Jul 2012 13:14:05 -0700 (PDT) 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 Hi - I made a patch to remove some more flyspell-overlays in #-blocks. The = reason for no : in the latex_header is that for some reason the : does = not get captured in dc1. flyspell is also removed for the full verbatim, = lstlisting and src blocks. I hope you guys can use the patch. Regards, Bjarte = --------------------------------------------------------------------------= ------ diff --git a/lisp/org.el b/lisp/org.el index 4241168..80fbdd0 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -5465,7 +5465,8 @@ by a #." (dc3 (downcase (match-string 3))) end end1 quoting block-type ovl) (cond - ((member dc1 '("html:" "ascii:" "latex:" "docbook:")) + ((member dc1 '("html:" "ascii:" "latex:" "docbook:" = "startup:" + "options:" "latex_header")) ;; a single line of backend-specific content (org-remove-flyspell-overlays-in (match-beginning 0) = (match-end 0)) (remove-text-properties (match-beginning 0) (match-end 0) @@ -5478,6 +5479,7 @@ by a #." t) ((and (match-end 4) (equal dc3 "begin")) ;; Truly a block + (org-remove-flyspell-overlays-in (match-beginning 0) = (match-end 0)) (setq block-type (downcase (match-string 5)) quoting (member block-type org-protecting-blocks)) (when (re-search-forward @@ -5486,6 +5488,9 @@ by a #." (setq end (min (point-max) (match-end 0)) end1 (min (point-max) (1- (match-beginning 0)))) (setq block-end (match-beginning 0)) + (when (member block-type '("lstlisting" "verbatim" "src")) + (org-remove-flyspell-overlays-in block-start = block-end)) + (org-remove-flyspell-overlays-in (match-beginning 0) = (match-end 0)) (when quoting (remove-text-properties beg end '(display t invisible t = intangible t))) @@ -5540,6 +5545,7 @@ by a #." "orgtbl:" "tblfm:" "tblname:" "results:" "call:" "header:" "headers:" "name:")) (and (match-end 4) (equal dc3 "attr"))) + (org-remove-flyspell-overlays-in (match-beginning 0) = (match-end 0)) (add-text-properties beg (match-end 0) '(font-lock-fontified t face org-meta-line))=