unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Per Abrahamsen <abraham@dina.kvl.dk>
Subject: Re: Customizing faces with `defcustom'
Date: Wed, 30 Nov 2005 10:15:19 +0100	[thread overview]
Message-ID: <rjiruacx94.fsf@sheridan.dina.kvl.dk> (raw)
In-Reply-To: <87fyperhgd.fsf@jurta.org> (Juri Linkov's message of "Wed, 30 Nov 2005 04:44:14 +0200")

The cpp "faces" can be either true faces, or the special keyword
"invisible". 

2005-11-30  Per Abrahamsen  <abraham@dina.kvl.dk>

	* progmodes/cpp.el (cpp-face): New widget.
	(cpp-known-face, cpp-unknown-face, cpp-edit-list): Use it.

*** cpp.el.~1.28.~	2003-10-24 15:35:06.000000000 +0200
--- cpp.el	2005-11-30 10:11:27.000000000 +0100
***************
*** 57,70 ****
    :type 'file
    :group 'cpp)
  
  (defcustom cpp-known-face 'invisible
    "*Face used for known cpp symbols."
!   :type 'face
    :group 'cpp)
  
  (defcustom cpp-unknown-face 'highlight
    "*Face used for unknown cpp symbols."
!   :type 'face
    :group 'cpp)
  
  (defcustom cpp-face-type 'light
--- 57,75 ----
    :type 'file
    :group 'cpp)
  
+ 
+ (define-widget 'cpp-face 'lazy
+   "Either a face or the special symbol 'invisible'."
+   :type '(choice (const invisible) (face)))
+ 
  (defcustom cpp-known-face 'invisible
    "*Face used for known cpp symbols."
!   :type 'cpp-face
    :group 'cpp)
  
  (defcustom cpp-unknown-face 'highlight
    "*Face used for unknown cpp symbols."
!   :type 'cpp-face
    :group 'cpp)
  
  (defcustom cpp-face-type 'light
***************
*** 93,102 ****
  1. Face used for text that is `ifdef' the macro.
  2. Face used for text that is `ifndef' the macro.
  3. t, nil, or `both' depending on what text may be edited."
!   :type '(repeat (list string face face
! 		       (choice (const t)
! 			       (const nil)
! 			       (const both))))
    :group 'cpp)
  
  (defvar cpp-overlay-list nil)
--- 98,109 ----
  1. Face used for text that is `ifdef' the macro.
  2. Face used for text that is `ifndef' the macro.
  3. t, nil, or `both' depending on what text may be edited."
!   :type '(repeat (list (string :tag "Macro") 
!                        (cpp-face :tag "True") 
!                        (cpp-face :tag "False")
! 		       (choice (const :tag "True branch writable" t)
! 			       (const :tag "false branch writeable" nil)
! 			       (const :tag "Both branches writeable" both))))
    :group 'cpp)
  
  (defvar cpp-overlay-list nil)

      parent reply	other threads:[~2005-11-30  9:15 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-27 10:24 Customizing faces with `defcustom' martin rudalics
2005-08-28 15:11 ` Richard M. Stallman
2005-08-30  5:55   ` martin rudalics
2005-09-01 15:53     ` Richard M. Stallman
2005-11-12  8:09       ` martin rudalics
2005-11-13 20:54         ` Richard M. Stallman
2005-11-15  7:45           ` martin rudalics
2005-11-16 19:26           ` martin rudalics
2005-11-17 14:07             ` Richard M. Stallman
2005-11-30  2:44           ` Juri Linkov
2005-11-30  7:47             ` martin rudalics
2005-11-30 13:27               ` Per Abrahamsen
2005-11-30 15:33                 ` Juri Linkov
2005-12-23 13:23                 ` martin rudalics
2005-12-24 20:14                   ` Juri Linkov
2005-12-25 16:23                     ` martin rudalics
2005-12-26  2:20                       ` Richard M. Stallman
2005-12-27 19:05                         ` Juri Linkov
2005-12-28 17:01                           ` Richard M. Stallman
2005-12-25 19:07                     ` Richard M. Stallman
2005-12-25 19:07                     ` Richard M. Stallman
2005-12-26 16:37                       ` martin rudalics
2005-12-27  4:55                         ` Richard M. Stallman
2005-12-27 19:04                           ` Juri Linkov
2005-12-28 10:04                             ` martin rudalics
2005-12-28 15:57                               ` Juri Linkov
2005-12-28 22:48                               ` Richard M. Stallman
2005-12-29  9:47                                 ` martin rudalics
2005-12-30  2:18                                   ` Richard M. Stallman
2005-12-28 22:48                               ` Richard M. Stallman
2005-12-29  1:23                                 ` Juri Linkov
2005-12-30  2:17                                   ` Richard M. Stallman
2005-12-30  6:29                                     ` Juri Linkov
2005-12-30 14:15                                       ` martin rudalics
2005-12-31  0:48                                         ` Juri Linkov
2005-12-31 19:36                                           ` Richard M. Stallman
2005-12-30 22:10                                       ` Richard M. Stallman
2005-12-31  0:48                                         ` Juri Linkov
2005-12-31 19:36                                           ` Richard M. Stallman
2006-01-04  6:34                                             ` Juri Linkov
2006-01-05  3:46                                               ` Richard M. Stallman
2006-01-01 16:10                                           ` Richard M. Stallman
2005-12-31 17:40                                       ` Richard M. Stallman
2006-01-04  6:31                                         ` Juri Linkov
2006-01-05  3:46                                           ` Richard M. Stallman
2005-12-29 10:13                                 ` martin rudalics
2005-12-30  2:18                                   ` Richard M. Stallman
2005-12-28 17:01                             ` Richard M. Stallman
2005-12-27 19:04                       ` Juri Linkov
2005-12-28 17:01                         ` Richard M. Stallman
2005-11-30  9:15             ` Per Abrahamsen [this message]

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=rjiruacx94.fsf@sheridan.dina.kvl.dk \
    --to=abraham@dina.kvl.dk \
    /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).