all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* outline should have its own face definitions
@ 2002-12-08 18:37 Hannu Koivisto
  2002-12-09 20:22 ` Richard Stallman
  0 siblings, 1 reply; 5+ messages in thread
From: Hannu Koivisto @ 2002-12-08 18:37 UTC (permalink / raw)


This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.2.2 (i686-pc-linux-gnu, X toolkit)
 of 2002-03-26 on lynx
configured using `configure  --prefix=/usr/local/emacs-21 --with-xpm --with-jpeg --with-tiff --with-gif'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: fi_FI@euro
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  locale-coding-system: iso-latin-9
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Currently outline-mode uses faces such as
font-lock-function-name-face and font-lock-variable-name-face for
fontifying heading lines at different levels.  This makes it
impossible for user to customize the fontification of outline
heading lines without affecting fontification of other modes.

If you want to default to the currently used faces, perhaps
outline-specific faces could inherit from them by default.

If you are not interested in fixing this before the next release
comes out or at all, perhaps a new PROBLEMS entry could be
introduced that mentions that something along the lines of of the
example code below can be used to work around the problem in one's
personal .emacs.

(defface outline-1-face
  '((t (:bold t)))
  "Outline face for level 1.")

(defface outline-2-face
  '((t (:foreground "DarkBlue")))
  "Outline face for level 2.")

(defface outline-3-face
  '((t (:foreground "FireBrick4")))
  "Outline face for level 3.")

(defface outline-4-face
  '((t (:foreground "Purple4")))
  "Outline face for level 4.")

(defface outline-5-face
  '((t ()))
  "Outline face for level 5.")

(defface outline-6-face
  '((t ()))
  "Outline face for level 6.")

(defface outline-7-face
  '((t ()))
  "Outline face for level 7.")

(defface outline-8-face
  '((t ()))
  "Outline face for level 8.")

(defvar
 outline-font-lock-keywords
 ;; Highlight headings according to the level.
 '((eval . (list (concat "^" outline-regexp ".+")
                 0 '(or (cdr (assq (outline-font-lock-level)
                                   '((1 . outline-1-face)
                                     (2 . outline-2-face)
                                     (3 . outline-3-face)
                                     (4 . outline-4-face)
                                     (5 . outline-5-face)
                                     (6 . outline-6-face)
                                     (7 . outline-7-face)
                                     (8 . outline-8-face))))
                        font-lock-warning-face)
                 nil t))))

-- 
Hannu

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

* Re: outline should have its own face definitions
       [not found] <mailman.8.1039372645.19936.bug-gnu-emacs@gnu.org>
@ 2002-12-08 21:21 ` Miles Bader
       [not found]   ` <miles@gnu.org>
       [not found]   ` <mailman.32.1039445453.19936.bug-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 5+ messages in thread
From: Miles Bader @ 2002-12-08 21:21 UTC (permalink / raw)


Hannu Koivisto <azure@iki.fi> writes:
> If you are not interested in fixing this before the next release
> comes out or at all, perhaps a new PROBLEMS entry could be
> introduced that mentions that something along the lines of of the
> example code below can be used to work around the problem in one's
> personal .emacs.
> 
> (defface outline-1-face
>   '((t (:bold t)))
>   "Outline face for level 1.")
...

Please don't end face names with `-face'; faces have their own
namespace, so it is completely redundant.

[Note that `font-lock-function-name-face' is a _variable_, not a face,
so having it end in `-face' _is_ appropriate -- it tells you that the
variable contains a face]

Thanks,

-Miles
-- 
`Cars give people wonderful freedom and increase their opportunities.
 But they also destroy the environment, to an extent so drastic that
 they kill all social life' (from _A Pattern Language_)

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

* Re: outline should have its own face definitions
       [not found]   ` <miles@gnu.org>
@ 2002-12-09 14:50     ` Peter S Galbraith
  0 siblings, 0 replies; 5+ messages in thread
From: Peter S Galbraith @ 2002-12-09 14:50 UTC (permalink / raw)


Miles Bader <miles@gnu.org> wrote:

> Hannu Koivisto <azure@iki.fi> writes:
> > If you are not interested in fixing this before the next release
> > comes out or at all, perhaps a new PROBLEMS entry could be
> > introduced that mentions that something along the lines of of the
> > example code below can be used to work around the problem in one's
> > personal .emacs.
> > 
> > (defface outline-1-face
> >   '((t (:bold t)))
> >   "Outline face for level 1.")
> ...
> 
> Please don't end face names with `-face'; faces have their own
> namespace, so it is completely redundant.
> 
> [Note that `font-lock-function-name-face' is a _variable_, not a face,
> so having it end in `-face' _is_ appropriate -- it tells you that the
> variable contains a face]

It's a variable whose value is `font-lock-function-name-face'!  :-)

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

* Re: outline should have its own face definitions
       [not found]   ` <mailman.32.1039445453.19936.bug-gnu-emacs@gnu.org>
@ 2002-12-09 15:29     ` Miles Bader
  0 siblings, 0 replies; 5+ messages in thread
From: Miles Bader @ 2002-12-09 15:29 UTC (permalink / raw)


Peter S Galbraith <GalbraithP@dfo-mpo.gc.ca> writes:
> > [Note that `font-lock-function-name-face' is a _variable_, not a face,
> > so having it end in `-face' _is_ appropriate -- it tells you that the
> > variable contains a face]
> 
> It's a variable whose value is `font-lock-function-name-face'!  :-)

... thus the confusion over variable vs. value.

-Miles
-- 
o The existentialist, not having a pillow, goes everywhere with the book by
  Sullivan, _I am going to spit on your graves_.

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

* Re: outline should have its own face definitions
  2002-12-08 18:37 outline should have its own face definitions Hannu Koivisto
@ 2002-12-09 20:22 ` Richard Stallman
  0 siblings, 0 replies; 5+ messages in thread
From: Richard Stallman @ 2002-12-09 20:22 UTC (permalink / raw)
  Cc: emacs-devel

outline.el already defines its own faces.
They just get their defaults from the font-lock faces.

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

end of thread, other threads:[~2002-12-09 20:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-12-08 18:37 outline should have its own face definitions Hannu Koivisto
2002-12-09 20:22 ` Richard Stallman
     [not found] <mailman.8.1039372645.19936.bug-gnu-emacs@gnu.org>
2002-12-08 21:21 ` Miles Bader
     [not found]   ` <miles@gnu.org>
2002-12-09 14:50     ` Peter S Galbraith
     [not found]   ` <mailman.32.1039445453.19936.bug-gnu-emacs@gnu.org>
2002-12-09 15:29     ` Miles Bader

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.