From caf3c78f59f3bfee940b699cd3d5d33b35427a10 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 28 Mar 2005 20:03:18 +0000 Subject: [PATCH] (sc-mail-field): Use assoc-string. (sc-get-address): Simplify regexps. --- lisp/ChangeLog | 12 ++++++++++++ lisp/mail/supercite.el | 8 ++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f2dac559136..95ab41b8a86 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,15 @@ +2005-03-28 Stefan Monnier + + * mail/supercite.el (sc-mail-field): Use assoc-string. + (sc-get-address): Simplify regexps. + + * files.el (minibuffer-with-setup-hook): New macro. + (find-file-read-args): Use it to avoid let-binding + minibuffer-with-setup-hook (which breaks turning on/off + file-name-shadow-mode while in the prompt). + + * complete.el (PC-read-include-file-name-internal): Use test-completion. + 2005-03-28 Luc Teirlinck * font-lock.el: Bind `font-lock-fontify-block' to M-o M-o. diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index 3f24c952d89..371bb90b9cf 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el @@ -838,7 +838,7 @@ error occurs." "Return the mail header field value associated with FIELD. If there was no mail header with FIELD as its key, return the value of `sc-mumble'. FIELD is case insensitive." - (or (cdr (assoc (downcase field) sc-mail-info)) sc-mumble)) + (or (cdr (assoc-string field sc-mail-info 'case-fold)) sc-mumble)) (defun sc-mail-field-query (arg) "View the value of a mail field. @@ -916,8 +916,8 @@ Match addresses of the style ``.''" "Get the full email address path from FROM. AUTHOR is the author's name (which is removed from the address)." (let ((eos (length from))) - (if (string-match (concat "\\(^\\|^\"\\)" author - "\\(\\s +\\|\"\\s +\\)") from 0) + (if (string-match (concat "\\`\"?" (regexp-quote author) + "\"?\\s +") from 0) (let ((address (substring from (match-end 0) eos))) (if (and (= (aref address 0) ?<) (= (aref address (1- (length address))) ?>)) @@ -2054,5 +2054,5 @@ more information. Info node `(SC)Top'." (provide 'supercite) (run-hooks 'sc-load-hook) -;;; arch-tag: a5d5bfa6-3bd5-4414-8c65-0afc83e45cd3 +;; arch-tag: a5d5bfa6-3bd5-4414-8c65-0afc83e45cd3 ;;; supercite.el ends here -- 2.39.2