Add more test smileys.
authorReiner Steib <Reiner.Steib@gmx.de>
Fri, 10 Mar 2006 16:06:37 +0000 (16:06 +0000)
committerReiner Steib <Reiner.Steib@gmx.de>
Fri, 10 Mar 2006 16:06:37 +0000 (16:06 +0000)
(smiley-data-directory, smiley-regexp-alist)
(gnus-smiley-file-types): Fix doc strings.
(smiley-update-cache): Clear smiley-cached-regexp-alist before
adding new elements.
(smiley-mouse-map): Unused code.  Make it a comment.

lisp/ChangeLog
lisp/smiley.el

index 87a1f65..046617a 100644 (file)
@@ -1,3 +1,12 @@
+2006-03-10  Reiner Steib  <Reiner.Steib@gmx.de>
+
+       * smiley.el: Add more test smileys.
+       (smiley-data-directory, smiley-regexp-alist)
+       (gnus-smiley-file-types): Fix doc strings.
+       (smiley-update-cache): Clear smiley-cached-regexp-alist before
+       adding new elements.
+       (smiley-mouse-map): Unused code.  Make it a comment.
+
 2006-03-10  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * gnus-nocem.el (gnus-nocem-scan-groups): Add autoload cookie;
index d7657e4..e8afe9d 100644 (file)
 ;; I'm not sure we need that degree of rococoness and defaults like a
 ;; yellow background.  Also, using PBM means we can display the images
 ;; more generally.  -- fx
-
-;;; Test smileys:  :-) :-\ :-( :-/
+;; `smiley.el' was replaced by `smiley-ems.el' on 2002-01-26 (after fx'
+;; comment).
+
+;; Test smileys:
+;; smile             ^:-) ^:)
+;; blink             ;-)  ;)
+;; forced            :-]
+;; braindamaged      8-)
+;; indifferent       :-|
+;; wry               :-/  :-\
+;; sad               :-(
+;; evil              >:-)
+;; cry               ;-(
+;; dead              X-)
+;; grin              :-D
 
 ;;; Code:
 
@@ -45,8 +58,9 @@
   :group 'gnus-visual)
 
 ;; Maybe this should go.
-(defcustom smiley-data-directory (nnheader-find-etc-directory "images/smilies")
-  "*Location of the smiley faces files."
+(defcustom smiley-data-directory
+  (nnheader-find-etc-directory "images/smilies")
+  "Location of the smiley faces files."
   :type 'directory
   :group 'smiley)
 
@@ -61,8 +75,8 @@
     ("\\(:-(\\)\\W" 1 "sad")
     ("\\(:-{\\)\\W" 1 "frown"))
   "*A list of regexps to map smilies to images.
-The elements are (REGEXP MATCH FILE), where MATCH is the submatch in
-regexp to replace with IMAGE.  IMAGE is the name of a PBM file in
+The elements are (REGEXP MATCH IMAGE), where MATCH is the submatch in
+regexp to replace with IMAGE.  IMAGE is the name of an image file in
 `smiley-data-directory'."
   :type '(repeat (list regexp
                       (integer :tag "Regexp match number")
@@ -78,7 +92,7 @@ regexp to replace with IMAGE.  IMAGE is the name of a PBM file in
     (when (gnus-image-type-available-p 'xpm)
       (push "xpm" types))
     types)
-  "*List of suffixes on picon file names to try."
+  "*List of suffixes on smiley file names to try."
   :version "22.1"
   :type '(repeat string)
   :group 'smiley)
@@ -86,6 +100,7 @@ regexp to replace with IMAGE.  IMAGE is the name of a PBM file in
 (defvar smiley-cached-regexp-alist nil)
 
 (defun smiley-update-cache ()
+  (setq smiley-cached-regexp-alist nil)
   (dolist (elt (if (symbolp smiley-regexp-alist)
                   (symbol-value smiley-regexp-alist)
                 smiley-regexp-alist))
@@ -104,12 +119,13 @@ regexp to replace with IMAGE.  IMAGE is the name of a PBM file in
            (push (list (car elt) (cadr elt) image)
                  smiley-cached-regexp-alist)))))))
 
-(defvar smiley-mouse-map
-  (let ((map (make-sparse-keymap)))
-    (define-key map [down-mouse-2] 'ignore) ; override widget
-    (define-key map [mouse-2]
-      'smiley-mouse-toggle-buffer)
-    map))
+;; Not implemented:
+;; (defvar smiley-mouse-map
+;;   (let ((map (make-sparse-keymap)))
+;;     (define-key map [down-mouse-2] 'ignore) ; override widget
+;;     (define-key map [mouse-2]
+;;       'smiley-mouse-toggle-buffer)
+;;     map))
 
 ;;;###autoload
 (defun smiley-region (start end)