# HG changeset patch # User Gerd Moellmann # Date 988021014 0 # Node ID 3ab2c865a8e5e98432941b4f75901f73baf10cbc # Parent 98ffe6c6b81532e2e0225a76099a51806082bf88 Instead of defining line-beginning-position and line-end-position a defalias is used for point-at-bol and point-at-eol. Added XEmacs compatibility code. (goto-address-highlight-keymap): Made keybindings XEmacs compatible. diff -r 98ffe6c6b815 -r 3ab2c865a8e5 lisp/net/goto-addr.el --- a/lisp/net/goto-addr.el Mon Apr 23 10:09:46 2001 +0000 +++ b/lisp/net/goto-addr.el Mon Apr 23 10:16:54 2001 +0000 @@ -1,6 +1,6 @@ ;;; goto-addr.el --- click to browse URL or to send to e-mail address -;; Copyright (C) 1995, 2000 Free Software Foundation, Inc. +;; Copyright (C) 1995, 2000, 2001 Free Software Foundation, Inc. ;; Author: Eric Ding ;; Maintainer: FSF @@ -64,6 +64,16 @@ (require 'thingatpt) (autoload 'browse-url-url-at-point "browse-url") +;; XEmacs needs the following definitions. +(unless (fboundp 'overlays-in) + (require 'overlay)) +(unless (fboundp 'line-beginning-position) + (defalias 'line-beginning-position 'point-at-bol)) +(unless (fboundp 'line-end-position) + (defalias 'line-end-position 'point-at-eol)) +(unless (fboundp 'match-string-no-properties) + (defalias 'match-string-no-properties 'match-string)) + (defgroup goto-address nil "Click to browse URL or to send to e-mail address." :group 'mouse @@ -100,8 +110,10 @@ (defvar goto-address-highlight-keymap (let ((m (make-sparse-keymap))) - (define-key m [mouse-2] 'goto-address-at-mouse) - (define-key m "\C-c\r" 'goto-address-at-point) + (if (featurep 'xemacs) + (define-key m (kbd "") 'goto-address-at-mouse) + (define-key m (kbd "") 'goto-address-at-mouse)) + (define-key m (kbd "C-c RET") 'goto-address-at-point) m) "keymap to hold goto-addr's mouse key defs under highlighted URLs.")