* Incremental search with face-remapping-alist does not always work
@ 2013-12-08 6:19 Alin Soare
2013-12-08 6:39 ` Alin Soare
0 siblings, 1 reply; 2+ messages in thread
From: Alin Soare @ 2013-12-08 6:19 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1207 bytes --]
I tried to configure the faces of isearch-mode, given that for each major
mode I defined a face-remapping-alist.
Here is my problem:
1. take the code below.
2. After evaluation, isearch seems to work nice.
3. Goto into the *Info* buffer.
4. Search the string from the title. (a string from a positon with
Info-title-1 face)
5. PROBLEM: the string of the title will get very small, and will change
the font.
6. QUESTION: How can this be avoided, and the expected behaviour be
accomplished ?
(defun isearch-setup ()
(setq-local
lazy-highlight-face
(face-remap-add-relative 'lazy-highlight '(:foreground "red") 'default))
(setq-local
isearch-face
(face-remap-add-relative 'isearch '(:strike-through "white") 'default))
)
(defun isearch-exit ()
(face-remap-remove-relative lazy-highlight-face)
(face-remap-remove-relative isearch-face)
(with-current-buffer (get-buffer " *Echo Area 0*")
(face-remap-remove-relative echo-area-isearch-fail-face)
)
(with-current-buffer (get-buffer " *Echo Area 1*")
(face-remap-remove-relative echo-area-isearch-fail-face)
)
)
(add-hook 'isearch-mode-hook 'isearch-setup)
(add-hook 'isearch-mode-end-hook 'isearch-exit)
[-- Attachment #2: Type: text/html, Size: 1857 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Incremental search with face-remapping-alist does not always work
2013-12-08 6:19 Incremental search with face-remapping-alist does not always work Alin Soare
@ 2013-12-08 6:39 ` Alin Soare
0 siblings, 0 replies; 2+ messages in thread
From: Alin Soare @ 2013-12-08 6:39 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 1613 bytes --]
Yes.
Everything was done lovely.
The problem was that in the *Info* mode I should not have put :height on
the 'default face, because the lazy-highlight and isearch faces were
derived temporarly from it.
I debugged a little isearch.el to realize that.
No more help needed.
2013/12/8 Alin Soare <as1789@gmail.com>
>
> I tried to configure the faces of isearch-mode, given that for each major
> mode I defined a face-remapping-alist.
>
>
> Here is my problem:
>
> 1. take the code below.
>
> 2. After evaluation, isearch seems to work nice.
>
> 3. Goto into the *Info* buffer.
>
> 4. Search the string from the title. (a string from a positon with
> Info-title-1 face)
>
> 5. PROBLEM: the string of the title will get very small, and will change
> the font.
>
> 6. QUESTION: How can this be avoided, and the expected behaviour be
> accomplished ?
>
>
>
> (defun isearch-setup ()
> (setq-local
> lazy-highlight-face
> (face-remap-add-relative 'lazy-highlight '(:foreground "red")
> 'default))
> (setq-local
> isearch-face
> (face-remap-add-relative 'isearch '(:strike-through "white") 'default))
> )
>
> (defun isearch-exit ()
> (face-remap-remove-relative lazy-highlight-face)
> (face-remap-remove-relative isearch-face)
> (with-current-buffer (get-buffer " *Echo Area 0*")
> (face-remap-remove-relative echo-area-isearch-fail-face)
> )
> (with-current-buffer (get-buffer " *Echo Area 1*")
> (face-remap-remove-relative echo-area-isearch-fail-face)
> )
> )
>
> (add-hook 'isearch-mode-hook 'isearch-setup)
>
> (add-hook 'isearch-mode-end-hook 'isearch-exit)
>
>
[-- Attachment #2: Type: text/html, Size: 2604 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-08 6:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-08 6:19 Incremental search with face-remapping-alist does not always work Alin Soare
2013-12-08 6:39 ` Alin Soare
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).