+2006-01-11 Bill Wohler <wohler@newt.com>
+
+ * Makefile.in (MH_E_SRC): Rename from MH-E-SRC since the dashes
+ can give some systems gas. Add new file mh-buffers.el.
+
2006-01-06 Masatake YAMATO <jet@gyve.org>
* font-lock.el (cpp-font-lock-keywords): Font lock keywords for
# Update MH-E internal autoloads. These are not to be confused with
# the autoloads for the MH-E entry points, which are already in
# loaddefs.el.
-MH-E-SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el \
- $(lisp)/mh-e/mh-comp.el $(lisp)/mh-e/mh-customize.el \
- $(lisp)/mh-e/mh-e.el $(lisp)/mh-e/mh-funcs.el \
- $(lisp)/mh-e/mh-mime.el $(lisp)/mh-e/mh-pick.el \
- $(lisp)/mh-e/mh-print.el $(lisp)/mh-e/mh-inc.el \
- $(lisp)/mh-e/mh-init.el $(lisp)/mh-e/mh-index.el \
- $(lisp)/mh-e/mh-identity.el $(lisp)/mh-e/mh-junk.el \
- $(lisp)/mh-e/mh-seq.el $(lisp)/mh-e/mh-speed.el \
- $(lisp)/mh-e/mh-utils.el
+MH_E_SRC = $(lisp)/mh-e/mh-acros.el $(lisp)/mh-e/mh-alias.el \
+ $(lisp)/mh-e/mh-buffers.el $(lisp)/mh-e/mh-comp.el \
+ $(lisp)/mh-e/mh-customize.el $(lisp)/mh-e/mh-e.el \
+ $(lisp)/mh-e/mh-funcs.el $(lisp)/mh-e/mh-mime.el \
+ $(lisp)/mh-e/mh-pick.el $(lisp)/mh-e/mh-print.el \
+ $(lisp)/mh-e/mh-inc.el $(lisp)/mh-e/mh-init.el \
+ $(lisp)/mh-e/mh-index.el $(lisp)/mh-e/mh-identity.el \
+ $(lisp)/mh-e/mh-junk.el $(lisp)/mh-e/mh-seq.el \
+ $(lisp)/mh-e/mh-speed.el $(lisp)/mh-e/mh-utils.el
mh-autoloads: $(lisp)/mh-e/mh-loaddefs.el
-$(lisp)/mh-e/mh-loaddefs.el: $(MH-E-SRC)
+$(lisp)/mh-e/mh-loaddefs.el: $(MH_E_SRC)
echo ";;; mh-loaddefs.el --- automatically extracted autoloads" > $@
echo ";;" >> $@
- echo ";; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc." >> $@
+ echo ";; Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc." >> $@
echo ";; Author: Bill Wohler <wohler@newt.com>" >> $@
echo ";; Keywords: mail" >> $@
echo ";;; Commentary:" >> $@
2006-01-11 Bill Wohler <wohler@newt.com>
+ * mh-buffers.el: New file. Contains constants and code from
+ mh-index.el and mh-utils.el.
+
+ * mh-alias.el:
+ * mh-comp.el:
+ * mh-e.el:
+ * mh-funcs.el:
+ * mh-init.el:
+ * mh-junk.el:
+ * mh-mime.el:
+ * mh-print.el:
+ * mh-seq.el: Require new file mh-buffers.el.
+
+ * mh-index.el: Require new file mh-buffers.el.
+ (mh-index-temp-buffer, mh-checksum-buffer): Move to new file
+ mh-buffers.el.
+
+ * mh-utils.el: Require new file mh-buffers.el.
+ (mh-temp-buffer, mh-temp-fetch-buffer)
+ (mh-aliases-buffer, mh-folders-buffer, mh-help-buffer)
+ (mh-info-buffer, mh-log-buffer, mh-mail-delivery-buffer)
+ (mh-recipients-buffer, mh-sequences-buffer, mh-log-buffer-lines)
+ (mh-truncate-log-buffer): Move to new file mh-buffers.el.
+
* mh-comp.el (mh-forward): Cosmetics on prompt when draft exists.
(mh-send-letter): Add -msgid to mh-send-args (closes SF #725425).
(eval-when-compile (require 'mh-acros))
(mh-require-cl)
+(require 'mh-buffers)
(require 'mh-e)
(load "cmr" t t) ; Non-fatal dependency for
; completing-read-multiple.
--- /dev/null
+;;; mh-buffers.el --- Temporary buffer constants and utilities used by MH-E
+
+;; Copyright (C) 1993, 1995, 1997,
+;; 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+
+;; Author: Bill Wohler <wohler@newt.com>
+;; Maintainer: Bill Wohler <wohler@newt.com>
+;; Keywords: mail
+;; See: mh-e.el
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to the
+;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
+
+;;; Commentary:
+
+;; Temporary buffer constants and utilities used by MH-E.
+
+;;; Change Log:
+
+;;; Code:
+
+;; The names of ephemeral buffers have a " *mh-" prefix (so that they
+;; are hidden and can be programmatically removed in mh-quit), and the
+;; variable names have the form mh-temp-.*-buffer.
+(defconst mh-temp-buffer " *mh-temp*") ;scratch
+(defconst mh-temp-checksum-buffer " *mh-checksum*")
+(defconst mh-temp-fetch-buffer " *mh-fetch*") ;wget/curl/fetch output
+(defconst mh-temp-index-buffer " *mh-index*")
+
+;; The names of MH-E buffers that are not ephemeral and can be used by
+;; the user (and deleted by the user when no longer needed) have a
+;; "*MH-E " prefix (so they can be programmatically removed in
+;; mh-quit), and the variable names have the form mh-.*-buffer.
+;; Temporary buffers for search results
+(defconst mh-aliases-buffer "*MH-E Aliases*") ;alias lookups
+(defconst mh-folders-buffer "*MH-E Folders*") ;folder list
+(defconst mh-help-buffer "*MH-E Help*") ;quick help
+(defconst mh-info-buffer "*MH-E Info*") ;version information buffer
+(defconst mh-log-buffer "*MH-E Log*") ;output of MH commands and so on
+(defconst mh-mail-delivery-buffer "*MH-E Mail Delivery*") ;mail delivery log
+(defconst mh-recipients-buffer "*MH-E Recipients*") ;killed when draft sent
+(defconst mh-sequences-buffer "*MH-E Sequences*") ;sequences list
+
+(defvar mh-log-buffer-lines 100
+ "Number of lines to keep in `mh-log-buffer'.")
+
+\f
+
+(defun mh-truncate-log-buffer ()
+ "If `mh-log-buffer' is too big then truncate it.
+If the number of lines in `mh-log-buffer' exceeds
+`mh-log-buffer-lines' then keep only the last
+`mh-log-buffer-lines'. As a side effect the point is set to the
+end of the log buffer.
+
+The function returns the size of the final size of the log buffer."
+ (with-current-buffer (get-buffer-create mh-log-buffer)
+ (goto-char (point-max))
+ (save-excursion
+ (when (equal (forward-line (- mh-log-buffer-lines)) 0)
+ (delete-region (point-min) (point))))
+ (unless (or (bobp)
+ (save-excursion
+ (and (equal (forward-line -1) 0) (equal (char-after) ?\f))))
+ (insert "\n\f\n"))
+ (buffer-size)))
+
+(provide 'mh-buffers)
+
+;; Local Variables:
+;; indent-tabs-mode: nil
+;; sentence-end-double-space: nil
+;; End:
+
+;;; mh-buffers.el ends here
(require 'easymenu)
(require 'gnus-util)
+(require 'mh-buffers)
(require 'mh-e)
(require 'mh-gnus)
(require 'easymenu)
(require 'gnus-util)
+(require 'mh-buffers)
(require 'mh-seq)
(require 'mh-utils)
(eval-when-compile (require 'mh-acros))
(mh-require-cl)
+(require 'mh-buffers)
(require 'mh-e)
\f
(eval-when-compile (require 'mh-acros))
(mh-require-cl)
+(require 'mh-buffers)
(require 'mh-e)
(require 'mh-mime)
(require 'mh-pick)
(defvar mh-index-folder "+mhe-index"
"Folder that contains the folders resulting from the index searches.")
-;; Temporary buffers for search results
-(defvar mh-index-temp-buffer " *mh-index-temp*")
-(defvar mh-checksum-buffer " *mh-checksum-buffer*")
-
\f
;; A few different checksum programs are supported. The supported programs
(clrhash mh-index-msg-checksum-map)
(save-excursion
;; Clear temp buffer
- (set-buffer (get-buffer-create mh-checksum-buffer))
+ (set-buffer (get-buffer-create mh-temp-checksum-buffer))
(erase-buffer)
;; Run scan to check if any messages needs MD5 annotations at all
(with-temp-buffer
(cond ((not (string-match "^[0-9]*$" msg)))
((eolp)
;; need to compute checksum
- (set-buffer mh-checksum-buffer)
+ (set-buffer mh-temp-checksum-buffer)
(insert mh-user-path (substring folder 1) "/" msg "\n"))
(t
;; update maps
In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP
is used to search."
- (set-buffer (get-buffer-create mh-index-temp-buffer))
+ (set-buffer (get-buffer-create mh-temp-index-buffer))
(erase-buffer)
(setq mh-index-pick-folder
(concat "+" (substring folder-path (length mh-user-path))))
In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP
is used to search."
- (set-buffer (get-buffer-create mh-index-temp-buffer))
+ (set-buffer (get-buffer-create mh-temp-index-buffer))
(erase-buffer)
(call-process mh-grep-binary nil '(t nil) nil
"-i" "-r" search-regexp folder-path)
In a program, FOLDER-PATH is the directory in which
SEARCH-REGEXP-LIST is used to search."
- (set-buffer (get-buffer-create mh-index-temp-buffer))
+ (set-buffer (get-buffer-create mh-temp-index-buffer))
(erase-buffer)
(unless mh-mairix-binary
(error "Set `mh-mairix-binary' appropriately"))
folders specified by `mh-flists-search-folders'. If
`mh-recursive-folders-flag' is t, then the folders are searched
recursively. All parameters ARGS are ignored."
- (set-buffer (get-buffer-create mh-index-temp-buffer))
+ (set-buffer (get-buffer-create mh-temp-index-buffer))
(erase-buffer)
(unless (executable-find "sh")
(error "Didn't find sh"))
(expand-file-name "mhpath" mh-progs) " \"+$folder\" " seq "\n"
"done\n"))
(call-process-region
- (point-min) (point-max) "sh" nil (get-buffer mh-index-temp-buffer))))
+ (point-min) (point-max) "sh" nil (get-buffer mh-temp-index-buffer))))
;;;###mh-autoload
(defun mh-index-sequenced-messages (folders sequence)
In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP
is used to search."
- (set-buffer (get-buffer-create mh-index-temp-buffer))
+ (set-buffer (get-buffer-create mh-temp-index-buffer))
(erase-buffer)
(unless mh-swish-binary
(error "Set `mh-swish-binary' appropriately"))
In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is
used to search."
- (set-buffer (get-buffer-create mh-index-temp-buffer))
+ (set-buffer (get-buffer-create mh-temp-index-buffer))
(erase-buffer)
(unless mh-swish++-binary
(error "Set `mh-swish++-binary' appropriately"))
(error "Namazu directory %s not present" namazu-index-directory))
(unless (executable-find mh-namazu-binary)
(error "Set `mh-namazu-binary' appropriately"))
- (set-buffer (get-buffer-create mh-index-temp-buffer))
+ (set-buffer (get-buffer-create mh-temp-index-buffer))
(erase-buffer)
(call-process mh-namazu-binary nil '(t nil) nil
"-alR" search-regexp namazu-index-directory)
(eval-when-compile (require 'mh-acros))
(mh-require-cl)
+(require 'mh-buffers)
(require 'mh-utils)
(defvar mh-sys-path
(eval-when-compile (require 'mh-acros))
(mh-require-cl)
+(require 'mh-buffers)
(require 'mh-e)
;; Interactive functions callable from the folder buffer
(mh-require-cl)
(require 'gnus-util)
+(require 'mh-buffers)
(require 'mh-comp)
(require 'mh-gnus)
;;; mh-print.el --- MH-E printing support
-;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
;; Author: Jeffrey C Honig <jch@honig.net>
;; Maintainer: Bill Wohler <wohler@newt.com>
(eval-when-compile (require 'mh-acros))
(mh-require-cl)
(require 'ps-print)
+(require 'mh-buffers)
(require 'mh-utils)
(require 'mh-funcs)
(eval-when-compile (require 'mh-seq))
(eval-when-compile (require 'mh-acros))
(mh-require-cl)
+(require 'mh-buffers)
(require 'mh-e)
\f
(require 'font-lock)
(require 'gnus-util)
+(require 'mh-buffers)
(require 'mh-customize)
(require 'mh-inc)
(require 'mouse)
Set to \"+inbox\" if no such component.
Name of the Inbox folder.")
-;; The names of ephemeral buffers have a " *mh-" prefix (so that they are
-;; hidden and can be programmatically removed in mh-quit), and the variable
-;; names have the form mh-temp-.*-buffer.
-(defconst mh-temp-buffer " *mh-temp*") ;scratch
-(defconst mh-temp-fetch-buffer " *mh-fetch*") ;wget/curl/fetch output
-
-;; The names of MH-E buffers that are not ephemeral and can be used by the
-;; user (and deleted by the user when no longer needed) have a "*MH-E " prefix
-;; (so they can be programmatically removed in mh-quit), and the variable
-;; names have the form mh-.*-buffer.
-(defconst mh-aliases-buffer "*MH-E Aliases*") ;alias lookups
-(defconst mh-folders-buffer "*MH-E Folders*") ;folder list
-(defconst mh-help-buffer "*MH-E Help*") ;quick help
-(defconst mh-info-buffer "*MH-E Info*") ;version information buffer
-(defconst mh-log-buffer "*MH-E Log*") ;output of MH commands and so on
-(defconst mh-mail-delivery-buffer "*MH-E Mail Delivery*") ;mail delivery log
-(defconst mh-recipients-buffer "*MH-E Recipients*") ;killed when draft sent
-(defconst mh-sequences-buffer "*MH-E Sequences*") ;sequences list
-
-(defvar mh-log-buffer-lines 100
- "Number of lines to keep in `mh-log-buffer'.")
-
(defvar mh-previous-window-config nil
"Window configuration before MH-E command.")
(mh-expand-file-name folder-name)))))
folder-name))
-(defun mh-truncate-log-buffer ()
- "If `mh-log-buffer' is too big then truncate it.
-If the number of lines in `mh-log-buffer' exceeds
-`mh-log-buffer-lines' then keep only the last
-`mh-log-buffer-lines'. As a side effect the point is set to the
-end of the log buffer.
-
-The function returns the size of the final size of the log buffer."
- (with-current-buffer (get-buffer-create mh-log-buffer)
- (goto-char (point-max))
- (save-excursion
- (when (equal (forward-line (- mh-log-buffer-lines)) 0)
- (delete-region (point-min) (point))))
- (unless (or (bobp)
- (save-excursion
- (and (equal (forward-line -1) 0) (equal (char-after) ?\f))))
- (insert "\n\f\n"))
- (buffer-size)))
-
\f
;;; Issue commands to MH.