diff options
| author | Bill Wohler | 2006-02-20 01:24:38 +0000 |
|---|---|---|
| committer | Bill Wohler | 2006-02-20 01:24:38 +0000 |
| commit | ae494f66e7bdfcd94d50111149e6f423e071cbcf (patch) | |
| tree | 80c2ea5ecd32c4e398356f71598459accaedda6b | |
| parent | 5376d5f62558f85fdaf387c0f3abea1873ab9b30 (diff) | |
| download | emacs-ae494f66e7bdfcd94d50111149e6f423e071cbcf.tar.gz emacs-ae494f66e7bdfcd94d50111149e6f423e071cbcf.zip | |
* mh-alias.el (mh-address-mail-regexp)
(mh-goto-address-find-address-at-point): Delete copies from
goto-addr.el. (mh-alias-suggest-alias): Use goto-address-mail-regexp
instead of mh-address-mail-regexp.
(mh-alias-add-address-under-point): Use
goto-address-find-address-at-point instead of
mh-goto-address-find-address-at-point.
* mh-e.el (mh-show-use-goto-addr-flag): Delete.
* mh-show.el (mh-show-mode): Mention goto-address-highlight-p in
docstring.
(mh-show-addr): Call goto-address unconditionally. User should use
goto-address-highlight-p instead of mh-show-use-goto-addr-flag.
| -rw-r--r-- | lisp/mh-e/ChangeLog | 18 | ||||
| -rw-r--r-- | lisp/mh-e/mh-alias.el | 24 | ||||
| -rw-r--r-- | lisp/mh-e/mh-e.el | 16 | ||||
| -rw-r--r-- | lisp/mh-e/mh-show.el | 16 |
4 files changed, 32 insertions, 42 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index ae122bca29d..f484912d490 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,3 +1,21 @@ | |||
| 1 | 2006-02-19 Bill Wohler <wohler@newt.com> | ||
| 2 | |||
| 3 | * mh-alias.el (mh-address-mail-regexp) | ||
| 4 | (mh-goto-address-find-address-at-point): Delete copies from | ||
| 5 | goto-addr.el. | ||
| 6 | (mh-alias-suggest-alias): Use goto-address-mail-regexp instead of | ||
| 7 | mh-address-mail-regexp. | ||
| 8 | (mh-alias-add-address-under-point): Use | ||
| 9 | goto-address-find-address-at-point instead of | ||
| 10 | mh-goto-address-find-address-at-point. | ||
| 11 | |||
| 12 | * mh-e.el (mh-show-use-goto-addr-flag): Delete. | ||
| 13 | |||
| 14 | * mh-show.el (mh-show-mode): Mention goto-address-highlight-p in | ||
| 15 | docstring. | ||
| 16 | (mh-show-addr): Call goto-address unconditionally. User should use | ||
| 17 | goto-address-highlight-p instead of mh-show-use-goto-addr-flag. | ||
| 18 | |||
| 1 | 2006-02-18 Bill Wohler <wohler@newt.com> | 19 | 2006-02-18 Bill Wohler <wohler@newt.com> |
| 2 | 20 | ||
| 3 | * mh-e.el (Version, mh-version): Add +cvs to version. | 21 | * mh-e.el (Version, mh-version): Add +cvs to version. |
diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index 9dc2871241f..6dba65d69df 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el | |||
| @@ -35,6 +35,8 @@ | |||
| 35 | 35 | ||
| 36 | (mh-require-cl) | 36 | (mh-require-cl) |
| 37 | 37 | ||
| 38 | (require 'goto-addr) | ||
| 39 | |||
| 38 | (defvar mh-alias-alist 'not-read | 40 | (defvar mh-alias-alist 'not-read |
| 39 | "Alist of MH aliases.") | 41 | "Alist of MH aliases.") |
| 40 | (defvar mh-alias-blind-alist nil | 42 | (defvar mh-alias-blind-alist nil |
| @@ -62,11 +64,6 @@ alias files listed in your \"Aliasfile:\" MH profile component are | |||
| 62 | automatically included. You can update the alias list manually using | 64 | automatically included. You can update the alias list manually using |
| 63 | \\[mh-alias-reload].") | 65 | \\[mh-alias-reload].") |
| 64 | 66 | ||
| 65 | ;; Copy of `goto-address-mail-regexp'. | ||
| 66 | (defvar mh-address-mail-regexp | ||
| 67 | "[-a-zA-Z0-9._]+@\\([-a-zA-z0-9_]+\\.\\)+[a-zA-Z0-9]+" | ||
| 68 | "A regular expression probably matching an e-mail address.") | ||
| 69 | |||
| 70 | 67 | ||
| 71 | 68 | ||
| 72 | ;;; Alias Loading | 69 | ;;; Alias Loading |
| @@ -343,7 +340,7 @@ NO-COMMA-SWAP is non-nil." | |||
| 343 | ((string-match "^\\(.*\\) +<.*>$" string) | 340 | ((string-match "^\\(.*\\) +<.*>$" string) |
| 344 | ;; Some name <somename@foo.bar> -> recurse -> Some name | 341 | ;; Some name <somename@foo.bar> -> recurse -> Some name |
| 345 | (mh-alias-suggest-alias (match-string 1 string) no-comma-swap)) | 342 | (mh-alias-suggest-alias (match-string 1 string) no-comma-swap)) |
| 346 | ((string-match (concat mh-address-mail-regexp " +(\\(.*\\))$") string) | 343 | ((string-match (concat goto-address-mail-regexp " +(\\(.*\\))$") string) |
| 347 | ;; somename@foo.bar (Some name) -> recurse -> Some name | 344 | ;; somename@foo.bar (Some name) -> recurse -> Some name |
| 348 | (mh-alias-suggest-alias (match-string 1 string) no-comma-swap)) | 345 | (mh-alias-suggest-alias (match-string 1 string) no-comma-swap)) |
| 349 | ((string-match "^\\(Dr\\|Prof\\)\\.? +\\(.*\\)" string) | 346 | ((string-match "^\\(Dr\\|Prof\\)\\.? +\\(.*\\)" string) |
| @@ -595,24 +592,11 @@ filing messages." | |||
| 595 | (defun mh-alias-add-address-under-point () | 592 | (defun mh-alias-add-address-under-point () |
| 596 | "Insert an alias for address under point." | 593 | "Insert an alias for address under point." |
| 597 | (interactive) | 594 | (interactive) |
| 598 | (let ((address (mh-goto-address-find-address-at-point))) | 595 | (let ((address (goto-address-find-address-at-point))) |
| 599 | (if address | 596 | (if address |
| 600 | (mh-alias-add-alias nil address) | 597 | (mh-alias-add-alias nil address) |
| 601 | (message "No email address found under point")))) | 598 | (message "No email address found under point")))) |
| 602 | 599 | ||
| 603 | ;; From goto-addr.el, which we don't want to force-load on users. | ||
| 604 | (defun mh-goto-address-find-address-at-point () | ||
| 605 | "Find e-mail address around or before point. | ||
| 606 | |||
| 607 | Then search backwards to beginning of line for the start of an | ||
| 608 | e-mail address. If no e-mail address found, return nil." | ||
| 609 | (re-search-backward "[^-_A-z0-9.@]" (mh-line-beginning-position) 'lim) | ||
| 610 | (if (or (looking-at mh-address-mail-regexp) ; already at start | ||
| 611 | (and (re-search-forward mh-address-mail-regexp | ||
| 612 | (mh-line-end-position) 'lim) | ||
| 613 | (goto-char (match-beginning 0)))) | ||
| 614 | (mh-match-string-no-properties 0))) | ||
| 615 | |||
| 616 | (defun mh-alias-apropos (regexp) | 600 | (defun mh-alias-apropos (regexp) |
| 617 | "Show all aliases or addresses that match a regular expression REGEXP." | 601 | "Show all aliases or addresses that match a regular expression REGEXP." |
| 618 | (interactive "sAlias regexp: ") | 602 | (interactive "sAlias regexp: ") |
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index f6b737c26f7..3dc509c09f0 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el | |||
| @@ -2615,22 +2615,6 @@ message are shown regardless of size." | |||
| 2615 | :type 'integer | 2615 | :type 'integer |
| 2616 | :group 'mh-show) | 2616 | :group 'mh-show) |
| 2617 | 2617 | ||
| 2618 | (defcustom mh-show-use-goto-addr-flag (and (boundp 'goto-address-highlight-p) | ||
| 2619 | goto-address-highlight-p) | ||
| 2620 | "*Non-nil means highlight URLs and email addresses\\<goto-address-highlight-keymap>. | ||
| 2621 | |||
| 2622 | To send a message using the highlighted email address or to view | ||
| 2623 | the web page for the highlighted URL, use the middle mouse button | ||
| 2624 | or \\[goto-address-at-point]. | ||
| 2625 | |||
| 2626 | See Info node `(mh-e)Sending Mail' to see how to configure Emacs | ||
| 2627 | to send the message using MH-E. | ||
| 2628 | |||
| 2629 | The default value of this option comes from the value of | ||
| 2630 | `goto-address-highlight-p'." | ||
| 2631 | :type 'boolean | ||
| 2632 | :group 'mh-show) | ||
| 2633 | |||
| 2634 | (defcustom mh-show-use-xface-flag (>= emacs-major-version 21) | 2618 | (defcustom mh-show-use-xface-flag (>= emacs-major-version 21) |
| 2635 | "*Non-nil means display face images in MH-show buffers. | 2619 | "*Non-nil means display face images in MH-show buffers. |
| 2636 | 2620 | ||
diff --git a/lisp/mh-e/mh-show.el b/lisp/mh-e/mh-show.el index ab636ae8ab6..3ae609d9204 100644 --- a/lisp/mh-e/mh-show.el +++ b/lisp/mh-e/mh-show.el | |||
| @@ -36,13 +36,13 @@ | |||
| 36 | (require 'mh-e) | 36 | (require 'mh-e) |
| 37 | (require 'mh-scan) | 37 | (require 'mh-scan) |
| 38 | 38 | ||
| 39 | (require 'font-lock) | ||
| 39 | (require 'gnus-cite) | 40 | (require 'gnus-cite) |
| 40 | (require 'gnus-util) | 41 | (require 'gnus-util) |
| 42 | (require 'goto-addr) | ||
| 41 | 43 | ||
| 42 | (autoload 'mh-make-buffer-data "mh-mime") ;can't be automatically generated | 44 | (autoload 'mh-make-buffer-data "mh-mime") ;can't be automatically generated |
| 43 | 45 | ||
| 44 | (require 'font-lock) | ||
| 45 | |||
| 46 | 46 | ||
| 47 | 47 | ||
| 48 | ;;; MH-Folder Commands | 48 | ;;; MH-Folder Commands |
| @@ -818,6 +818,13 @@ operation." | |||
| 818 | (define-derived-mode mh-show-mode text-mode "MH-Show" | 818 | (define-derived-mode mh-show-mode text-mode "MH-Show" |
| 819 | "Major mode for showing messages in MH-E.\\<mh-show-mode-map> | 819 | "Major mode for showing messages in MH-E.\\<mh-show-mode-map> |
| 820 | 820 | ||
| 821 | Email addresses and URLs in the message are highlighted if the | ||
| 822 | option `goto-address-highlight-p' is on, which it is by default. | ||
| 823 | To view the web page for a highlighted URL or to send a message | ||
| 824 | using a highlighted email address, use the middle mouse button or | ||
| 825 | \\[goto-address-at-point]. See Info node `(mh-e)Sending Mail' to | ||
| 826 | see how to configure Emacs to send the message using MH-E. | ||
| 827 | |||
| 821 | The hook `mh-show-mode-hook' is called upon entry to this mode. | 828 | The hook `mh-show-mode-hook' is called upon entry to this mode. |
| 822 | 829 | ||
| 823 | See also `mh-folder-mode'. | 830 | See also `mh-folder-mode'. |
| @@ -877,10 +884,7 @@ See also `mh-folder-mode'. | |||
| 877 | ;;;###mh-autoload | 884 | ;;;###mh-autoload |
| 878 | (defun mh-show-addr () | 885 | (defun mh-show-addr () |
| 879 | "Use `goto-address'." | 886 | "Use `goto-address'." |
| 880 | (when mh-show-use-goto-addr-flag | 887 | (goto-address)) |
| 881 | (mh-require 'goto-addr nil t) | ||
| 882 | (if (fboundp 'goto-address) | ||
| 883 | (goto-address)))) | ||
| 884 | 888 | ||
| 885 | ;;;###mh-autoload | 889 | ;;;###mh-autoload |
| 886 | (defun mh-gnus-article-highlight-citation () | 890 | (defun mh-gnus-article-highlight-citation () |