Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
Subject: Re: Larger smilies
Date: Thu, 09 Mar 2006 20:19:07 +0100	[thread overview]
Message-ID: <v9r75bctp0.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <871wxc3e68.fsf@topper.koldfront.dk>

[-- Attachment #1: Type: text/plain, Size: 1590 bytes --]

On Wed, Mar 08 2006, Adam Sjøgren wrote:

> I have now updated my set of garish AOL-smilies so they match the full
> set found in etc/images/smilies/ in Gnus CVS.
>
> I have also created a set of dull smilies that are grey and without
> borders. They can do with a lot of improvement though.
>
>  <http://www.koldfront.dk/text/larger-smilies.html>

Apply the attached patch, put Adam's smilies into a /medium and
/grayscale ("dull-*.tar.gz") subdirectory of etc/images/smilies, do
`M-: (push "/path/to/No_Gnus/lisp/" load-path) RET', and customize
`smiley-style'.  WDYT?

For my font size (14) your 16 pixel smilies are too large (causing
increased "linespread").  Maybe you could remove the empty lines from
your "dull" variants?

Bye, Reiner.

Test text with all kinds of smilies follows:

  Lorem ipsum dolor ^:-) sit amet, consectetuer ^:) adipiscing
  elit. Aenean ;-) tincidunt ultrices ;) nisl. Nullam fermentum turpis
  eu ante. Nunc magna :-] augue, rutrum ut, suscipit non, mollis
  vitae, erat. Vivamus ullamcorper ligula 8-) ut nisi. Donec ultrices
  massa sed metus semper :-| congue. Vivamus dignissim, neque non
  placerat :-/ pharetra, mauris sapien mattis justo, a nonummy :-\ dui
  nulla ac dolor. Suspendisse purus eros, :-( sagittis vel, mollis
  non, adipiscing a, justo. Vivamus ultricies, >:-) ipsum quis
  placerat consectetuer, leo lorem eleifend odio, id tincidunt neque
  mi ac mauris. X-) Pellentesque vehicula orci ut nisl. Suspendisse
  potenti. Phasellus ornare, elit a hendrerit :-D vulputate, ipsum
  libero viverra dui, ac imperdiet lectus mi eget metus.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: rs-smiley-larger.patch --]
[-- Type: text/x-patch, Size: 4287 bytes --]

--- smiley.el	08 Feb 2006 13:32:51 +0100	7.8
+++ smiley.el	09 Mar 2006 20:16:36 +0100	
@@ -31,8 +31,21 @@
 ;; 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
+;; `smiley.el' was replaced by `smiley-ems.el' on 2002-01-26 (after fx'
+;; comment).
 
-;;; Test smileys:  :-) :-\ :-( :-/
+;; Test smileys:
+;; smile             ^:-) ^:)
+;; blink             ;-)  ;)
+;; forced            :-]
+;; braindamaged      8-)
+;; indifferent       :-|
+;; wry               :-/  :-\
+;; sad               :-(
+;; evil              >:-)
+;; cry               ;-(
+;; dead              X-)
+;; grin              :-D
 
 ;;; Code:
 
@@ -45,25 +58,59 @@
   :group 'gnus-visual)
 
 ;; Maybe this should go.
-(defcustom smiley-data-directory (nnheader-find-etc-directory "images/smilies")
+(defcustom smiley-style 'low-color
+  "Smiley style."
+  :type '(choice (const :tag "small, 3 colors" low-color)
+		 (const :tag "medium, ~10 colors" medium)
+		 (const :tag "dull, grayscale" grayscale))
+  :set (lambda (symbol value)
+	 (set-default symbol value)
+	 (setq smiley-data-directory (smiley-directory))
+	 (smiley-update-cache))
+  :initialize 'custom-initialize-default
+  :group 'smiley)
+
+;; For compatibility, honor the variable `smiley-data-directory' if the user
+;; has set it.
+
+(defun smiley-directory (&optional style)
+  "Return a the location of the smiley faces files.
+STYLE specifies which style to use, see `smiley-style'.  If STYLE
+is nil, use `smiley-style'."
+  (unless style (setq style smiley-style))
+  (nnheader-find-etc-directory
+   (concat "images/smilies"
+	   (cond ((eq smiley-style 'low-color) "")
+		 ((eq smiley-style 'medium) "/medium")
+		 ((eq smiley-style 'grayscale) "/grayscale")))))
+
+(defcustom smiley-data-directory (smiley-directory)
   "*Location of the smiley faces files."
+  :set (lambda (symbol value)
+	 (set-default symbol value)
+	 (smiley-update-cache))
+  :initialize 'custom-initialize-default
   :type 'directory
   :group 'smiley)
 
 ;; The XEmacs version has a baroque, if not rococo, set of these.
 (defcustom smiley-regexp-alist
-  '(("\\(:-?)\\)\\W" 1 "smile")
+  '(("\\(\\^:-?)\\)\\W" 1 "smile")
     ("\\(;-?)\\)\\W" 1 "blink")
     ("\\(:-]\\)\\W" 1 "forced")
     ("\\(8-)\\)\\W" 1 "braindamaged")
     ("\\(:-|\\)\\W" 1 "indifferent")
     ("\\(:-[/\\]\\)\\W" 1 "wry")
     ("\\(:-(\\)\\W" 1 "sad")
-    ("\\(:-{\\)\\W" 1 "frown"))
+    ("\\(:-{\\)\\W" 1 "frown")
+    ("\\(>:-)\\)\\W" 1 "evil")
+    ("\\(;-(\\)\\W" 1 "cry")
+    ("\\(X-)\\)\\W" 1 "dead")
+    ("\\(:-D\\)\\W" 1 "grin"))
   "*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
-`smiley-data-directory'."
+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")
 		       (string :tag "Image name")))
@@ -78,7 +125,7 @@
     (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 +133,7 @@
 (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 +152,13 @@
 	    (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)

  reply	other threads:[~2006-03-09 19:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87adgwl8ht.fsf@virgil.koldfront.dk>
2006-02-21 20:03 ` Adam Sjøgren
2006-02-22 23:47   ` Miles Bader
2006-03-08 19:54     ` Adam Sjøgren
2006-03-09 19:19       ` Reiner Steib [this message]
2006-03-20 18:22         ` Adam Sjøgren
2006-03-20 20:02           ` Reiner Steib
2006-03-20 21:04             ` Adam Sjøgren
2006-03-20 23:09               ` Reiner Steib
2006-03-21  0:03                 ` Adam Sjøgren
2006-03-20 21:09             ` Adam Sjøgren
2006-03-20 18:46         ` Adam Sjøgren
2006-04-12  5:51   ` Lars Magne Ingebrigtsen
2006-04-12 21:25     ` Reiner Steib
2006-04-13  5:51       ` Lars Magne Ingebrigtsen
2006-04-15 11:09       ` Lars Magne Ingebrigtsen

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=v9r75bctp0.fsf@marauder.physik.uni-ulm.de \
    --to=reinersteib+gmane@imap.cc \
    --cc=Reiner.Steib@gmx.de \
    /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.
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 NNTP newsgroup(s).