X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/7be1c708c5abc7dea388d45454bd19bff07b7943..05d76dba6604f78e4b2b7b9f8b30c916cad7d32a:/lisp/mail/mailheader.el diff --git a/lisp/mail/mailheader.el b/lisp/mail/mailheader.el index 1277d1d410..cf410b5c18 100644 --- a/lisp/mail/mailheader.el +++ b/lisp/mail/mailheader.el @@ -1,6 +1,6 @@ ;;; mailheader.el --- mail header parsing, merging, formatting -;; Copyright (C) 1996, 2001-2011 Free Software Foundation, Inc. +;; Copyright (C) 1996, 2001-2016 Free Software Foundation, Inc. ;; Author: Erik Naggum ;; Keywords: tools, mail, news @@ -45,9 +45,6 @@ ;;; Code: -(eval-when-compile - (require 'cl)) - (defun mail-header-extract () "Extract headers from current buffer after point. Returns a header alist, where each element is a cons cell (name . value), @@ -110,6 +107,8 @@ If the value is a string, it is the original value of the header. If the value is a list, its first element is the original value of the header, with any subsequent elements being the result of parsing the value. If HEADER-ALIST is nil, the dynamically bound variable `headers' is used." + (declare (gv-setter (lambda (value) + `(mail-header-set ,header ,value ,header-alist)))) (cdr (assq header (or header-alist headers)))) (defun mail-header-set (header value &optional header-alist) @@ -123,9 +122,6 @@ See `mail-header' for the semantics of VALUE." (nconc alist (list (cons header value))))) value) -(defsetf mail-header (header &optional header-alist) (value) - `(mail-header-set ,header ,value ,header-alist)) - (defun mail-header-merge (merge-rules headers) "Return a new header alist with MERGE-RULES applied to HEADERS. MERGE-RULES is an alist whose keys are header names (symbols) and whose