diff options
| author | Pavel JanÃk | 2002-01-16 08:05:19 +0000 |
|---|---|---|
| committer | Pavel JanÃk | 2002-01-16 08:05:19 +0000 |
| commit | 774f6cf41f05df5c979ea1b8151a69e1b644d916 (patch) | |
| tree | fe766ef1d660a4a486d9f0074bb9630877457078 | |
| parent | 7a4bce146c78c19c8d9477d067bb13547cb24248 (diff) | |
| download | emacs-774f6cf41f05df5c979ea1b8151a69e1b644d916.tar.gz emacs-774f6cf41f05df5c979ea1b8151a69e1b644d916.zip | |
New maintainer. Change author's address.
(eudc-bob-mail-keymap): New keymap for e-mail addresses.
(eudc-display-mail): New function.
(eudc-bob-play-sound-at-point): Remove XEmacs case.
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/net/eudc-bob.el | 41 |
2 files changed, 31 insertions, 19 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0a400ae6dd6..ddb737f5ae6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2002-01-16 Pavel Jan,Bm(Bk <Pavel@Janik.cz> | ||
| 2 | |||
| 3 | * net/eudc-export.el: New maintainer. Change author's address. | ||
| 4 | |||
| 5 | * net/eudc-bob.el: New maintainer. Change author's address. | ||
| 6 | (eudc-bob-mail-keymap): New keymap for e-mail addresses. | ||
| 7 | (eudc-display-mail): New function. | ||
| 8 | (eudc-bob-play-sound-at-point): Remove XEmacs case. | ||
| 9 | |||
| 1 | 2002-01-15 Richard M. Stallman <rms@gnu.org> | 10 | 2002-01-15 Richard M. Stallman <rms@gnu.org> |
| 2 | 11 | ||
| 3 | * emacs-lisp/autoload.el (make-autoload): | 12 | * emacs-lisp/autoload.el (make-autoload): |
diff --git a/lisp/net/eudc-bob.el b/lisp/net/eudc-bob.el index bd1060d5026..78593fe5c19 100644 --- a/lisp/net/eudc-bob.el +++ b/lisp/net/eudc-bob.el | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Oscar Figueiredo <oscar@xemacs.org> | 5 | ;; Author: Oscar Figueiredo <oscar@cpe.fr> |
| 6 | ;; Maintainer: Oscar Figueiredo <oscar@xemacs.org> | 6 | ;; Maintainer: Pavel Janík <Pavel@Janik.cz> |
| 7 | ;; Keywords: comm | 7 | ;; Keywords: comm |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| @@ -44,6 +44,9 @@ | |||
| 44 | (defvar eudc-bob-url-keymap nil | 44 | (defvar eudc-bob-url-keymap nil |
| 45 | "Keymap for inline urls.") | 45 | "Keymap for inline urls.") |
| 46 | 46 | ||
| 47 | (defvar eudc-bob-mail-keymap nil | ||
| 48 | "Keymap for inline e-mail addresses.") | ||
| 49 | |||
| 47 | (defconst eudc-bob-generic-menu | 50 | (defconst eudc-bob-generic-menu |
| 48 | '("EUDC Binary Object Menu" | 51 | '("EUDC Binary Object Menu" |
| 49 | ["---" nil nil] | 52 | ["---" nil nil] |
| @@ -206,22 +209,9 @@ display a button." | |||
| 206 | (let (sound) | 209 | (let (sound) |
| 207 | (if (null (setq sound (eudc-bob-get-overlay-prop 'object-data))) | 210 | (if (null (setq sound (eudc-bob-get-overlay-prop 'object-data))) |
| 208 | (error "No sound data available here") | 211 | (error "No sound data available here") |
| 209 | (cond (eudc-xemacs-p | 212 | (unless (fboundp 'play-sound) |
| 210 | (if (not (and (boundp 'sound-alist) | 213 | (error "Playing sounds not supported on this system")) |
| 211 | sound-alist)) | 214 | (play-sound (list 'sound :data sound))))) |
| 212 | (error "Don't know how to play sound on this Emacs version") | ||
| 213 | (setq sound-alist | ||
| 214 | (cons (list 'eudc-sound | ||
| 215 | :sound sound) | ||
| 216 | sound-alist)) | ||
| 217 | (condition-case nil | ||
| 218 | (play-sound 'eudc-sound) | ||
| 219 | (t | ||
| 220 | (setq sound-alist (cdr sound-alist)))))) | ||
| 221 | (t | ||
| 222 | (unless (fboundp 'play-sound) | ||
| 223 | (error "Playing sounds not supported on this system")) | ||
| 224 | (play-sound (list 'sound :data sound))))))) | ||
| 225 | 215 | ||
| 226 | (defun eudc-bob-play-sound-at-mouse (event) | 216 | (defun eudc-bob-play-sound-at-mouse (event) |
| 227 | "Play the sound data contained in the button where EVENT occurred." | 217 | "Play the sound data contained in the button where EVENT occurred." |
| @@ -230,7 +220,6 @@ display a button." | |||
| 230 | (eudc-jump-to-event event) | 220 | (eudc-jump-to-event event) |
| 231 | (eudc-bob-play-sound-at-point))) | 221 | (eudc-bob-play-sound-at-point))) |
| 232 | 222 | ||
| 233 | |||
| 234 | (defun eudc-bob-save-object () | 223 | (defun eudc-bob-save-object () |
| 235 | "Save the object data of the button at point." | 224 | "Save the object data of the button at point." |
| 236 | (interactive) | 225 | (interactive) |
| @@ -318,6 +307,14 @@ display a button." | |||
| 318 | [down-mouse-2]) 'browse-url-at-mouse) | 307 | [down-mouse-2]) 'browse-url-at-mouse) |
| 319 | map)) | 308 | map)) |
| 320 | 309 | ||
| 310 | (setq eudc-bob-mail-keymap | ||
| 311 | (let ((map (make-sparse-keymap))) | ||
| 312 | (define-key map [return] 'goto-address-at-point) | ||
| 313 | (define-key map (if eudc-xemacs-p | ||
| 314 | [button2] | ||
| 315 | [down-mouse-2]) 'goto-address-at-mouse) | ||
| 316 | map)) | ||
| 317 | |||
| 321 | (set-keymap-parent eudc-bob-image-keymap eudc-bob-generic-keymap) | 318 | (set-keymap-parent eudc-bob-image-keymap eudc-bob-generic-keymap) |
| 322 | (set-keymap-parent eudc-bob-sound-keymap eudc-bob-generic-keymap) | 319 | (set-keymap-parent eudc-bob-sound-keymap eudc-bob-generic-keymap) |
| 323 | 320 | ||
| @@ -348,6 +345,12 @@ display a button." | |||
| 348 | (eudc-bob-make-button url eudc-bob-url-keymap)) | 345 | (eudc-bob-make-button url eudc-bob-url-keymap)) |
| 349 | 346 | ||
| 350 | ;;;###autoload | 347 | ;;;###autoload |
| 348 | (defun eudc-display-mail (mail) | ||
| 349 | "Display e-mail address and make it clickable." | ||
| 350 | (require 'goto-addr) | ||
| 351 | (eudc-bob-make-button mail eudc-bob-mail-keymap)) | ||
| 352 | |||
| 353 | ;;;###autoload | ||
| 351 | (defun eudc-display-sound (data) | 354 | (defun eudc-display-sound (data) |
| 352 | "Display a button to play the sound DATA." | 355 | "Display a button to play the sound DATA." |
| 353 | (eudc-bob-display-audio data)) | 356 | (eudc-bob-display-audio data)) |