summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorsommerfe <sommerfe>1999-02-25 17:08:33 +0000
committersommerfe <sommerfe>1999-02-25 17:08:33 +0000
commit4e09d96d891abf8450070980fcd559fb643527cc (patch)
tree5eeae9885cd9ee60dd533be7d4453f16b74a00e8 /editors
parent44108925c973ba19ae25ed36f5ac2c91678c17d4 (diff)
downloadpkgsrc-4e09d96d891abf8450070980fcd559fb643527cc.tar.gz
Fix mh-e's use of nmh (previous patch was insufficient, as nmh is
split in three parts, not two; also, repl's interface changed in nmh so reply-to-all was busted) Fix report-emacs-bug. Re-byte-compile patched mh-*.el
Diffstat (limited to 'editors')
-rw-r--r--editors/emacs/Makefile6
-rw-r--r--editors/emacs/patches/patch-ac9
-rw-r--r--editors/emacs/patches/patch-ba77
-rw-r--r--editors/emacs/patches/patch-bb146
4 files changed, 228 insertions, 10 deletions
diff --git a/editors/emacs/Makefile b/editors/emacs/Makefile
index b0ade126161..5f9352f5436 100644
--- a/editors/emacs/Makefile
+++ b/editors/emacs/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.25 1999/02/20 22:48:27 hubertf Exp $
+# $NetBSD: Makefile,v 1.26 1999/02/25 17:08:33 sommerfe Exp $
# FreeBSD Id: Makefile,v 1.30 1997/12/14 02:03:53 asami Exp
#
@@ -21,6 +21,10 @@ INSTALL_PROGRAM= ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
pre-install:
@find ${WRKSRC} -type f -name "*.orig" | xargs ${RM} -f
+post-build:
+ (cd ${WRKSRC}/lisp/mail; \
+ ${WRKSRC}/src/emacs -batch -f batch-byte-compile mh-comp.el mh-utils.el)
+
post-install:
chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/share/emacs
diff --git a/editors/emacs/patches/patch-ac b/editors/emacs/patches/patch-ac
deleted file mode 100644
index f4cb3aa0e24..00000000000
--- a/editors/emacs/patches/patch-ac
+++ /dev/null
@@ -1,9 +0,0 @@
-$NetBSD: patch-ac,v 1.7 1998/09/04 02:28:53 tron Exp $
-
---- /dev/null Fri Aug 28 10:35:45 1998
-+++ lisp/site-load.el Fri Aug 28 12:51:28 1998
-@@ -0,0 +1,4 @@
-+;; MH files from nmh package are at an unexpected location.
-+
-+(setq mh-progs "/usr/pkg/bin")
-+(setq mh-lib "/usr/pkg/libexec/nmh")
diff --git a/editors/emacs/patches/patch-ba b/editors/emacs/patches/patch-ba
new file mode 100644
index 00000000000..73b3024b8b1
--- /dev/null
+++ b/editors/emacs/patches/patch-ba
@@ -0,0 +1,77 @@
+$NetBSD: patch-ba,v 1.1 1999/02/25 17:08:34 sommerfe Exp $
+
+--- mh-comp.el.~1~ Thu Feb 25 01:31:23 1999
++++ mh-comp.el Thu Feb 25 11:45:24 1999
+@@ -147,6 +147,13 @@
+ is searched for first in the user's MH directory, then in the
+ system MH lib directory.")
+
++(defvar mh-repl-group-formfile "replgroupcomps"
++ "Name of file to be used as a skeleton for replying to the sender
++and all recipients of a messages. Only used if mh-nmh-p is non-nil.
++Default is \"replgroupcomps\". If not an absolute file name, the file
++is searched for first in the user's MH directory, then in the system
++MH lib directory.")
++
+ ;;; Hooks:
+
+ (defcustom mh-letter-mode-hook nil
+@@ -217,7 +224,7 @@
+
+
+ ;;;###autoload
+-(defun mh-smail-batch (&rest ignored)
++(defun mh-smail-batch (&optional to subject other-headers &rest ignored)
+ "Set up a mail composition draft with the MH mail system.
+ This function is an entry point to mh-e, the Emacs front end
+ to the MH mail system. This function does not prompt the user
+@@ -226,7 +233,7 @@
+ Users should use `\\[mh-smail]' to compose mail."
+ (mh-find-path)
+ (let ((mh-error-if-no-draft t))
+- (mh-send "" "" "")))
++ (mh-send to "" subject)))
+
+
+ (defun mh-edit-again (msg)
+@@ -407,25 +414,32 @@
+ (interactive (list (mh-get-msg-num t) current-prefix-arg))
+ (let ((minibuffer-help-form
+ "from => Sender only\nto => Sender and primary recipients\ncc or all => Sender and all recipients"))
+- (let ((reply-to (or mh-reply-default-reply-to
++ (let* ((reply-to (or mh-reply-default-reply-to
+ (completing-read "Reply to whom: "
+ '(("from") ("to") ("cc") ("all"))
+ nil
+ t)))
+- (folder mh-current-folder)
+- (show-buffer mh-show-buffer)
+- (config (current-window-configuration)))
++ (folder mh-current-folder)
++ (show-buffer mh-show-buffer)
++ (config (current-window-configuration))
++ (group-reply (or (equal reply-to "cc") (equal reply-to "all")))
++ (form-file (cond ((and mh-nmh-p group-reply
++ (stringp mh-repl-group-formfile))
++ mh-repl-group-formfile)
++ ((stringp mh-repl-formfile) mh-repl-formfile)
++ (t nil))))
+ (message "Composing a reply...")
+ (mh-exec-cmd "repl" "-build" "-noquery" "-nodraftfolder"
+- (if (stringp mh-repl-formfile) ;must be string, but we're paranoid
+- (list "-form" mh-repl-formfile))
++ (if form-file
++ (list "-form" form-file))
+ mh-current-folder message
+ (cond ((or (equal reply-to "from") (equal reply-to ""))
+ '("-nocc" "all"))
+ ((equal reply-to "to")
+ '("-cc" "to"))
+- ((or (equal reply-to "cc") (equal reply-to "all"))
+- '("-group" "-cc" "all" "-nocc" "me")))
++ (group-reply (if mh-nmh-p
++ '("-group" "-nocc" "me")
++ '("-cc" "all" "-nocc" "me"))))
+ (if includep
+ '("-filter" "mhl.reply")))
+ (let ((draft (mh-read-draft "reply"
diff --git a/editors/emacs/patches/patch-bb b/editors/emacs/patches/patch-bb
new file mode 100644
index 00000000000..b244f19e626
--- /dev/null
+++ b/editors/emacs/patches/patch-bb
@@ -0,0 +1,146 @@
+$NetBSD: patch-bb,v 1.1 1999/02/25 17:08:34 sommerfe Exp $
+
+--- mh-utils.el.~1~ Thu Feb 25 01:31:26 1999
++++ mh-utils.el Thu Feb 25 11:21:45 1999
+@@ -38,12 +38,24 @@
+ (defvar mh-lib nil
+ "Directory containing the MH library.
+ This directory contains, among other things,
+-the mhl program and the components file.")
++the components file.")
++
++(defvar mh-lib-progs nil
++ "Directory containing MH helper programs.
++This directory contains, among other things,
++the mhl program.")
++
++(defvar mh-nmh-p nil
++ "Non-nil if nmh is installed on this system instead of MH")
+
+ ;;;###autoload
+ (put 'mh-progs 'risky-local-variable t)
+ ;;;###autoload
+ (put 'mh-lib 'risky-local-variable t)
++;;;###autoload
++(put 'mh-lib-progs 'risky-local-variable t)
++;;;###autoload
++(put 'mh-nmh-p 'risky-local-variable t)
+
+ ;;; User preferences:
+
+@@ -532,7 +544,7 @@
+ (defvar mail-user-agent 'mh-e-user-agent) ;from reporter.el 3.2
+
+ (defun mh-find-path ()
+- ;; Set mh-progs and mh-lib.
++ ;; Set mh-progs, mh-lib, and mh-libs-progs
+ ;; (This step is necessary if MH was installed after this Emacs was dumped.)
+ ;; From profile file, set mh-user-path, mh-draft-folder,
+ ;; mh-unseen-seq, mh-previous-seq, mh-inbox.
+@@ -587,7 +599,8 @@
+
+ (defun mh-find-progs ()
+ "Find the `inc' and `mhl' programs of MH.
+-Set the `mh-progs' and `mh-lib' variables to the file names."
++Set the `mh-progs' and `mh-lib', and `mh-lib-progs' variables to the
++directory names."
+ (or (and mh-progs (mh-file-command-p (expand-file-name "inc" mh-progs)))
+ (setq mh-progs
+ (or (mh-path-search exec-path "inc")
+@@ -596,38 +609,53 @@
+ "/usr/bin/mh/" ;Ultrix 4.2
+ "/usr/new/mh/" ;Ultrix <4.2
+ "/usr/contrib/mh/bin/" ;BSDI
++ "/usr/pkg/bin/" ; NetBSD
+ "/usr/local/bin/"
+ )
+ "inc"))))
++ (or (null mh-progs)
++ (let ((mh-base mh-progs))
++ (while (let ((dir-name (file-name-nondirectory
++ (directory-file-name mh-base))))
++ (or (string= "mh" dir-name)
++ (string= "bin" dir-name)))
++ (setq mh-base
++ (file-name-directory (directory-file-name mh-base))))
++ (or (and mh-lib
++ (file-exists-p (expand-file-name "components" mh-lib)))
++ (setq mh-lib
++ ;; Look for a lib directory roughly parallel to the bin
++ ;; directory: Strip any trailing `mh' or `bin' path
++ ;; components, then look for lib/mh or mh/lib.
++ (or (mh-path-search
++ (list (expand-file-name "lib/mh" mh-base)
++ (expand-file-name "etc/nmh" mh-base) ; NetBSD
++ (expand-file-name "mh/lib" mh-base))
++ "components"
++ 'file-exists-p))))
++ (or (and mh-lib-progs
++ (mh-file-command-p (expand-file-name "mhl" mh-lib-progs)))
++ (setq mh-lib-progs
++ (or (mh-path-search
++ (list (expand-file-name "lib/mh" mh-base)
++ (expand-file-name "libexec/nmh" mh-base) ; NetBSD
++ (expand-file-name "mh/lib" mh-base))
++ "mhl")
++ (mh-path-search '("/usr/local/bin/mh/") "mhl")
++ (mh-path-search exec-path "mhl") ;unlikely
++ )))))
++ (unless (and mh-progs mh-lib mh-lib-progs)
++ (error "Cannot find the commands `inc' and `mhl' and the file `components'"))
++ (setq mh-nmh-p (not (null
++ (or (string-match "nmh" mh-lib-progs)
++ (string-match "nmh" mh-lib))))))
+
+- (or (and mh-lib (mh-file-command-p (expand-file-name "mhl" mh-lib)))
+- (null mh-progs)
+- (setq mh-lib
+- ;; Look for a lib directory roughly parallel to the bin
+- ;; directory: Strip any trailing `mh' or `bin' path
+- ;; components, then look for lib/mh or mh/lib.
+- (or (let ((mh-base mh-progs))
+- (while (let ((dir-name (file-name-nondirectory
+- (directory-file-name mh-base))))
+- (or (string= "mh" dir-name)
+- (string= "bin" dir-name)))
+- (setq mh-base
+- (file-name-directory (directory-file-name mh-base))))
+- (mh-path-search
+- (list (expand-file-name "lib/mh/" mh-base)
+- (expand-file-name "mh/lib/" mh-base))
+- "mhl"))
+- (mh-path-search '("/usr/local/bin/mh/") "mhl")
+- (mh-path-search exec-path "mhl") ;unlikely
+- )))
+- (unless (and mh-progs mh-lib)
+- (error "Cannot find the commands `inc' and `mhl'")))
+-
+-(defun mh-path-search (path file)
++(defun mh-path-search (path file &optional func-p)
+ ;; Search PATH, a list of directory names, for FILE.
+ ;; Returns the element of PATH that contains FILE, or nil if not found.
+ (while (and path
+- (not (mh-file-command-p (expand-file-name file (car path)))))
++ (not (funcall (or func-p 'mh-file-command-p)
++ (expand-file-name file (car path)))))
+ (setq path (cdr path)))
+ (car path))
+
+@@ -646,7 +674,7 @@
+ ;; mh-exec-cmd will display to the user.
+ ;; The MH 5 version of install-mh might try prompt the user
+ ;; for information, which would fail here.
+- (mh-exec-cmd (expand-file-name "install-mh" mh-lib) "-auto")
++ (mh-exec-cmd (expand-file-name "install-mh" mh-lib-progs) "-auto")
+ ;; now try again to read the profile file
+ (erase-buffer)
+ (condition-case err
+@@ -918,7 +946,7 @@
+ (defun mh-exec-lib-cmd-output (command &rest args)
+ ;; Execute MH library command COMMAND with ARGS.
+ ;; Put the output into buffer after point. Set mark after inserted text.
+- (apply 'mh-exec-cmd-output (expand-file-name command mh-lib) nil args))
++ (apply 'mh-exec-cmd-output (expand-file-name command mh-lib-progs) nil args))
+
+
+ (defun mh-handle-process-error (command status)