[Top][All Lists]

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

[debbugs-tracker] bug#14438: closed (24.3.50; Honor `hi-lock-auto-select

From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#14438: closed (24.3.50; Honor `hi-lock-auto-select-face' for non-interactive use)
Date: Mon, 03 Jun 2013 09:11:01 +0000

Your message dated Mon, 03 Jun 2013 11:59:10 +0300
with message-id <address@hidden>
and subject line Re: bug#14438: 24.3.50; Honor `hi-lock-auto-select-face' for 
non-interactive use
has caused the debbugs.gnu.org bug report #14438,
regarding 24.3.50; Honor `hi-lock-auto-select-face' for non-interactive use
to be marked as done.

(If you believe you have received this mail in error, please contact

14438: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14438
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.3.50; Honor `hi-lock-auto-select-face' for non-interactive use Date: Wed, 22 May 2013 13:32:32 +0530
Enable `hi-lock-auto-select-face''

     '(hi-lock-auto-select-face t))

Install the following occur specific customizations.  

  (0) Always lookup symbol at point

      (setq occur-read-regexp-defaults-function 'find-tag-default-as-regexp)

  (1) Delete occur window 

      (add-hook 'occur-hook (lambda nil (next-error)

  (2) Highlight the regexp that was looked up.

      (add-hook 'occur-mode-find-occurrence-hook
                (lambda nil (highlight-regexp

Current behaviour

  1. Run M-x occur twice on two different symbols
  2. Note that both the symbols are highlighted in hi-yellow

Expected behaviour

Since face auto-selection is on, I would prefer that the two symbols be
highlighted with two *different* colors.

In GNU Emacs (i686-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2013-05-20 on debian-6.05
Bzr revision: 112643 address@hidden
Windowing system distributor `The X.Org Foundation', version 11.0.10707000
Important settings:
  value of $LANG: en_IN
  locale-coding-system: iso-latin-1-unix
  default enable-multibyte-characters: t

--- End Message ---
--- Begin Message --- Subject: Re: bug#14438: 24.3.50; Honor `hi-lock-auto-select-face' for non-interactive use Date: Mon, 03 Jun 2013 11:59:10 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)
>>       (add-hook 'occur-mode-find-occurrence-hook
>>                 (lambda nil (highlight-regexp
>>                              (find-tag-default-as-regexp))))
> You could use
>       (add-hook 'occur-mode-find-occurrence-hook
>                 (lambda nil (highlight-regexp
>                              (find-tag-default-as-regexp)
>                            (let ((hi-lock-auto-select-face t))
>                              (hi-lock-read-face-name)))))
> like I proposed to do in bug#14427 to get the next face automatically.
> BTW, what do you think about bug#14405 that adds a new defcustom
> `read-regexp-defaults-function' that is more user-friendly
> to customize than changing the values of several functions like
> `occur-read-regexp-defaults-function' and
> `hi-lock-read-regexp-defaults-function'?

It seems this report can be closed since `hi-lock-auto-select-face'
works as expected for interactive commands, and `hi-lock-read-face-name'
can be added as the second arg of the `highlight-regexp' call
when used programmatically:

      (add-hook 'occur-mode-find-occurrence-hook
                (lambda nil (highlight-regexp

--- End Message ---

reply via email to

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