unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stephen Berman <Stephen.Berman@gmx.net>
To: emacs-devel@gnu.org
Subject: Re: linum and AUCTeX: line number face
Date: Tue, 18 Sep 2007 00:54:32 +0200	[thread overview]
Message-ID: <87lkb4ykbb.fsf@escher.local.home> (raw)
In-Reply-To: 46EEBBA6.1020109@arcor.de

On Mon, 17 Sep 2007 19:38:46 +0200 Stephan Hennig <mailing_list@arcor.de> wrote:

> David Kastrup schrieb:
>> Stephan Hennig <mailing_list@arcor.de> writes:
[...]
>>> To reproduce the problem, put the following lines into file .emacs:
>>>
>>> (progn (cd "~/elisp") (normal-top-level-add-subdirs-to-load-path))
>>> (require 'linum)
>>> (custom-set-faces
>>>   ;; custom-set-faces was added by Custom.
>>>   ;; If you edit it by hand, you could mess it up, so be careful.
>>>   ;; Your init file should contain only one such instance.
>>>   ;; If there is more than one, they won't work right.
>>>  '(default ((t (:stipple nil :background "SystemWindow" :foreground
>>> "SystemWindowText" :inverse-video nil :box nil :strike-through nil
>>> :overline nil :underline nil :slant normal :weight normal :height 108
>>> :width normal :family "Bitstream Vera Sans Mono"))))
>>>  '(linum ((t (:inherit default))))
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> 
>> That is not the default face.
>> 
>> Try (copy-face 'default 'linum) or (put 'linum 'face-alias 'default instead).
>
> Thanks for taking a look at that, David!  Since I'm a bit lost could you
> please give me step-by-step instructions where to put those line(s) and
> what lines to remove?  I've tried removing the line you've underlined
> and added
>
> (copy-face 'default 'linum)
>
> after loading linum, but that results in even more font-locking related
> properties, e.g., some italic line numbers.

All you have to do is evaluate that sexp, e.g. type M-: and at the
prompt enter (copy-face 'default 'linum) and then hit the return key.
But as Stefan Monnier surmised and I confirmed in another reply, this
doesn't do anything different than customizing the inherit attribute
of the face.
>
>> Inheriting will, of course, be overridden by any new properties.
>> That's the whole point of it.
>
> Well, I'd love to do without any inheritance at all.  With the following
> .emacs I've tried to set line numbers to be black, upright, medium
> weight.  The result are black and upright line numbers, but weight seems
> still to be "inherited" (don't know if that's the correct term here)
> from font-locking properties.

Yes, black seems to behave like shadow.  Perhaps this is generally the
case, and inheriting from default (whatever that means precisely; I
don't know) is the exception.

> Note, if colour or slant aren't set, they are inherited from
> font-locking properties, too.  That is, setting them explicitly to
> "black" and "normal" _does override_ font-locking properties.  But an
> explicit weight value is ignored.  Is that intended behaviour?

Again, not just weight, but also at least the highlighting done by
matching parentheses.

Steve Berman

  reply	other threads:[~2007-09-17 22:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <46ea83d1$0$16117$9b4e6d93@newsspool1.arcor-online.net>
2007-09-16 10:30 ` linum and AUCTeX: line number face Stephan Hennig
2007-09-16 21:11   ` Stephen Berman
2007-09-17 13:57     ` Stephan Hennig
2007-09-17 15:02       ` David Kastrup
2007-09-17 16:20         ` Stefan Monnier
2007-09-17 22:54           ` Stephen Berman
2007-10-11 16:30             ` Stephan Hennig
2007-09-17 17:38         ` Stephan Hennig
2007-09-17 22:54           ` Stephen Berman [this message]
2007-09-18  9:51             ` Stephan Hennig
2007-09-17 22:54       ` Stephen Berman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lkb4ykbb.fsf@escher.local.home \
    --to=stephen.berman@gmx.net \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).