From: Bjarte Johansen <bjo013@student.uib.no>
To: emacs-orgmode@gnu.org
Subject: More flyspell-overlays removed
Date: Fri, 20 Jul 2012 22:14:02 +0200 [thread overview]
Message-ID: <E726773D-AF98-4FE1-9B74-8CB391144E88@student.uib.no> (raw)
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))
next reply other threads:[~2012-07-20 20:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-20 20:14 Bjarte Johansen [this message]
2012-07-28 9:27 ` More flyspell-overlays removed Bastien
2012-07-28 22:38 ` Bjarte Johansen
2012-07-29 8:35 ` Jeffrey Spencer
2012-07-29 14:47 ` Bjarte Johansen
2012-07-30 11:03 ` Bastien
2012-07-30 11:13 ` Jeffrey Spencer
2012-07-30 11:44 ` Bjarte Johansen
2012-07-31 13:56 ` Jeffrey Spencer
2012-07-31 15:32 ` Bastien
2012-07-31 15:38 ` Bjarte Johansen
2012-07-31 16:33 ` Bastien
2012-07-31 15:10 ` Sebastien Vauban
2012-07-31 15:32 ` Bastien
2012-08-07 3:57 ` Jeffrey Spencer
2012-08-07 9:18 ` Bastien
2012-08-07 11:40 ` Jeffrey Spencer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=E726773D-AF98-4FE1-9B74-8CB391144E88@student.uib.no \
--to=bjo013@student.uib.no \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.