diff options
| author | Richard M. Stallman | 1994-07-18 17:49:23 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-07-18 17:49:23 +0000 |
| commit | 9081378e9f791bed3f4f498e26b28b3e5839c4bb (patch) | |
| tree | 8854aaff7426d56ddf9df51c481f2fe91567af92 | |
| parent | be8d412c3fafc89c961972e956fb12dda188a642 (diff) | |
| download | emacs-9081378e9f791bed3f4f498e26b28b3e5839c4bb.tar.gz emacs-9081378e9f791bed3f4f498e26b28b3e5839c4bb.zip | |
Make sure that headers are case-insensitive.
Upped version to 1.3.
| -rw-r--r-- | lisp/mail/mail-hist.el | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/lisp/mail/mail-hist.el b/lisp/mail/mail-hist.el index 7cef0dbfac7..0c5c9ac57c2 100644 --- a/lisp/mail/mail-hist.el +++ b/lisp/mail/mail-hist.el | |||
| @@ -3,8 +3,8 @@ | |||
| 3 | 3 | ||
| 4 | ;; Author: Karl Fogel <kfogel@cs.oberlin.edu> | 4 | ;; Author: Karl Fogel <kfogel@cs.oberlin.edu> |
| 5 | ;; Created: March, 1994 | 5 | ;; Created: March, 1994 |
| 6 | ;; Version: 1.2.2 | 6 | ;; Version: 1.3 |
| 7 | ;; Keywords: mail | 7 | ;; Keywords: mail, history |
| 8 | 8 | ||
| 9 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 10 | 10 | ||
| @@ -112,7 +112,7 @@ the message." | |||
| 112 | (and | 112 | (and |
| 113 | name-start | 113 | name-start |
| 114 | name-end | 114 | name-end |
| 115 | (buffer-substring name-start name-end)))))) | 115 | (downcase (buffer-substring name-start name-end))))))) |
| 116 | 116 | ||
| 117 | (defsubst mail-hist-forward-header (count) | 117 | (defsubst mail-hist-forward-header (count) |
| 118 | "Move forward COUNT headers (backward if COUNT is negative). | 118 | "Move forward COUNT headers (backward if COUNT is negative). |
| @@ -175,12 +175,14 @@ colon, or just after the colon if it is not followed by whitespace." | |||
| 175 | (defsubst mail-hist-get-header-ring (header) | 175 | (defsubst mail-hist-get-header-ring (header) |
| 176 | "Get HEADER's history ring, or nil if none. | 176 | "Get HEADER's history ring, or nil if none. |
| 177 | HEADER is a string without the colon." | 177 | HEADER is a string without the colon." |
| 178 | (setq header (downcase header)) | ||
| 178 | (cdr (assoc header mail-hist-header-ring-alist))) | 179 | (cdr (assoc header mail-hist-header-ring-alist))) |
| 179 | 180 | ||
| 180 | (defsubst mail-hist-add-header-contents-to-ring (header &optional contents) | 181 | (defsubst mail-hist-add-header-contents-to-ring (header &optional contents) |
| 181 | "Add the contents of HEADER to the header history ring. | 182 | "Add the contents of HEADER to the header history ring. |
| 182 | Optional argument CONTENTS is a string which will be the contents | 183 | Optional argument CONTENTS is a string which will be the contents |
| 183 | \(instead of whatever's found in the header)." | 184 | (instead of whatever's found in the header)." |
| 185 | (setq header (downcase header)) | ||
| 184 | (let ((ring (cdr (assoc header mail-hist-header-ring-alist)))) | 186 | (let ((ring (cdr (assoc header mail-hist-header-ring-alist)))) |
| 185 | (or ring | 187 | (or ring |
| 186 | ;; If the ring doesn't exist, we'll have to make it and add it | 188 | ;; If the ring doesn't exist, we'll have to make it and add it |
| @@ -223,6 +225,7 @@ its own independent history, as does the body of the message. | |||
| 223 | The history only contains the contents of outgoing messages, not | 225 | The history only contains the contents of outgoing messages, not |
| 224 | received mail." | 226 | received mail." |
| 225 | (interactive (list (or (mail-hist-current-header-name) "body"))) | 227 | (interactive (list (or (mail-hist-current-header-name) "body"))) |
| 228 | (setq header (downcase header)) | ||
| 226 | (let* ((ring (cdr (assoc header mail-hist-header-ring-alist))) | 229 | (let* ((ring (cdr (assoc header mail-hist-header-ring-alist))) |
| 227 | (len (ring-length ring)) | 230 | (len (ring-length ring)) |
| 228 | (repeat (eq last-command 'mail-hist-input-access))) | 231 | (repeat (eq last-command 'mail-hist-input-access))) |
| @@ -251,11 +254,12 @@ its own independent history, as does the body of the message. | |||
| 251 | 254 | ||
| 252 | Although you can do so, it does not make much sense to call this | 255 | Although you can do so, it does not make much sense to call this |
| 253 | without having called `mail-hist-previous-header' first | 256 | without having called `mail-hist-previous-header' first |
| 254 | \(\\[mail-hist-previous-header]). | 257 | (\\[mail-hist-previous-header]). |
| 255 | 258 | ||
| 256 | The history only contains the contents of outgoing messages, not | 259 | The history only contains the contents of outgoing messages, not |
| 257 | received mail." | 260 | received mail." |
| 258 | (interactive (list (or (mail-hist-current-header-name) "body"))) | 261 | (interactive (list (or (mail-hist-current-header-name) "body"))) |
| 262 | (setq header (downcase header)) | ||
| 259 | (let* ((ring (cdr (assoc header mail-hist-header-ring-alist))) | 263 | (let* ((ring (cdr (assoc header mail-hist-header-ring-alist))) |
| 260 | (len (ring-length ring)) | 264 | (len (ring-length ring)) |
| 261 | (repeat (eq last-command 'mail-hist-input-access))) | 265 | (repeat (eq last-command 'mail-hist-input-access))) |