changeset 88156:bae375b92d33

*** empty log message ***
author Henrik Enberg <henrik.enberg@telia.com>
date Mon, 16 Jan 2006 01:18:13 +0000
parents d7ddb3e565de
children db0ffec3dddd
files lisp/mail/ChangeLog lisp/mail/rmail.el
diffstat 2 files changed, 7 insertions(+), 70 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/ChangeLog	Mon Jan 16 00:03:54 2006 +0000
+++ b/lisp/mail/ChangeLog	Mon Jan 16 01:18:13 2006 +0000
@@ -1,3 +1,9 @@
+2006-01-16  Henrik Enberg  <enberg@printf.se>
+
+	* rmail.el (rmail-url-map, rmail-activate-urls, rmail-visit-url-at-mouse,
+	rmail-visit-url-at-point, rmail-browse-body): Deleted, don't
+	duplicate goto-address functionality.
+
 2004-10-02  Richard M. Stallman  <rms@gnu.org>
 
 	* mail/rmail.el	(rmail): Convert Babyl files using decode-babyl-file.
--- a/lisp/mail/rmail.el	Mon Jan 16 00:03:54 2006 +0000
+++ b/lisp/mail/rmail.el	Mon Jan 16 01:18:13 2006 +0000
@@ -47,7 +47,6 @@
   (require 'rmailsum))
 
 (eval-and-compile
-  (require 'browse-url)
   (require 'rmaildesc)
   (require 'rmailhdr))
 
@@ -898,14 +897,12 @@
 	  (or coding-system 'undecided))))
 
 (defvar rmail-mode-map nil)
-(defvar rmail-url-map nil)
 (if rmail-mode-map
     nil
   (setq rmail-mode-map (make-keymap))
   (suppress-keymap rmail-mode-map)
   (define-key rmail-mode-map "a"      'rmail-add-label)
   (define-key rmail-mode-map "b"      'rmail-bury)
-  (define-key rmail-mode-map "B"      'rmail-browse-body)
   (define-key rmail-mode-map "c"      'rmail-continue)
   (define-key rmail-mode-map "d"      'rmail-delete-forward)
   (define-key rmail-mode-map "\C-d"   'rmail-delete-backward)
@@ -957,14 +954,7 @@
   (define-key rmail-mode-map "\C-c\C-s\C-l" 'rmail-sort-by-lines)
   (define-key rmail-mode-map "\C-c\C-s\C-k" 'rmail-sort-by-labels)
   (define-key rmail-mode-map "\C-c\C-n" 'rmail-next-same-subject)
-  (define-key rmail-mode-map "\C-c\C-p" 'rmail-previous-same-subject)
-
-  ;; Set up a keymap derived from the standard Rmail mode keymap to
-  ;; send activated URLs to a browser.
-  (setq rmail-url-map (make-sparse-keymap))
-  (set-keymap-parent rmail-url-map rmail-mode-map)
-  (define-key rmail-url-map [mouse-2] 'rmail-visit-url-at-mouse)
-  (define-key rmail-url-map "\r" 'rmail-visit-url-at-point))
+  (define-key rmail-mode-map "\C-c\C-p" 'rmail-previous-same-subject))
 
 (define-key rmail-mode-map [menu-bar] (make-sparse-keymap))
 
@@ -2358,7 +2348,6 @@
 	;; Deal with the message headers and URLs..
 	(rmail-header-hide-headers)
 	(rmail-highlight-headers)
-	(rmail-activate-urls)
 
 	;; ?
 	(if transient-mark-mode (deactivate-mark))
@@ -3677,64 +3666,6 @@
      (setq i (1+ i)))
    (concat string-vector)))
 
-;;;; Browser related functions
-
-(defun rmail-activate-urls ()
-  "Highlight URLs embedded in the message body."
-  (save-excursion
-    (goto-char (point-min))
-    (search-forward "\n\n" nil t)
-    (browse-url-activate-urls (point) (point-max)
-                              'bold 'bold-italic 'highlight rmail-url-map)))
-
-;;; mbox: not ready, there is a bug here which I don't
-;;; understand. When invoked with the summary buffer as the current
-;;; buffer, the save-excursion does not seem to work.  -pmr
-(defun rmail-visit-url-at-mouse (event)
-  "Visit the URL underneath the mouse."
-  (interactive "e")
-  (save-window-excursion
-
-    ;; Determine if the function has been invoked from a summary
-    ;; buffer.
-    (if (eq major-mode 'rmail-summary-mode)
-
-        ;; It has.  DTRT.
-        (progn
-          (set-buffer rmail-buffer)
-          (save-excursion
-            (browse-url-at-mouse event)
-            (rmail-show-message rmail-current-message))
-          (switch-to-buffer rmail-summary-buffer))
-
-      ;; The function has been invoked from an Rmail buffer.  Visit the
-      ;; URL and then repaint the current message to reflect a visited
-      ;; URL.
-      (browse-url-at-mouse event)
-      (rmail-show-message rmail-current-message))))
-
-(defun rmail-visit-url-at-point ()
-  "Visit the URL at point."
-  (interactive)
-  (save-excursion
-
-    ;; Visit the URL and then repaint the current message to reflect a
-    ;; visited URL.
-    (browse-url-at-point)
-    (rmail-show-message rmail-current-message)))
-
-(defun rmail-browse-body ()
-  "Send the message body to a browser to be rendered."
-  (interactive)
-  (if (= rmail-total-messages 0)
-      (error "No messages in this file"))
-  (save-excursion
-    (save-restriction
-      (goto-char (point-min))
-      (search-forward "\n\n" (point-max) t)
-      (narrow-to-region (point) (point-max))
-      (browse-url-of-buffer))))
-
 ;;; New functions that need better placement.
 (defun rmail-get-sender ()
   "Return the message sender.