diff options
| author | Stefan Monnier | 2000-06-05 07:15:58 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-06-05 07:15:58 +0000 |
| commit | f7c4478f99f24baa774b3b9e17a46a0b1a050bda (patch) | |
| tree | 46bc260a41ca51a289b2bff8be063cfe725c16ab | |
| parent | 44bd81eacc510cecaf6a4c4f6f96e61feb4c9966 (diff) | |
| download | emacs-f7c4478f99f24baa774b3b9e17a46a0b1a050bda.tar.gz emacs-f7c4478f99f24baa774b3b9e17a46a0b1a050bda.zip | |
(mh-send-sub): Check mh-etc is bound before using it.
(mh-letter-mode): Derive from text-mode.
This implicitly means that it now calls kill-all-local-variables.
Also remove the Emacs-18 compatibility code.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/mail/mh-comp.el | 25 |
2 files changed, 13 insertions, 17 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 46e78137c20..2d4fa55229b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,10 @@ | |||
| 1 | 2000-06-05 Stefan Monnier <monnier@cs.yale.edu> | 1 | 2000-06-05 Stefan Monnier <monnier@cs.yale.edu> |
| 2 | 2 | ||
| 3 | * mail/mh-comp.el (mh-send-sub): Check mh-etc is bound before using it. | ||
| 4 | (mh-letter-mode): Derive from text-mode. | ||
| 5 | This implicitly means that it now calls kill-all-local-variables. | ||
| 6 | Also remove the Emacs-18 compatibility code. | ||
| 7 | |||
| 3 | * emacs-lisp/autoload.el (make-autoload): Simplify docstring. | 8 | * emacs-lisp/autoload.el (make-autoload): Simplify docstring. |
| 4 | Make use of symbol-property doc-string-elt. | 9 | Make use of symbol-property doc-string-elt. |
| 5 | Use memq rather than a sequence of eq. | 10 | Use memq rather than a sequence of eq. |
diff --git a/lisp/mail/mh-comp.el b/lisp/mail/mh-comp.el index 0a0841b2e6c..5b8828201f2 100644 --- a/lisp/mail/mh-comp.el +++ b/lisp/mail/mh-comp.el | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | 26 | ||
| 27 | ;;; Change Log: | 27 | ;;; Change Log: |
| 28 | 28 | ||
| 29 | ;; $Id: mh-comp.el,v 1.16 1999/11/10 10:46:01 gerd Exp $ | 29 | ;; $Id: mh-comp.el,v 1.17 2000/04/27 18:56:42 gerd Exp $ |
| 30 | 30 | ||
| 31 | ;;; Code: | 31 | ;;; Code: |
| 32 | 32 | ||
| @@ -517,7 +517,9 @@ See also documentation for `\\[mh-send]' function." | |||
| 517 | components) | 517 | components) |
| 518 | ((file-exists-p | 518 | ((file-exists-p |
| 519 | (setq components | 519 | (setq components |
| 520 | (expand-file-name mh-comp-formfile mh-etc))) | 520 | (expand-file-name mh-comp-formfile |
| 521 | ;; What is this mh-etc ?? -sm | ||
| 522 | (and (boundp 'mh-etc) mh-etc)))) | ||
| 521 | components) | 523 | components) |
| 522 | (t | 524 | (t |
| 523 | (error (format "Can't find components file \"%s\"" | 525 | (error (format "Can't find components file \"%s\"" |
| @@ -691,7 +693,7 @@ See also documentation for `\\[mh-send]' function." | |||
| 691 | (put 'mh-letter-mode 'mode-class 'special) | 693 | (put 'mh-letter-mode 'mode-class 'special) |
| 692 | 694 | ||
| 693 | ;;;###autoload | 695 | ;;;###autoload |
| 694 | (defun mh-letter-mode () | 696 | (define-derived-mode mh-letter-mode text-mode "MH-Letter" |
| 695 | "Mode for composing letters in mh-e.\\<mh-letter-mode-map> | 697 | "Mode for composing letters in mh-e.\\<mh-letter-mode-map> |
| 696 | When you have finished composing, type \\[mh-send-letter] to send the message | 698 | When you have finished composing, type \\[mh-send-letter] to send the message |
| 697 | using the MH mail handling system. | 699 | using the MH mail handling system. |
| @@ -720,8 +722,6 @@ Variables controlling this mode (defaults in parentheses): | |||
| 720 | File to be inserted into message by \\[mh-insert-signature]. | 722 | File to be inserted into message by \\[mh-insert-signature]. |
| 721 | 723 | ||
| 722 | This command runs the normal hooks `text-mode-hook' and `mh-letter-mode-hook'." | 724 | This command runs the normal hooks `text-mode-hook' and `mh-letter-mode-hook'." |
| 723 | |||
| 724 | (interactive) | ||
| 725 | (or mh-user-path (mh-find-path)) | 725 | (or mh-user-path (mh-find-path)) |
| 726 | (make-local-variable 'paragraph-start) | 726 | (make-local-variable 'paragraph-start) |
| 727 | (setq paragraph-start (concat "^[ \t]*[-_][-_][-_]+$\\|" paragraph-start)) | 727 | (setq paragraph-start (concat "^[ \t]*[-_][-_][-_]+$\\|" paragraph-start)) |
| @@ -736,19 +736,10 @@ This command runs the normal hooks `text-mode-hook' and `mh-letter-mode-hook'." | |||
| 736 | (make-local-variable 'mh-sent-from-msg) | 736 | (make-local-variable 'mh-sent-from-msg) |
| 737 | (make-local-variable 'mail-header-separator) | 737 | (make-local-variable 'mail-header-separator) |
| 738 | (setq mail-header-separator "--------") ;for Hyperbole | 738 | (setq mail-header-separator "--------") ;for Hyperbole |
| 739 | (use-local-map mh-letter-mode-map) | ||
| 740 | (setq major-mode 'mh-letter-mode) | ||
| 741 | (mh-set-mode-name "MH-Letter") | ||
| 742 | (set-syntax-table mh-letter-mode-syntax-table) | ||
| 743 | (run-hooks 'text-mode-hook) | ||
| 744 | ;; if text-mode-hook turned on auto-fill, tune it for messages | 739 | ;; if text-mode-hook turned on auto-fill, tune it for messages |
| 745 | (cond ((and (boundp 'auto-fill-hook) auto-fill-hook) ;emacs 18 | 740 | (when auto-fill-function |
| 746 | (make-local-variable 'auto-fill-hook) | 741 | (make-local-variable 'auto-fill-function) |
| 747 | (setq auto-fill-hook 'mh-auto-fill-for-letter))) | 742 | (setq auto-fill-function 'mh-auto-fill-for-letter))) |
| 748 | (cond ((and (boundp 'auto-fill-function) auto-fill-function) ;emacs 19 | ||
| 749 | (make-local-variable 'auto-fill-function) | ||
| 750 | (setq auto-fill-function 'mh-auto-fill-for-letter))) | ||
| 751 | (run-hooks 'mh-letter-mode-hook)) | ||
| 752 | 743 | ||
| 753 | 744 | ||
| 754 | (defun mh-auto-fill-for-letter () | 745 | (defun mh-auto-fill-for-letter () |