/[emacs]/emacs/lisp/mail/mailabbrev.el
ViewVC logotype

Diff of /emacs/lisp/mail/mailabbrev.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.74 by rms, Tue Sep 30 12:44:53 2003 UTC revision 1.75 by rms, Tue Jan 4 14:59:27 2005 UTC
# Line 305  If DEFINITION contains multiple addresse Line 305  If DEFINITION contains multiple addresse
305                      end (string-match "\"[ \t,]*" definition start))                      end (string-match "\"[ \t,]*" definition start))
306              (setq end (string-match "[ \t,]+" definition start)))              (setq end (string-match "[ \t,]+" definition start)))
307          (setq end (string-match "[ \t\n,]*,[ \t\n,]*" definition start)))          (setq end (string-match "[ \t\n,]*,[ \t\n,]*" definition start)))
308        (setq result (cons (substring definition start end) result))        (let ((tem (substring definition start end)))
309        (setq start (and end          ;; Advance the loop past this address.
310                         (/= (match-end 0) L)          (setq start (and end
311                         (match-end 0))))                           (/= (match-end 0) L)
312                             (match-end 0)))
313            ;; If the full name contains a problem character, quote it.
314            (when (string-match "\\(.+?\\)[ \t]*\\(<.*>\\)" tem)
315              (if (string-match "[^- !#$%&'*+/0-9=?A-Za-z^_`{|}~]"
316                                (match-string 1 tem))
317                  (setq tem (replace-regexp-in-string
318                             "\\(.+?\\)[ \t]*\\(<.*>\\)" "\"\\1\" \\2"
319                             tem))))
320            (push tem result)))
321      (setq definition (mapconcat (function identity)      (setq definition (mapconcat (function identity)
322                                  (nreverse result)                                  (nreverse result)
323                                  mail-alias-separator-string)))                                  mail-alias-separator-string)))
# Line 485  of a mail alias.  The value is set up, b Line 494  of a mail alias.  The value is set up, b
494               ;; the usual syntax table.               ;; the usual syntax table.
495    
496               (or (and (integerp last-command-char)               (or (and (integerp last-command-char)
497                        (eq (char-syntax last-command-char) ?_))                        (or (eq (char-syntax last-command-char) ?_)
498                              ;; Don't expand on @.
499                              (memq last-command-char '(?@ ?. ?% ?! ?_ ?-))))
500                   (let ((pre-abbrev-expand-hook nil)) ; That's us; don't loop.                   (let ((pre-abbrev-expand-hook nil)) ; That's us; don't loop.
501                     ;; Use this table so that abbrevs can have hyphens in them.                     ;; Use this table so that abbrevs can have hyphens in them.
502                     (set-syntax-table mail-abbrev-syntax-table)                     (set-syntax-table mail-abbrev-syntax-table)
# Line 610  Don't use this command in Lisp programs! Line 621  Don't use this command in Lisp programs!
621    (interactive "P")    (interactive "P")
622    (if (looking-at "[ \t]*\n") (expand-abbrev))    (if (looking-at "[ \t]*\n") (expand-abbrev))
623    (setq this-command 'end-of-buffer)    (setq this-command 'end-of-buffer)
624    (end-of-buffer arg))    (with-no-warnings
625       (end-of-buffer arg)))
626    
627  (eval-after-load "sendmail"  (eval-after-load "sendmail"
628    '(progn    '(progn

Legend:
Removed from v.1.74  
changed lines
  Added in v.1.75

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26