Mercurial > emacs
comparison lisp/mh-e/mh-mime.el @ 68529:7daec5f4a289
* mh-alias.el (mh-alias-gecos-name): Use mh-replace-regexp-in-string
instead of replace-regexp-in-string.
(crm, multi-prompt): Use mh-require instead of require.
(mh-goto-address-find-address-at-point): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position. Use
mh-match-string-no-properties instead of match-string-no-properties.
* mh-comp.el (mh-modify-header-field): Use mh-line-beginning-position
and mh-line-end-position instead of line-beginning-position and
line-end-position.
* mh-compat.el (mailabbrev): Use mh-require instead of require.
(mh-assoc-string, mh-display-completion-list, mh-face-foreground)
(mh-face-background): Make docstring consistent.
(mh-require, mh-cancel-timer, mh-display-color-cells)
(mh-line-beginning-position, mh-line-end-position)
(mh-match-string-no-properties, mh-replace-regexp-in-string)
(mh-view-mode-enter): Move definition here from mh-xemacs.el and add
mh- prefix since compatibility functions should have our package
prefix (mh-) by Emacs convention and to avoid messing up checks for
the same functions in other packages.
* mh-e.el (mh-compiling-flag): Move mh-xemacs-compiling-flag here from
mh-xemacs.el and rename.
(mh-xargs): Use mh-line-beginning-position and mh-line-end-position
instead of line-beginning-position and line-end-position.
(mh-defface-compat): Use mh-display-color-cells instead of
display-color-cells.
* mh-folder.el (which-func): Use mh-require instead of require.
* mh-funcs.el (mh-list-folders): Use mh-view-mode-enter instead of
view-mode-enter.
* mh-gnus.el (gnus-util, mm-bodies, mm-decode, mm-view, mml): Use
mh-require instead of require.
* mh-letter.el (mh-letter-header-end, mh-letter-mode)
(mh-letter-next-header-field): Use mh-line-beginning-position and
mh-line-end-position instead of line-beginning-position and
line-end-position.
* mh-limit.el (mh-subject-to-sequence-unthreaded): Use
mh-match-string-no-properties instead of match-string-no-properties.
(mh-narrow-to-header-field): Use mh-line-beginning-position and
mh-line-end-position instead of line-beginning-position and
line-end-position.
* mh-mime.el (mh-mime-inline-part, mh-mm-display-part)
(mh-mh-quote-unescaped-sharp, mh-mh-directive-present-p): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-search.el (which-func): Use mh-require instead of require.
(mh-make-pick-template, mh-index-visit-folder)
(mh-pick-parse-search-buffer, mh-swish-next-result)
(mh-mairix-next-result, mh-namazu-next-result)
(mh-pick-next-result, mh-grep-next-result)
(mh-index-create-imenu-index, mh-index-match-checksum)
(mh-md5sum-parser, mh-openssl-parser, mh-index-update-maps): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-seq.el (mh-list-sequences): Use mh-view-mode-enter instead of
view-mode-enter.
(mh-folder-size-flist, mh-parse-flist-output-line)
(mh-add-sequence-notation): Use mh-line-beginning-position and
mh-line-end-position instead of line-beginning-position and
line-end-position.
* mh-show.el (mh-show-addr): Use mh-require instead of require.
* mh-speed.el (mh-folder-speedbar-menu-items, mh-speed-toggle)
(mh-speed-view, mh-folder-speedbar-buttons)
(mh-speed-highlight, mh-speed-goto-folder)
(mh-speed-add-buttons, mh-speed-parse-flists-output)
(mh-speed-invalidate-map, mh-speedbar-change-expand-button-char)
(mh-speed-add-folder): Use mh-line-beginning-position and
mh-line-end-position instead of line-beginning-position and
line-end-position.
(mh-speed-flists): Use mh-cancel-timer instead of cancel-timer.
* mh-thread.el (mh-thread-find-children)
(mh-thread-parse-scan-line, mh-thread-generate): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-utils.el (mh-colors-available-p): Use mh-display-color-cells
instead of display-color-cells.
(mh-folder-list): Use mh-replace-regexp-in-string instead of
replace-regexp-in-string.
(mh-sub-folders-actual, mh-letter-toggle-header-field-display): Use
mh-line-beginning-position and mh-line-end-position instead of
line-beginning-position and line-end-position.
* mh-comp.el (mh-send-sub): Don't find components file in current
directory--this seems to have been a side-effect of commenting out the
use of an old mh-etc variable. Improve error message.
author | Bill Wohler <wohler@newt.com> |
---|---|
date | Wed, 01 Feb 2006 23:24:34 +0000 |
parents | 6a7173abcf59 |
children | f58b821a2f40 d6f8fe3307c8 |
comparison
equal
deleted
inserted
replaced
68528:bd5e46db392c | 68529:7daec5f4a289 |
---|---|
300 (displayed-flag (mm-handle-displayed-p data)) | 300 (displayed-flag (mm-handle-displayed-p data)) |
301 (point (point)) | 301 (point (point)) |
302 start end) | 302 start end) |
303 (cond ((and data (not inserted-flag) (not displayed-flag)) | 303 (cond ((and data (not inserted-flag) (not displayed-flag)) |
304 (let ((contents (mm-get-part data))) | 304 (let ((contents (mm-get-part data))) |
305 (add-text-properties (line-beginning-position) (line-end-position) | 305 (add-text-properties (mh-line-beginning-position) |
306 '(mh-mime-inserted t)) | 306 (mh-line-end-position) '(mh-mime-inserted t)) |
307 (setq start (point-marker)) | 307 (setq start (point-marker)) |
308 (forward-line 1) | 308 (forward-line 1) |
309 (mm-insert-inline data contents) | 309 (mm-insert-inline data contents) |
310 (setq end (point-marker)) | 310 (setq end (point-marker)) |
311 (add-text-properties | 311 (add-text-properties |
312 start (progn (goto-char start) (line-end-position)) | 312 start (progn (goto-char start) (mh-line-end-position)) |
313 `(mh-region (,start . ,end))))) | 313 `(mh-region (,start . ,end))))) |
314 ((and data (or inserted-flag displayed-flag)) | 314 ((and data (or inserted-flag displayed-flag)) |
315 (mh-press-button) | 315 (mh-press-button) |
316 (message "MIME part already inserted"))) | 316 (message "MIME part already inserted"))) |
317 (goto-char point) | 317 (goto-char point) |
744 (goto-char point) | 744 (goto-char point) |
745 (beginning-of-line) | 745 (beginning-of-line) |
746 (mh-insert-mime-button handle id (mm-handle-displayed-p handle)) | 746 (mh-insert-mime-button handle id (mm-handle-displayed-p handle)) |
747 (goto-char point) | 747 (goto-char point) |
748 (when region | 748 (when region |
749 (add-text-properties (line-beginning-position) (line-end-position) | 749 (add-text-properties (mh-line-beginning-position) |
750 (mh-line-end-position) | |
750 `(mh-region ,region))))))) | 751 `(mh-region ,region))))))) |
751 | 752 |
752 (defun mh-mime-part-index (handle) | 753 (defun mh-mime-part-index (handle) |
753 "Generate the button number for MIME part, HANDLE. | 754 "Generate the button number for MIME part, HANDLE. |
754 Notice that a hash table is used to display the same number when | 755 Notice that a hash table is used to display the same number when |
1498 This function will quote all such characters." | 1499 This function will quote all such characters." |
1499 (save-excursion | 1500 (save-excursion |
1500 (goto-char (point-min)) | 1501 (goto-char (point-min)) |
1501 (while (re-search-forward "^#" nil t) | 1502 (while (re-search-forward "^#" nil t) |
1502 (beginning-of-line) | 1503 (beginning-of-line) |
1503 (unless (mh-mh-directive-present-p (point) (line-end-position)) | 1504 (unless (mh-mh-directive-present-p (point) (mh-line-end-position)) |
1504 (insert "#")) | 1505 (insert "#")) |
1505 (goto-char (line-end-position))))) | 1506 (goto-char (mh-line-end-position))))) |
1506 | 1507 |
1507 ;;;###mh-autoload | 1508 ;;;###mh-autoload |
1508 (defun mh-mh-to-mime-undo (noconfirm) | 1509 (defun mh-mh-to-mime-undo (noconfirm) |
1509 "Undo effects of \\[mh-mh-to-mime]. | 1510 "Undo effects of \\[mh-mh-to-mime]. |
1510 | 1511 |
1670 (unless end (setq end (point-max))) | 1671 (unless end (setq end (point-max))) |
1671 (save-excursion | 1672 (save-excursion |
1672 (block 'search-for-mh-directive | 1673 (block 'search-for-mh-directive |
1673 (goto-char begin) | 1674 (goto-char begin) |
1674 (while (re-search-forward "^#" end t) | 1675 (while (re-search-forward "^#" end t) |
1675 (let ((s (buffer-substring-no-properties (point) (line-end-position)))) | 1676 (let ((s (buffer-substring-no-properties |
1677 (point) (mh-line-end-position)))) | |
1676 (cond ((equal s "")) | 1678 (cond ((equal s "")) |
1677 ((string-match "^forw[ \t\n]+" s) | 1679 ((string-match "^forw[ \t\n]+" s) |
1678 (return-from 'search-for-mh-directive t)) | 1680 (return-from 'search-for-mh-directive t)) |
1679 (t (let ((first-token (car (split-string s "[ \t;@]")))) | 1681 (t (let ((first-token (car (split-string s "[ \t;@]")))) |
1680 (when (and first-token | 1682 (when (and first-token |