I try to define custom faces to be applied in variable =bbdb-name-face-alist= 
for
variant field names.

Here is my try:

#+BEGIN_SRC emacs-lisp
;;; define variant faces for variant xfields

;; TODO: improve it
(setq bbdb-name-face-alist '((mail . bbdb-field-mail)
                             (mail-alias . bbdb-field-mail-alias)))

(defface bbdb-field-mail
  '((t (:inherit bbdb-field-name :foreground "green yellow")))
  "Face used for BBDB fields."
  :group 'bbdb-faces)

(defface bbdb-field-mail-alias
  '((t (:inherit bbdb-field-name :foreground "yellow")))
  "Face used for BBDB fields."
  :group 'bbdb-faces)
#+END_SRC

But this seems does not work.
I checked the docstring of =bbdb-name-face-alist=.

Description about the ~KEY~.

#+BEGIN_QUOTE
the xfield name-face of this record should have the value KEY.
The value of name-face may also be a face which is then used directly.
If none of these schemes succeeds, the face `bbdb-name' is used.
#+END_QUOTE

I think maybe I do not have the ~KEY~ (like ~mail~, ~mail-alias~) defined.

So How to defined those key automatically based on the BBDB database?

If it's not what I'm thinking. Then what it is?

------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
bbdb-info@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bbdb-info
BBDB Home Page: http://bbdb.sourceforge.net/

Reply via email to