comparison lisp/play/morse.el @ 89909:68c22ea6027c

Sync to HEAD
author Kenichi Handa <handa@m17n.org>
date Fri, 16 Apr 2004 12:51:06 +0000
parents 375f2633d815
children 62afea0771d8
comparison
equal deleted inserted replaced
89908:ee1402f7b568 89909:68c22ea6027c
1 ;;; morse.el --- convert text to morse code and back -*- coding: utf-8 -*- 1 ;;; morse.el --- convert text to morse code and back -*- coding: utf-8 -*-
2 2
3 ;; Copyright (C) 1995, 2002 Free Software Foundation, Inc. 3 ;; Copyright (C) 1995, 2002, 2004 Free Software Foundation, Inc.
4 4
5 ;; Author: Rick Farnbach <rick_farnbach@MENTORG.COM> 5 ;; Author: Rick Farnbach <rick_farnbach@MENTORG.COM>
6 ;; Keywords: games 6 ;; Keywords: games
7 7
8 ;; This file is part of GNU Emacs. 8 ;; This file is part of GNU Emacs.
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, 22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA. 23 ;; Boston, MA 02111-1307, USA.
24 24
25 ;;; Commentary: 25 ;;; Commentary:
26 26
27 ;; Converts text to Morse code and back with M-x morese-region and 27 ;; Converts text to Morse code and back with M-x morse-region and
28 ;; M-x unmorse-region (though Morse code is no longer official :-(). 28 ;; M-x unmorse-region (though Morse code is no longer official :-().
29 29
30 ;;; Code: 30 ;;; Code:
31 31
32 (defvar morse-code '(("a" . ".-") 32 (defvar morse-code '(("a" . ".-")
86 ("ß" . ".../...") 86 ("ß" . ".../...")
87 ("É" . "..-..") 87 ("É" . "..-..")
88 ("Ñ" . "--.--") 88 ("Ñ" . "--.--")
89 ("Ö" . "---.") 89 ("Ö" . "---.")
90 ("Ø" . "---.") 90 ("Ø" . "---.")
91 ("Ü" . "..--")) 91 ("Ü" . "..--")
92 ;; Recently standardized
93 ("@" . ".--.-."))
92 "Morse code character set.") 94 "Morse code character set.")
93 95
94 ;;;###autoload 96 ;;;###autoload
95 (defun morse-region (beg end) 97 (defun morse-region (beg end)
96 "Convert all text in a given region to morse code." 98 "Convert all text in a given region to morse code."
136 (if (looking-at "/") 138 (if (looking-at "/")
137 (delete-char 1)))))))) 139 (delete-char 1))))))))
138 140
139 (provide 'morse) 141 (provide 'morse)
140 142
143 ;;; arch-tag: 3331e6c1-9a9e-453f-abfd-163a9c3f93a6
141 ;;; morse.el ends here 144 ;;; morse.el ends here