unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#24830: [PATCH] Add an example for font-lock-remove-keywords.
@ 2016-10-30 23:24 Hong Xu
  2016-11-04  9:20 ` Eli Zaretskii
  0 siblings, 1 reply; 3+ messages in thread
From: Hong Xu @ 2016-10-30 23:24 UTC (permalink / raw)
  To: 24830

---
 doc/lispref/ChangeLog.1 |  4 ++++
 doc/lispref/modes.texi  | 10 ++++++++++
 2 files changed, 14 insertions(+)

diff --git a/doc/lispref/ChangeLog.1 b/doc/lispref/ChangeLog.1
index 610e7541e7de..34c7b5634359 100644
--- a/doc/lispref/ChangeLog.1
+++ b/doc/lispref/ChangeLog.1
@@ -1,3 +1,7 @@
+2016-10-30  Hong Xu  <hong@topbug.net>
+
+	* modes.texi (Customizing Keywords): Add an example for `font-lock-remove-keywords'.
+
 2015-03-29  Glenn Morris  <rgm@gnu.org>
 
 	* objects.texi (Equality Predicates): Fix typo in example.
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 32baa27147bf..04d1f13c60d2 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -2930,6 +2930,16 @@ Customizing Keywords
    ("\\<\\(and\\|or\\|not\\)\\>" . font-lock-keyword-face)))
 @end smallexample
 
+To remove the fontification of the word @samp{FIXME} above, use the
+following code.  Note that the list in the argument @var{keywords}
+must be exactly the same as the one added by
+@code{font-lock-add-keywords}.
+
+@smallexample
+(font-lock-remove-keywords 'c-mode
+ '(("\\<\\(FIXME\\):" 1 font-lock-warning-face prepend)))
+@end smallexample
+
 @noindent
 This example affects only C mode proper.  To add the same patterns to C
 mode @emph{and} all modes derived from it, do this instead:
-- 
2.1.4







^ permalink raw reply related	[flat|nested] 3+ messages in thread

* bug#24830: [PATCH] Add an example for font-lock-remove-keywords.
  2016-10-30 23:24 bug#24830: [PATCH] Add an example for font-lock-remove-keywords Hong Xu
@ 2016-11-04  9:20 ` Eli Zaretskii
  2016-11-04 20:13   ` Hong Xu
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2016-11-04  9:20 UTC (permalink / raw)
  To: Hong Xu; +Cc: 24830-done

> From: Hong Xu <hong@topbug.net>
> Date: Sun, 30 Oct 2016 16:24:47 -0700
> 
>  doc/lispref/ChangeLog.1 |  4 ++++
>  doc/lispref/modes.texi  | 10 ++++++++++
>  2 files changed, 14 insertions(+)
> 
> diff --git a/doc/lispref/ChangeLog.1 b/doc/lispref/ChangeLog.1
> index 610e7541e7de..34c7b5634359 100644
> --- a/doc/lispref/ChangeLog.1
> +++ b/doc/lispref/ChangeLog.1
> @@ -1,3 +1,7 @@
> +2016-10-30  Hong Xu  <hong@topbug.net>
> +
> +	* modes.texi (Customizing Keywords): Add an example for `font-lock-remove-keywords'.
> +

Thanks.  I added the caveat to the documentation of
'font-lock-remove-keywords'.  I don't see a particular need to have an
example for its use, as just saying the argument 'keywords' should be
identical to what was used by 'font-lock-add-keywords' seems to be
enough.

With that, I'm closing the bug report.  Thanks.

Btw, you are encouraged to start the legal paperwork for assigning
copyright of your contributions to the FSF, so that we could accept
your contributions without any limitations.





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#24830: [PATCH] Add an example for font-lock-remove-keywords.
  2016-11-04  9:20 ` Eli Zaretskii
@ 2016-11-04 20:13   ` Hong Xu
  0 siblings, 0 replies; 3+ messages in thread
From: Hong Xu @ 2016-11-04 20:13 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 24830-done

[-- Attachment #1: Type: text/plain, Size: 363 bytes --]


On 2016-11-04 Fri 02:20 GMT-0700, Eli Zaretskii <eliz@gnu.org> wrote:

> Btw, you are encouraged to start the legal paperwork for assigning
> copyright of your contributions to the FSF, so that we could accept
> your contributions without any limitations.

Thanks, I'm glad to do that. It looks like a maintainer need to me the
template for assignment...


Hong

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-11-04 20:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-30 23:24 bug#24830: [PATCH] Add an example for font-lock-remove-keywords Hong Xu
2016-11-04  9:20 ` Eli Zaretskii
2016-11-04 20:13   ` Hong Xu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).