all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org, tzz@beld.net
Subject: Re: Idea: Allow faces to have text-like properties
Date: 28 Feb 2002 14:15:31 +0100	[thread overview]
Message-ID: <5xvgch21e4.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <rj664h4xrw.fsf@ssv2.dina.kvl.dk>

Per Abrahamsen <abraham@dina.kvl.dk> writes:

> Couldn't the same effect be achieved if font lock used categories
> instead of faces?  
> 

You are right.  That is the generic (i.e. proper) approach to doing
this.


Actually, the changes needed to change font-lock to use categories
instead of faces seem to be fairly trivial, if we do it like this
(illustrated by font-lock-comment-face):

(defface font-lock-comment-face ...)  ;; as now

(defvar font-lock-comment-face 'font-lock-comment-face)   ;; as now

(put 'font-lock-comment-face 'face font-lock-comment-face) ;; new

and then replace all

( .... 'face font-lock-comment-face)

with

( .... 'category 'font-lock-comment-face)

[this is an oversimplification as the properties are not
set in that way ... but I hope you get the idea].


However, the problem with this approach is that setting the
font-lock-comment-face variable to another face is not reflected in
the `face' property of font-lock-comment-face, so it will not longer
have any effect.   Any ideas how to overcome that problem?

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk


_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/emacs-devel


  reply	other threads:[~2002-02-28 13:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-28 10:25 Idea: Allow faces to have text-like properties Kim F. Storm
2002-02-28 12:05 ` Per Abrahamsen
2002-02-28 13:15   ` Kim F. Storm [this message]
2002-03-01  1:05 ` Stefan Monnier
2002-03-01  1:11 ` Richard Stallman
2002-03-01  1:24   ` Stefan Monnier
2002-03-05 19:02     ` Teodor Zlatanov

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

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

  git send-email \
    --in-reply-to=5xvgch21e4.fsf@kfs2.cua.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    --cc=tzz@beld.net \
    /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 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.