-(defcustom smiley-data-directory (message-xmas-find-glyph-directory "smilies")
- "Location of the smiley faces files."
- :type 'directory
- :group 'smiley)
-
-;; Notice the subtle differences in the regular expressions in the
-;; two alists below.
-
-(defcustom smiley-deformed-regexp-alist
- '(("\\(:-*[<«]+\\)\\W" 1 "FaceAngry.xpm")
- ("\\(:-+\\]+\\)\\W" 1 "FaceGoofy.xpm")
- ("\\(:-*D\\)\\W" 1 "FaceGrinning.xpm")
- ("\\(:-*[)>}»]+\\)\\W" 1 "FaceHappy.xpm")
- ("\\(:-*[/\\\"]\\)[^/]\\W" 1 "FaceIronic.xpm")
- ("\\([8|]-*[|Oo%]\\)\\W" 1 "FaceKOed.xpm")
- ("\\([:|]-*#+\\)\\W" 1 "FaceNyah.xpm")
- ("\\(:-*[({]+\\)\\W" 1 "FaceSad.xpm")
- ("\\(:-*[Oo\*]\\)\\W" 1 "FaceStartled.xpm")
- ("\\(:-*|\\)\\W" 1 "FaceStraight.xpm")
- ("\\(:-*p\\)\\W" 1 "FaceTalking.xpm")
- ("\\(:-*d\\)\\W" 1 "FaceTasty.xpm")
- ("\\(;-*[>)}»]+\\)\\W" 1 "FaceWinking.xpm")
- ("\\(:-*[Vvµ]\\)\\W" 1 "FaceWry.xpm")
- ("\\([:|]-*P\\)\\W" 1 "FaceYukky.xpm"))
- "Normal and deformed faces for smilies."
- :type '(repeat (list regexp
- (integer :tag "Match")
- (string :tag "Image")))
- :group 'smiley)
-
-(defcustom smiley-nosey-regexp-alist
- '(("\\(:-+[<«]+\\)\\W" 1 "FaceAngry.xpm")
- ("\\(:-+\\]+\\)\\W" 1 "FaceGoofy.xpm")
- ("\\(:-+D\\)\\W" 1 "FaceGrinning.xpm")
- ("\\(:-+[}»]+\\)\\W" 1 "FaceHappy.xpm")
- ("\\(:-*)+\\)\\W" 1 "FaceHappy.xpm")
- ("\\(:-+[/\\\"]+\\)\\W" 1 "FaceIronic.xpm")
- ("\\([8|]-+[|Oo%]\\)\\W" 1 "FaceKOed.xpm")
- ("\\([:|]-+#+\\)\\W" 1 "FaceNyah.xpm")
- ("\\(:-+[({]+\\)\\W" 1 "FaceSad.xpm")
- ("\\(:-+[Oo\*]\\)\\W" 1 "FaceStartled.xpm")
- ("\\(:-+|\\)\\W" 1 "FaceStraight.xpm")
- ("\\(:-+p\\)\\W" 1 "FaceTalking.xpm")
- ("\\(:-+d\\)\\W" 1 "FaceTasty.xpm")
- ("\\(;-+[>)}»]+\\)\\W" 1 "FaceWinking.xpm")
- ("\\(:-+[Vvµ]\\)\\W" 1 "FaceWry.xpm")
- ("\\(][:8B]-[)>]\\)\\W" 1 "FaceDevilish.xpm")
- ("\\([:|]-+P\\)\\W" 1 "FaceYukky.xpm"))
- "Smileys with noses. These get less false matches."
- :type '(repeat (list regexp
- (integer :tag "Match")
- (string :tag "Image")))
- :group 'smiley)
-
-(defcustom smiley-regexp-alist smiley-deformed-regexp-alist
- "A list of regexps to map smilies to real images.
-Defaults to the contents of `smiley-deformed-regexp-alist'.
-An alternative is `smiley-nosey-regexp-alist' that matches less
-aggressively.
-If this is a symbol, take its value."
- :type '(radio (variable-item smiley-deformed-regexp-alist)
- (variable-item smiley-nosey-regexp-alist)
- symbol
- (repeat (list regexp
- (integer :tag "Match")
- (string :tag "Image"))))
- :group 'smiley)
-
-(defcustom smiley-flesh-color "yellow"
- "Flesh color."
- :type 'string
+(defvar smiley-data-directory)
+
+(defcustom smiley-style
+ (if (or (and (fboundp 'face-attribute)
+ (>= (face-attribute 'default :height) 160))
+ (and (fboundp 'face-height)
+ (>= (face-height 'default) 14)))
+ 'medium
+ 'low-color)
+ "Smiley style."
+ :type '(choice (const :tag "small, 3 colors" low-color) ;; 13x14
+ (const :tag "medium, ~10 colors" medium) ;; 16x16
+ (const :tag "dull, grayscale" grayscale));; 14x14
+ :set (lambda (symbol value)
+ (set-default symbol value)
+ (setq smiley-data-directory (smiley-directory))
+ (smiley-update-cache))
+ :initialize 'custom-initialize-default
+ :version "23.1" ;; No Gnus