Mercurial > emacs
comparison lisp/mh-e/mh-alias.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 | 4cb528cc4c04 d6f8fe3307c8 |
comparison
equal
deleted
inserted
replaced
68528:bd5e46db392c | 68529:7daec5f4a289 |
---|---|
123 (if (and comma-separator | 123 (if (and comma-separator |
124 (string-match "^\\([^,]+\\)," res)) | 124 (string-match "^\\([^,]+\\)," res)) |
125 (setq res (match-string 1 res))) | 125 (setq res (match-string 1 res))) |
126 ;; Replace "&" with capitalized username | 126 ;; Replace "&" with capitalized username |
127 (if (string-match "&" res) | 127 (if (string-match "&" res) |
128 (setq res (replace-regexp-in-string "&" (capitalize username) res))) | 128 (setq res (mh-replace-regexp-in-string "&" (capitalize username) res))) |
129 ;; Remove " character | 129 ;; Remove " character |
130 (if (string-match "\"" res) | 130 (if (string-match "\"" res) |
131 (setq res (replace-regexp-in-string "\"" "" res))) | 131 (setq res (mh-replace-regexp-in-string "\"" "" res))) |
132 ;; If empty string, use username instead | 132 ;; If empty string, use username instead |
133 (if (string-equal "" res) | 133 (if (string-equal "" res) |
134 (setq res username)) | 134 (setq res username)) |
135 ;; Surround by quotes if doesn't consist of simple characters | 135 ;; Surround by quotes if doesn't consist of simple characters |
136 (if (not (string-match "^[ a-zA-Z0-9-]+$" res)) | 136 (if (not (string-match "^[ a-zA-Z0-9-]+$" res)) |
256 ((mh-assoc-string alias mh-alias-passwd-alist t) | 256 ((mh-assoc-string alias mh-alias-passwd-alist t) |
257 (cadr (mh-assoc-string alias mh-alias-passwd-alist t))) | 257 (cadr (mh-assoc-string alias mh-alias-passwd-alist t))) |
258 (t | 258 (t |
259 (mh-alias-ali alias)))) | 259 (mh-alias-ali alias)))) |
260 | 260 |
261 (require 'crm nil t) ; completing-read-multiple | 261 (mh-require 'crm nil t) ; completing-read-multiple |
262 (require 'multi-prompt nil t) | 262 (mh-require 'multi-prompt nil t) |
263 | 263 |
264 ;;;###mh-autoload | 264 ;;;###mh-autoload |
265 (defun mh-read-address (prompt) | 265 (defun mh-read-address (prompt) |
266 "Read an address from the minibuffer with PROMPT." | 266 "Read an address from the minibuffer with PROMPT." |
267 (mh-alias-reload-maybe) | 267 (mh-alias-reload-maybe) |
604 (defun mh-goto-address-find-address-at-point () | 604 (defun mh-goto-address-find-address-at-point () |
605 "Find e-mail address around or before point. | 605 "Find e-mail address around or before point. |
606 | 606 |
607 Then search backwards to beginning of line for the start of an | 607 Then search backwards to beginning of line for the start of an |
608 e-mail address. If no e-mail address found, return nil." | 608 e-mail address. If no e-mail address found, return nil." |
609 (re-search-backward "[^-_A-z0-9.@]" (line-beginning-position) 'lim) | 609 (re-search-backward "[^-_A-z0-9.@]" (mh-line-beginning-position) 'lim) |
610 (if (or (looking-at mh-address-mail-regexp) ; already at start | 610 (if (or (looking-at mh-address-mail-regexp) ; already at start |
611 (and (re-search-forward mh-address-mail-regexp | 611 (and (re-search-forward mh-address-mail-regexp |
612 (line-end-position) 'lim) | 612 (mh-line-end-position) 'lim) |
613 (goto-char (match-beginning 0)))) | 613 (goto-char (match-beginning 0)))) |
614 (match-string-no-properties 0))) | 614 (mh-match-string-no-properties 0))) |
615 | 615 |
616 (defun mh-alias-apropos (regexp) | 616 (defun mh-alias-apropos (regexp) |
617 "Show all aliases or addresses that match a regular expression REGEXP." | 617 "Show all aliases or addresses that match a regular expression REGEXP." |
618 (interactive "sAlias regexp: ") | 618 (interactive "sAlias regexp: ") |
619 (if mh-alias-local-users | 619 (if mh-alias-local-users |