emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/idle-highlight-mode c4be332ecb 34/59: readme: move hints i


From: ELPA Syncer
Subject: [nongnu] elpa/idle-highlight-mode c4be332ecb 34/59: readme: move hints into their own section
Date: Thu, 7 Jul 2022 12:00:31 -0400 (EDT)

branch: elpa/idle-highlight-mode
commit c4be332ecb17890c242eaae37bc448f402e306b3
Author: Campbell Barton <ideasman42@gmail.com>
Commit: Campbell Barton <ideasman42@gmail.com>

    readme: move hints into their own section
---
 readme.rst | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/readme.rst b/readme.rst
index b0966bbb7d..96a3bcae5c 100644
--- a/readme.rst
+++ b/readme.rst
@@ -26,13 +26,6 @@ Global Settings
    Face used for highlighting the symbol.
 ``idle-highlight-exceptions`` nil
    Words to exclude from highlighting.
-
-   You may wish to set this to a different value for each mode, e.g:
-
-   .. code-block:: elisp
-
-      (setq-local idle-highlight-exceptions '("end" "begin"))
-
 ``idle-highlight-exceptions-face`` '(font-lock-keyword-face 
font-lock-string-face)
    Faces to exclude from highlighting (defaults to ignore keywords & strings).
 ``idle-highlight-idle-time``
@@ -68,3 +61,17 @@ Installation
      :config (setq idle-highlight-idle-time 0.2)
 
      :hook ((prog-mode text-mode) . idle-highlight-mode)))
+
+Hints
+-----
+
+You may wish to set this to a different value for each mode, e.g:
+
+.. code-block:: elisp
+
+   (add-hook 'after-change-major-mode-hook
+     (lambda ()
+       (when (derived-mode-p 'c-mode)
+         (setq-local idle-highlight-exceptions '("unsigned" "signed" "long" 
"int" "shot" "char")))
+       (when (derived-mode-p 'python-mode)
+         (setq-local idle-highlight-exceptions '("list" "tuple" "int" "float" 
"str" "bool")))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]