(defvar mew-highlight-url-face 'bold nil) (setq mew-bold-url-size nil) (add-hook'mew-init-hook '(lambda () (and window-system (define-key mew-message-mode-map [mouse-2] 'browse-url-at-mouse)) (define-key mew-message-mode-map "\C-c\C-b" 'browse-url-at-point))) (add-hook 'mew-message-hook 'mew-message-highlight-url) (defun mew-message-highlight-url () (let ((url-regex "\\b\\(s?https?\\|ftp\\|file\\|gopher\\|news\\|telnet\\|wais\ \|mailto\\):\\(//[-a-zA-Z0-9_.]+:[0-9]*\\)?[-a-zA-Z0-9_=?#$@~`%&*+|\\/.,]*[-a-zA -Z0-9_=#$@~`%&*+|\\/]") overlay) (save-excursion (goto-char (point-min)) (while (re-search-forward url-regex nil t) (setq overlay (make-overlay (match-beginning 0) (match-end 0))) (overlay-put overlay 'face mew-highlight-url-face) (overlay-put overlay 'mouse-face 'highlight) ))))