diff options
| author | Bill Wohler | 2006-01-11 19:50:07 +0000 |
|---|---|---|
| committer | Bill Wohler | 2006-01-11 19:50:07 +0000 |
| commit | 9c2cf222ca61e490c5fd52f712ffe3ec5a3e4da5 (patch) | |
| tree | ab6930e9f90ae4505c62698842023b4b177c592b /lisp/mh-e | |
| parent | 4076cbf66cef35e6682dbdef56eb127d0bb0fdbf (diff) | |
| download | emacs-9c2cf222ca61e490c5fd52f712ffe3ec5a3e4da5.tar.gz emacs-9c2cf222ca61e490c5fd52f712ffe3ec5a3e4da5.zip | |
* Makefile (MH_E_SRC): Add mh-buffers.el.
* emacs/lisp/Makefile.in (MH_E_SRC): Rename from MH-E-SRC since the
dashes can give some systems gas. Add new file mh-buffers.el.
* emacs/lisp/mh-e/mh-buffers.el: New file. Contains constants and code
from mh-index.el and mh-utils.el.
* emacs/lisp/mh-e/mh-alias.el:
* emacs/lisp/mh-e/mh-comp.el:
* emacs/lisp/mh-e/mh-e.el:
* emacs/lisp/mh-e/mh-funcs.el:
* emacs/lisp/mh-e/mh-init.el:
* emacs/lisp/mh-e/mh-junk.el:
* emacs/lisp/mh-e/mh-mime.el:
* emacs/lisp/mh-e/mh-print.el:
* emacs/lisp/mh-e/mh-seq.el: Require new file mh-buffers.el.
* emacs/lisp/mh-e/mh-index.el: Require new file mh-buffers.el.
(mh-index-temp-buffer, mh-checksum-buffer): Move to new file
mh-buffers.el.
* emacs/lisp/mh-e/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.
Diffstat (limited to 'lisp/mh-e')
| -rw-r--r-- | lisp/mh-e/ChangeLog | 24 | ||||
| -rw-r--r-- | lisp/mh-e/mh-alias.el | 1 | ||||
| -rw-r--r-- | lisp/mh-e/mh-buffers.el | 89 | ||||
| -rw-r--r-- | lisp/mh-e/mh-comp.el | 1 | ||||
| -rw-r--r-- | lisp/mh-e/mh-e.el | 1 | ||||
| -rw-r--r-- | lisp/mh-e/mh-funcs.el | 1 | ||||
| -rw-r--r-- | lisp/mh-e/mh-index.el | 25 | ||||
| -rw-r--r-- | lisp/mh-e/mh-init.el | 1 | ||||
| -rw-r--r-- | lisp/mh-e/mh-junk.el | 1 | ||||
| -rw-r--r-- | lisp/mh-e/mh-mime.el | 1 | ||||
| -rw-r--r-- | lisp/mh-e/mh-print.el | 3 | ||||
| -rw-r--r-- | lisp/mh-e/mh-seq.el | 1 | ||||
| -rw-r--r-- | lisp/mh-e/mh-utils.el | 42 |
13 files changed, 135 insertions, 56 deletions
diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 6e7fd1ac7d7..4558c336e2a 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog | |||
| @@ -1,5 +1,29 @@ | |||
| 1 | 2006-01-11 Bill Wohler <wohler@newt.com> | 1 | 2006-01-11 Bill Wohler <wohler@newt.com> |
| 2 | 2 | ||
| 3 | * mh-buffers.el: New file. Contains constants and code from | ||
| 4 | mh-index.el and mh-utils.el. | ||
| 5 | |||
| 6 | * mh-alias.el: | ||
| 7 | * mh-comp.el: | ||
| 8 | * mh-e.el: | ||
| 9 | * mh-funcs.el: | ||
| 10 | * mh-init.el: | ||
| 11 | * mh-junk.el: | ||
| 12 | * mh-mime.el: | ||
| 13 | * mh-print.el: | ||
| 14 | * mh-seq.el: Require new file mh-buffers.el. | ||
| 15 | |||
| 16 | * mh-index.el: Require new file mh-buffers.el. | ||
| 17 | (mh-index-temp-buffer, mh-checksum-buffer): Move to new file | ||
| 18 | mh-buffers.el. | ||
| 19 | |||
| 20 | * mh-utils.el: Require new file mh-buffers.el. | ||
| 21 | (mh-temp-buffer, mh-temp-fetch-buffer) | ||
| 22 | (mh-aliases-buffer, mh-folders-buffer, mh-help-buffer) | ||
| 23 | (mh-info-buffer, mh-log-buffer, mh-mail-delivery-buffer) | ||
| 24 | (mh-recipients-buffer, mh-sequences-buffer, mh-log-buffer-lines) | ||
| 25 | (mh-truncate-log-buffer): Move to new file mh-buffers.el. | ||
| 26 | |||
| 3 | * mh-comp.el (mh-forward): Cosmetics on prompt when draft exists. | 27 | * mh-comp.el (mh-forward): Cosmetics on prompt when draft exists. |
| 4 | (mh-send-letter): Add -msgid to mh-send-args (closes SF #725425). | 28 | (mh-send-letter): Add -msgid to mh-send-args (closes SF #725425). |
| 5 | 29 | ||
diff --git a/lisp/mh-e/mh-alias.el b/lisp/mh-e/mh-alias.el index c1476a26535..af369e0a477 100644 --- a/lisp/mh-e/mh-alias.el +++ b/lisp/mh-e/mh-alias.el | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | 33 | ||
| 34 | (eval-when-compile (require 'mh-acros)) | 34 | (eval-when-compile (require 'mh-acros)) |
| 35 | (mh-require-cl) | 35 | (mh-require-cl) |
| 36 | (require 'mh-buffers) | ||
| 36 | (require 'mh-e) | 37 | (require 'mh-e) |
| 37 | (load "cmr" t t) ; Non-fatal dependency for | 38 | (load "cmr" t t) ; Non-fatal dependency for |
| 38 | ; completing-read-multiple. | 39 | ; completing-read-multiple. |
diff --git a/lisp/mh-e/mh-buffers.el b/lisp/mh-e/mh-buffers.el new file mode 100644 index 00000000000..88fb043a800 --- /dev/null +++ b/lisp/mh-e/mh-buffers.el | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | ;;; mh-buffers.el --- Temporary buffer constants and utilities used by MH-E | ||
| 2 | |||
| 3 | ;; Copyright (C) 1993, 1995, 1997, | ||
| 4 | ;; 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. | ||
| 5 | |||
| 6 | ;; Author: Bill Wohler <wohler@newt.com> | ||
| 7 | ;; Maintainer: Bill Wohler <wohler@newt.com> | ||
| 8 | ;; Keywords: mail | ||
| 9 | ;; See: mh-e.el | ||
| 10 | |||
| 11 | ;; This file is part of GNU Emacs. | ||
| 12 | |||
| 13 | ;; GNU Emacs is free software; you can redistribute it and/or modify | ||
| 14 | ;; it under the terms of the GNU General Public License as published by | ||
| 15 | ;; the Free Software Foundation; either version 2, or (at your option) | ||
| 16 | ;; any later version. | ||
| 17 | |||
| 18 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 19 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 20 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 21 | ;; GNU General Public License for more details. | ||
| 22 | |||
| 23 | ;; You should have received a copy of the GNU General Public License | ||
| 24 | ;; along with GNU Emacs; see the file COPYING. If not, write to the | ||
| 25 | ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 26 | ;; Boston, MA 02110-1301, USA. | ||
| 27 | |||
| 28 | ;;; Commentary: | ||
| 29 | |||
| 30 | ;; Temporary buffer constants and utilities used by MH-E. | ||
| 31 | |||
| 32 | ;;; Change Log: | ||
| 33 | |||
| 34 | ;;; Code: | ||
| 35 | |||
| 36 | ;; The names of ephemeral buffers have a " *mh-" prefix (so that they | ||
| 37 | ;; are hidden and can be programmatically removed in mh-quit), and the | ||
| 38 | ;; variable names have the form mh-temp-.*-buffer. | ||
| 39 | (defconst mh-temp-buffer " *mh-temp*") ;scratch | ||
| 40 | (defconst mh-temp-checksum-buffer " *mh-checksum*") | ||
| 41 | (defconst mh-temp-fetch-buffer " *mh-fetch*") ;wget/curl/fetch output | ||
| 42 | (defconst mh-temp-index-buffer " *mh-index*") | ||
| 43 | |||
| 44 | ;; The names of MH-E buffers that are not ephemeral and can be used by | ||
| 45 | ;; the user (and deleted by the user when no longer needed) have a | ||
| 46 | ;; "*MH-E " prefix (so they can be programmatically removed in | ||
| 47 | ;; mh-quit), and the variable names have the form mh-.*-buffer. | ||
| 48 | ;; Temporary buffers for search results | ||
| 49 | (defconst mh-aliases-buffer "*MH-E Aliases*") ;alias lookups | ||
| 50 | (defconst mh-folders-buffer "*MH-E Folders*") ;folder list | ||
| 51 | (defconst mh-help-buffer "*MH-E Help*") ;quick help | ||
| 52 | (defconst mh-info-buffer "*MH-E Info*") ;version information buffer | ||
| 53 | (defconst mh-log-buffer "*MH-E Log*") ;output of MH commands and so on | ||
| 54 | (defconst mh-mail-delivery-buffer "*MH-E Mail Delivery*") ;mail delivery log | ||
| 55 | (defconst mh-recipients-buffer "*MH-E Recipients*") ;killed when draft sent | ||
| 56 | (defconst mh-sequences-buffer "*MH-E Sequences*") ;sequences list | ||
| 57 | |||
| 58 | (defvar mh-log-buffer-lines 100 | ||
| 59 | "Number of lines to keep in `mh-log-buffer'.") | ||
| 60 | |||
| 61 | |||
| 62 | |||
| 63 | (defun mh-truncate-log-buffer () | ||
| 64 | "If `mh-log-buffer' is too big then truncate it. | ||
| 65 | If the number of lines in `mh-log-buffer' exceeds | ||
| 66 | `mh-log-buffer-lines' then keep only the last | ||
| 67 | `mh-log-buffer-lines'. As a side effect the point is set to the | ||
| 68 | end of the log buffer. | ||
| 69 | |||
| 70 | The function returns the size of the final size of the log buffer." | ||
| 71 | (with-current-buffer (get-buffer-create mh-log-buffer) | ||
| 72 | (goto-char (point-max)) | ||
| 73 | (save-excursion | ||
| 74 | (when (equal (forward-line (- mh-log-buffer-lines)) 0) | ||
| 75 | (delete-region (point-min) (point)))) | ||
| 76 | (unless (or (bobp) | ||
| 77 | (save-excursion | ||
| 78 | (and (equal (forward-line -1) 0) (equal (char-after) ?)))) | ||
| 79 | (insert "\n\n")) | ||
| 80 | (buffer-size))) | ||
| 81 | |||
| 82 | (provide 'mh-buffers) | ||
| 83 | |||
| 84 | ;; Local Variables: | ||
| 85 | ;; indent-tabs-mode: nil | ||
| 86 | ;; sentence-end-double-space: nil | ||
| 87 | ;; End: | ||
| 88 | |||
| 89 | ;;; mh-buffers.el ends here | ||
diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index 1912c5e0594..6457638b29a 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | 38 | ||
| 39 | (require 'easymenu) | 39 | (require 'easymenu) |
| 40 | (require 'gnus-util) | 40 | (require 'gnus-util) |
| 41 | (require 'mh-buffers) | ||
| 41 | (require 'mh-e) | 42 | (require 'mh-e) |
| 42 | (require 'mh-gnus) | 43 | (require 'mh-gnus) |
| 43 | 44 | ||
diff --git a/lisp/mh-e/mh-e.el b/lisp/mh-e/mh-e.el index 43743e3cad2..711c9625fb4 100644 --- a/lisp/mh-e/mh-e.el +++ b/lisp/mh-e/mh-e.el | |||
| @@ -92,6 +92,7 @@ | |||
| 92 | 92 | ||
| 93 | (require 'easymenu) | 93 | (require 'easymenu) |
| 94 | (require 'gnus-util) | 94 | (require 'gnus-util) |
| 95 | (require 'mh-buffers) | ||
| 95 | (require 'mh-seq) | 96 | (require 'mh-seq) |
| 96 | (require 'mh-utils) | 97 | (require 'mh-utils) |
| 97 | 98 | ||
diff --git a/lisp/mh-e/mh-funcs.el b/lisp/mh-e/mh-funcs.el index f19314403e1..ac5f80adbff 100644 --- a/lisp/mh-e/mh-funcs.el +++ b/lisp/mh-e/mh-funcs.el | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | 37 | ||
| 38 | (eval-when-compile (require 'mh-acros)) | 38 | (eval-when-compile (require 'mh-acros)) |
| 39 | (mh-require-cl) | 39 | (mh-require-cl) |
| 40 | (require 'mh-buffers) | ||
| 40 | (require 'mh-e) | 41 | (require 'mh-e) |
| 41 | 42 | ||
| 42 | 43 | ||
diff --git a/lisp/mh-e/mh-index.el b/lisp/mh-e/mh-index.el index 69ef7ca9c1a..8a32947bd95 100644 --- a/lisp/mh-e/mh-index.el +++ b/lisp/mh-e/mh-index.el | |||
| @@ -46,6 +46,7 @@ | |||
| 46 | (eval-when-compile (require 'mh-acros)) | 46 | (eval-when-compile (require 'mh-acros)) |
| 47 | (mh-require-cl) | 47 | (mh-require-cl) |
| 48 | 48 | ||
| 49 | (require 'mh-buffers) | ||
| 49 | (require 'mh-e) | 50 | (require 'mh-e) |
| 50 | (require 'mh-mime) | 51 | (require 'mh-mime) |
| 51 | (require 'mh-pick) | 52 | (require 'mh-pick) |
| @@ -85,10 +86,6 @@ | |||
| 85 | (defvar mh-index-folder "+mhe-index" | 86 | (defvar mh-index-folder "+mhe-index" |
| 86 | "Folder that contains the folders resulting from the index searches.") | 87 | "Folder that contains the folders resulting from the index searches.") |
| 87 | 88 | ||
| 88 | ;; Temporary buffers for search results | ||
| 89 | (defvar mh-index-temp-buffer " *mh-index-temp*") | ||
| 90 | (defvar mh-checksum-buffer " *mh-checksum-buffer*") | ||
| 91 | |||
| 92 | 89 | ||
| 93 | 90 | ||
| 94 | ;; A few different checksum programs are supported. The supported programs | 91 | ;; A few different checksum programs are supported. The supported programs |
| @@ -219,7 +216,7 @@ origin-index) map is updated too." | |||
| 219 | (clrhash mh-index-msg-checksum-map) | 216 | (clrhash mh-index-msg-checksum-map) |
| 220 | (save-excursion | 217 | (save-excursion |
| 221 | ;; Clear temp buffer | 218 | ;; Clear temp buffer |
| 222 | (set-buffer (get-buffer-create mh-checksum-buffer)) | 219 | (set-buffer (get-buffer-create mh-temp-checksum-buffer)) |
| 223 | (erase-buffer) | 220 | (erase-buffer) |
| 224 | ;; Run scan to check if any messages needs MD5 annotations at all | 221 | ;; Run scan to check if any messages needs MD5 annotations at all |
| 225 | (with-temp-buffer | 222 | (with-temp-buffer |
| @@ -236,7 +233,7 @@ origin-index) map is updated too." | |||
| 236 | (cond ((not (string-match "^[0-9]*$" msg))) | 233 | (cond ((not (string-match "^[0-9]*$" msg))) |
| 237 | ((eolp) | 234 | ((eolp) |
| 238 | ;; need to compute checksum | 235 | ;; need to compute checksum |
| 239 | (set-buffer mh-checksum-buffer) | 236 | (set-buffer mh-temp-checksum-buffer) |
| 240 | (insert mh-user-path (substring folder 1) "/" msg "\n")) | 237 | (insert mh-user-path (substring folder 1) "/" msg "\n")) |
| 241 | (t | 238 | (t |
| 242 | ;; update maps | 239 | ;; update maps |
| @@ -1055,7 +1052,7 @@ any sub-folders that may be present. | |||
| 1055 | 1052 | ||
| 1056 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP | 1053 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP |
| 1057 | is used to search." | 1054 | is used to search." |
| 1058 | (set-buffer (get-buffer-create mh-index-temp-buffer)) | 1055 | (set-buffer (get-buffer-create mh-temp-index-buffer)) |
| 1059 | (erase-buffer) | 1056 | (erase-buffer) |
| 1060 | (setq mh-index-pick-folder | 1057 | (setq mh-index-pick-folder |
| 1061 | (concat "+" (substring folder-path (length mh-user-path)))) | 1058 | (concat "+" (substring folder-path (length mh-user-path)))) |
| @@ -1091,7 +1088,7 @@ any sub-folders that may be present. | |||
| 1091 | 1088 | ||
| 1092 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP | 1089 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP |
| 1093 | is used to search." | 1090 | is used to search." |
| 1094 | (set-buffer (get-buffer-create mh-index-temp-buffer)) | 1091 | (set-buffer (get-buffer-create mh-temp-index-buffer)) |
| 1095 | (erase-buffer) | 1092 | (erase-buffer) |
| 1096 | (call-process mh-grep-binary nil '(t nil) nil | 1093 | (call-process mh-grep-binary nil '(t nil) nil |
| 1097 | "-i" "-r" search-regexp folder-path) | 1094 | "-i" "-r" search-regexp folder-path) |
| @@ -1165,7 +1162,7 @@ this daily from cron: | |||
| 1165 | 1162 | ||
| 1166 | In a program, FOLDER-PATH is the directory in which | 1163 | In a program, FOLDER-PATH is the directory in which |
| 1167 | SEARCH-REGEXP-LIST is used to search." | 1164 | SEARCH-REGEXP-LIST is used to search." |
| 1168 | (set-buffer (get-buffer-create mh-index-temp-buffer)) | 1165 | (set-buffer (get-buffer-create mh-temp-index-buffer)) |
| 1169 | (erase-buffer) | 1166 | (erase-buffer) |
| 1170 | (unless mh-mairix-binary | 1167 | (unless mh-mairix-binary |
| 1171 | (error "Set `mh-mairix-binary' appropriately")) | 1168 | (error "Set `mh-mairix-binary' appropriately")) |
| @@ -1287,7 +1284,7 @@ Search for messages belonging to `mh-flists-sequence' in the | |||
| 1287 | folders specified by `mh-flists-search-folders'. If | 1284 | folders specified by `mh-flists-search-folders'. If |
| 1288 | `mh-recursive-folders-flag' is t, then the folders are searched | 1285 | `mh-recursive-folders-flag' is t, then the folders are searched |
| 1289 | recursively. All parameters ARGS are ignored." | 1286 | recursively. All parameters ARGS are ignored." |
| 1290 | (set-buffer (get-buffer-create mh-index-temp-buffer)) | 1287 | (set-buffer (get-buffer-create mh-temp-index-buffer)) |
| 1291 | (erase-buffer) | 1288 | (erase-buffer) |
| 1292 | (unless (executable-find "sh") | 1289 | (unless (executable-find "sh") |
| 1293 | (error "Didn't find sh")) | 1290 | (error "Didn't find sh")) |
| @@ -1306,7 +1303,7 @@ recursively. All parameters ARGS are ignored." | |||
| 1306 | (expand-file-name "mhpath" mh-progs) " \"+$folder\" " seq "\n" | 1303 | (expand-file-name "mhpath" mh-progs) " \"+$folder\" " seq "\n" |
| 1307 | "done\n")) | 1304 | "done\n")) |
| 1308 | (call-process-region | 1305 | (call-process-region |
| 1309 | (point-min) (point-max) "sh" nil (get-buffer mh-index-temp-buffer)))) | 1306 | (point-min) (point-max) "sh" nil (get-buffer mh-temp-index-buffer)))) |
| 1310 | 1307 | ||
| 1311 | ;;;###mh-autoload | 1308 | ;;;###mh-autoload |
| 1312 | (defun mh-index-sequenced-messages (folders sequence) | 1309 | (defun mh-index-sequenced-messages (folders sequence) |
| @@ -1443,7 +1440,7 @@ this daily from cron: | |||
| 1443 | 1440 | ||
| 1444 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP | 1441 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP |
| 1445 | is used to search." | 1442 | is used to search." |
| 1446 | (set-buffer (get-buffer-create mh-index-temp-buffer)) | 1443 | (set-buffer (get-buffer-create mh-temp-index-buffer)) |
| 1447 | (erase-buffer) | 1444 | (erase-buffer) |
| 1448 | (unless mh-swish-binary | 1445 | (unless mh-swish-binary |
| 1449 | (error "Set `mh-swish-binary' appropriately")) | 1446 | (error "Set `mh-swish-binary' appropriately")) |
| @@ -1532,7 +1529,7 @@ instead of \"index\". | |||
| 1532 | 1529 | ||
| 1533 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is | 1530 | In a program, FOLDER-PATH is the directory in which SEARCH-REGEXP is |
| 1534 | used to search." | 1531 | used to search." |
| 1535 | (set-buffer (get-buffer-create mh-index-temp-buffer)) | 1532 | (set-buffer (get-buffer-create mh-temp-index-buffer)) |
| 1536 | (erase-buffer) | 1533 | (erase-buffer) |
| 1537 | (unless mh-swish++-binary | 1534 | (unless mh-swish++-binary |
| 1538 | (error "Set `mh-swish++-binary' appropriately")) | 1535 | (error "Set `mh-swish++-binary' appropriately")) |
| @@ -1615,7 +1612,7 @@ is used to search." | |||
| 1615 | (error "Namazu directory %s not present" namazu-index-directory)) | 1612 | (error "Namazu directory %s not present" namazu-index-directory)) |
| 1616 | (unless (executable-find mh-namazu-binary) | 1613 | (unless (executable-find mh-namazu-binary) |
| 1617 | (error "Set `mh-namazu-binary' appropriately")) | 1614 | (error "Set `mh-namazu-binary' appropriately")) |
| 1618 | (set-buffer (get-buffer-create mh-index-temp-buffer)) | 1615 | (set-buffer (get-buffer-create mh-temp-index-buffer)) |
| 1619 | (erase-buffer) | 1616 | (erase-buffer) |
| 1620 | (call-process mh-namazu-binary nil '(t nil) nil | 1617 | (call-process mh-namazu-binary nil '(t nil) nil |
| 1621 | "-alR" search-regexp namazu-index-directory) | 1618 | "-alR" search-regexp namazu-index-directory) |
diff --git a/lisp/mh-e/mh-init.el b/lisp/mh-e/mh-init.el index 3df0dee0115..6d2f5f5d137 100644 --- a/lisp/mh-e/mh-init.el +++ b/lisp/mh-e/mh-init.el | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | 41 | ||
| 42 | (eval-when-compile (require 'mh-acros)) | 42 | (eval-when-compile (require 'mh-acros)) |
| 43 | (mh-require-cl) | 43 | (mh-require-cl) |
| 44 | (require 'mh-buffers) | ||
| 44 | (require 'mh-utils) | 45 | (require 'mh-utils) |
| 45 | 46 | ||
| 46 | (defvar mh-sys-path | 47 | (defvar mh-sys-path |
diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el index 71d3fbf7b8b..c94bb153025 100644 --- a/lisp/mh-e/mh-junk.el +++ b/lisp/mh-e/mh-junk.el | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | 34 | ||
| 35 | (eval-when-compile (require 'mh-acros)) | 35 | (eval-when-compile (require 'mh-acros)) |
| 36 | (mh-require-cl) | 36 | (mh-require-cl) |
| 37 | (require 'mh-buffers) | ||
| 37 | (require 'mh-e) | 38 | (require 'mh-e) |
| 38 | 39 | ||
| 39 | ;; Interactive functions callable from the folder buffer | 40 | ;; Interactive functions callable from the folder buffer |
diff --git a/lisp/mh-e/mh-mime.el b/lisp/mh-e/mh-mime.el index 0932dab1e94..613eec23fe1 100644 --- a/lisp/mh-e/mh-mime.el +++ b/lisp/mh-e/mh-mime.el | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | (mh-require-cl) | 40 | (mh-require-cl) |
| 41 | 41 | ||
| 42 | (require 'gnus-util) | 42 | (require 'gnus-util) |
| 43 | (require 'mh-buffers) | ||
| 43 | (require 'mh-comp) | 44 | (require 'mh-comp) |
| 44 | (require 'mh-gnus) | 45 | (require 'mh-gnus) |
| 45 | 46 | ||
diff --git a/lisp/mh-e/mh-print.el b/lisp/mh-e/mh-print.el index a4d53731c72..fd837072014 100644 --- a/lisp/mh-e/mh-print.el +++ b/lisp/mh-e/mh-print.el | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | ;;; mh-print.el --- MH-E printing support | 1 | ;;; mh-print.el --- MH-E printing support |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | ;; Author: Jeffrey C Honig <jch@honig.net> | 5 | ;; Author: Jeffrey C Honig <jch@honig.net> |
| 6 | ;; Maintainer: Bill Wohler <wohler@newt.com> | 6 | ;; Maintainer: Bill Wohler <wohler@newt.com> |
| @@ -33,6 +33,7 @@ | |||
| 33 | (eval-when-compile (require 'mh-acros)) | 33 | (eval-when-compile (require 'mh-acros)) |
| 34 | (mh-require-cl) | 34 | (mh-require-cl) |
| 35 | (require 'ps-print) | 35 | (require 'ps-print) |
| 36 | (require 'mh-buffers) | ||
| 36 | (require 'mh-utils) | 37 | (require 'mh-utils) |
| 37 | (require 'mh-funcs) | 38 | (require 'mh-funcs) |
| 38 | (eval-when-compile (require 'mh-seq)) | 39 | (eval-when-compile (require 'mh-seq)) |
diff --git a/lisp/mh-e/mh-seq.el b/lisp/mh-e/mh-seq.el index c24631041d4..5432612ea8c 100644 --- a/lisp/mh-e/mh-seq.el +++ b/lisp/mh-e/mh-seq.el | |||
| @@ -74,6 +74,7 @@ | |||
| 74 | (eval-when-compile (require 'mh-acros)) | 74 | (eval-when-compile (require 'mh-acros)) |
| 75 | (mh-require-cl) | 75 | (mh-require-cl) |
| 76 | 76 | ||
| 77 | (require 'mh-buffers) | ||
| 77 | (require 'mh-e) | 78 | (require 'mh-e) |
| 78 | 79 | ||
| 79 | 80 | ||
diff --git a/lisp/mh-e/mh-utils.el b/lisp/mh-e/mh-utils.el index d9bb6dda979..7f8e24c9a04 100644 --- a/lisp/mh-e/mh-utils.el +++ b/lisp/mh-e/mh-utils.el | |||
| @@ -45,6 +45,7 @@ | |||
| 45 | 45 | ||
| 46 | (require 'font-lock) | 46 | (require 'font-lock) |
| 47 | (require 'gnus-util) | 47 | (require 'gnus-util) |
| 48 | (require 'mh-buffers) | ||
| 48 | (require 'mh-customize) | 49 | (require 'mh-customize) |
| 49 | (require 'mh-inc) | 50 | (require 'mh-inc) |
| 50 | (require 'mouse) | 51 | (require 'mouse) |
| @@ -517,28 +518,6 @@ Name of the Previous sequence.") | |||
| 517 | Set to \"+inbox\" if no such component. | 518 | Set to \"+inbox\" if no such component. |
| 518 | Name of the Inbox folder.") | 519 | Name of the Inbox folder.") |
| 519 | 520 | ||
| 520 | ;; The names of ephemeral buffers have a " *mh-" prefix (so that they are | ||
| 521 | ;; hidden and can be programmatically removed in mh-quit), and the variable | ||
| 522 | ;; names have the form mh-temp-.*-buffer. | ||
| 523 | (defconst mh-temp-buffer " *mh-temp*") ;scratch | ||
| 524 | (defconst mh-temp-fetch-buffer " *mh-fetch*") ;wget/curl/fetch output | ||
| 525 | |||
| 526 | ;; The names of MH-E buffers that are not ephemeral and can be used by the | ||
| 527 | ;; user (and deleted by the user when no longer needed) have a "*MH-E " prefix | ||
| 528 | ;; (so they can be programmatically removed in mh-quit), and the variable | ||
| 529 | ;; names have the form mh-.*-buffer. | ||
| 530 | (defconst mh-aliases-buffer "*MH-E Aliases*") ;alias lookups | ||
| 531 | (defconst mh-folders-buffer "*MH-E Folders*") ;folder list | ||
| 532 | (defconst mh-help-buffer "*MH-E Help*") ;quick help | ||
| 533 | (defconst mh-info-buffer "*MH-E Info*") ;version information buffer | ||
| 534 | (defconst mh-log-buffer "*MH-E Log*") ;output of MH commands and so on | ||
| 535 | (defconst mh-mail-delivery-buffer "*MH-E Mail Delivery*") ;mail delivery log | ||
| 536 | (defconst mh-recipients-buffer "*MH-E Recipients*") ;killed when draft sent | ||
| 537 | (defconst mh-sequences-buffer "*MH-E Sequences*") ;sequences list | ||
| 538 | |||
| 539 | (defvar mh-log-buffer-lines 100 | ||
| 540 | "Number of lines to keep in `mh-log-buffer'.") | ||
| 541 | |||
| 542 | (defvar mh-previous-window-config nil | 521 | (defvar mh-previous-window-config nil |
| 543 | "Window configuration before MH-E command.") | 522 | "Window configuration before MH-E command.") |
| 544 | 523 | ||
| @@ -2388,25 +2367,6 @@ used in searching." | |||
| 2388 | (mh-expand-file-name folder-name))))) | 2367 | (mh-expand-file-name folder-name))))) |
| 2389 | folder-name)) | 2368 | folder-name)) |
| 2390 | 2369 | ||
| 2391 | (defun mh-truncate-log-buffer () | ||
| 2392 | "If `mh-log-buffer' is too big then truncate it. | ||
| 2393 | If the number of lines in `mh-log-buffer' exceeds | ||
| 2394 | `mh-log-buffer-lines' then keep only the last | ||
| 2395 | `mh-log-buffer-lines'. As a side effect the point is set to the | ||
| 2396 | end of the log buffer. | ||
| 2397 | |||
| 2398 | The function returns the size of the final size of the log buffer." | ||
| 2399 | (with-current-buffer (get-buffer-create mh-log-buffer) | ||
| 2400 | (goto-char (point-max)) | ||
| 2401 | (save-excursion | ||
| 2402 | (when (equal (forward-line (- mh-log-buffer-lines)) 0) | ||
| 2403 | (delete-region (point-min) (point)))) | ||
| 2404 | (unless (or (bobp) | ||
| 2405 | (save-excursion | ||
| 2406 | (and (equal (forward-line -1) 0) (equal (char-after) ?)))) | ||
| 2407 | (insert "\n\n")) | ||
| 2408 | (buffer-size))) | ||
| 2409 | |||
| 2410 | 2370 | ||
| 2411 | 2371 | ||
| 2412 | ;;; Issue commands to MH. | 2372 | ;;; Issue commands to MH. |