comparison lisp/gnus/message.el @ 122:d2f30a177268 r20-1b14

Import from CVS: tag r20-1b14
author cvs
date Mon, 13 Aug 2007 09:26:03 +0200
parents cca96a509cfe
children 9b50b4588a93
comparison
equal deleted inserted replaced
121:419db647c998 122:d2f30a177268
1328 1328
1329 1329
1330 (defun message-insert-to () 1330 (defun message-insert-to ()
1331 "Insert a To header that points to the author of the article being replied to." 1331 "Insert a To header that points to the author of the article being replied to."
1332 (interactive) 1332 (interactive)
1333 (let ((co (message-fetch-field "mail-copies-to"))) 1333 (let ((co (message-fetch-reply-field "mail-copies-to")))
1334 (when (and co 1334 (when (and co
1335 (equal (downcase co) "never")) 1335 (equal (downcase co) "never"))
1336 (error "The user has requested not to have copies sent via mail"))) 1336 (error "The user has requested not to have copies sent via mail")))
1337 (when (and (message-position-on-field "To") 1337 (when (and (message-position-on-field "To")
1338 (mail-fetch-field "to") 1338 (mail-fetch-field "to")
1513 Normally, indent each nonblank line `message-indentation-spaces' spaces. 1513 Normally, indent each nonblank line `message-indentation-spaces' spaces.
1514 However, if `message-yank-prefix' is non-nil, insert that prefix on each line." 1514 However, if `message-yank-prefix' is non-nil, insert that prefix on each line."
1515 (let ((start (point))) 1515 (let ((start (point)))
1516 ;; Remove unwanted headers. 1516 ;; Remove unwanted headers.
1517 (when message-ignored-cited-headers 1517 (when message-ignored-cited-headers
1518 (save-restriction 1518 (let (all-removed)
1519 (narrow-to-region 1519 (save-restriction
1520 (goto-char start) 1520 (narrow-to-region
1521 (if (search-forward "\n\n" nil t) 1521 (goto-char start)
1522 (1- (point)) 1522 (if (search-forward "\n\n" nil t)
1523 (point))) 1523 (1- (point))
1524 (message-remove-header message-ignored-cited-headers t) 1524 (point)))
1525 (goto-char (point-max)))) 1525 (message-remove-header message-ignored-cited-headers t)
1526 (when (= (point-min) (point-max))
1527 (setq all-removed t))
1528 (goto-char (point-max)))
1529 (if all-removed
1530 (goto-char start)
1531 (forward-line 1))))
1526 ;; Delete blank lines at the start of the buffer. 1532 ;; Delete blank lines at the start of the buffer.
1527 (while (and (point-min) 1533 (while (and (point-min)
1528 (eolp) 1534 (eolp)
1529 (not (eobp))) 1535 (not (eobp)))
1530 (message-delete-line)) 1536 (message-delete-line))