[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/net/eudc-bob.el
From: |
Pavel Janík |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/net/eudc-bob.el |
Date: |
Wed, 16 Jan 2002 03:02:10 -0500 |
Index: emacs/lisp/net/eudc-bob.el
diff -c emacs/lisp/net/eudc-bob.el:1.8 emacs/lisp/net/eudc-bob.el:1.9
*** emacs/lisp/net/eudc-bob.el:1.8 Sun Jan 6 11:29:56 2002
--- emacs/lisp/net/eudc-bob.el Wed Jan 16 03:02:10 2002
***************
*** 2,9 ****
;; Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
! ;; Author: Oscar Figueiredo <address@hidden>
! ;; Maintainer: Oscar Figueiredo <address@hidden>
;; Keywords: comm
;; This file is part of GNU Emacs.
--- 2,9 ----
;; Copyright (C) 1999, 2000, 2002 Free Software Foundation, Inc.
! ;; Author: Oscar Figueiredo <address@hidden>
! ;; Maintainer: Pavel Janík <address@hidden>
;; Keywords: comm
;; This file is part of GNU Emacs.
***************
*** 44,49 ****
--- 44,52 ----
(defvar eudc-bob-url-keymap nil
"Keymap for inline urls.")
+ (defvar eudc-bob-mail-keymap nil
+ "Keymap for inline e-mail addresses.")
+
(defconst eudc-bob-generic-menu
'("EUDC Binary Object Menu"
["---" nil nil]
***************
*** 206,227 ****
(let (sound)
(if (null (setq sound (eudc-bob-get-overlay-prop 'object-data)))
(error "No sound data available here")
! (cond (eudc-xemacs-p
! (if (not (and (boundp 'sound-alist)
! sound-alist))
! (error "Don't know how to play sound on this Emacs version")
! (setq sound-alist
! (cons (list 'eudc-sound
! :sound sound)
! sound-alist))
! (condition-case nil
! (play-sound 'eudc-sound)
! (t
! (setq sound-alist (cdr sound-alist))))))
! (t
! (unless (fboundp 'play-sound)
! (error "Playing sounds not supported on this system"))
! (play-sound (list 'sound :data sound)))))))
(defun eudc-bob-play-sound-at-mouse (event)
"Play the sound data contained in the button where EVENT occurred."
--- 209,217 ----
(let (sound)
(if (null (setq sound (eudc-bob-get-overlay-prop 'object-data)))
(error "No sound data available here")
! (unless (fboundp 'play-sound)
! (error "Playing sounds not supported on this system"))
! (play-sound (list 'sound :data sound)))))
(defun eudc-bob-play-sound-at-mouse (event)
"Play the sound data contained in the button where EVENT occurred."
***************
*** 230,236 ****
(eudc-jump-to-event event)
(eudc-bob-play-sound-at-point)))
-
(defun eudc-bob-save-object ()
"Save the object data of the button at point."
(interactive)
--- 220,225 ----
***************
*** 318,323 ****
--- 307,320 ----
[down-mouse-2]) 'browse-url-at-mouse)
map))
+ (setq eudc-bob-mail-keymap
+ (let ((map (make-sparse-keymap)))
+ (define-key map [return] 'goto-address-at-point)
+ (define-key map (if eudc-xemacs-p
+ [button2]
+ [down-mouse-2]) 'goto-address-at-mouse)
+ map))
+
(set-keymap-parent eudc-bob-image-keymap eudc-bob-generic-keymap)
(set-keymap-parent eudc-bob-sound-keymap eudc-bob-generic-keymap)
***************
*** 346,351 ****
--- 343,354 ----
"Display URL and make it clickable."
(require 'browse-url)
(eudc-bob-make-button url eudc-bob-url-keymap))
+
+ ;;;###autoload
+ (defun eudc-display-mail (mail)
+ "Display e-mail address and make it clickable."
+ (require 'goto-addr)
+ (eudc-bob-make-button mail eudc-bob-mail-keymap))
;;;###autoload
(defun eudc-display-sound (data)