changeset 8277:824fb42f33ab

Make sure that headers are case-insensitive. Upped version to 1.3.
author Richard M. Stallman <rms@gnu.org>
date Mon, 18 Jul 1994 17:49:23 +0000
parents 73b85998c868
children f856f00b1e32
files lisp/mail/mail-hist.el
diffstat 1 files changed, 9 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/mail-hist.el	Mon Jul 18 15:21:50 1994 +0000
+++ b/lisp/mail/mail-hist.el	Mon Jul 18 17:49:23 1994 +0000
@@ -3,8 +3,8 @@
 
 ;; Author: Karl Fogel <kfogel@cs.oberlin.edu>
 ;; Created: March, 1994
-;; Version: 1.2.2
-;; Keywords: mail
+;; Version: 1.3
+;; Keywords: mail, history
 
 ;; This file is part of GNU Emacs.
 
@@ -112,7 +112,7 @@
         (and
          name-start
          name-end
-         (buffer-substring name-start name-end))))))
+         (downcase (buffer-substring name-start name-end)))))))
 
 (defsubst mail-hist-forward-header (count)
   "Move forward COUNT headers (backward if COUNT is negative).
@@ -175,12 +175,14 @@
 (defsubst mail-hist-get-header-ring (header)
   "Get HEADER's history ring, or nil if none.
 HEADER is a string without the colon."
+  (setq header (downcase header))
   (cdr (assoc header mail-hist-header-ring-alist)))
 
 (defsubst mail-hist-add-header-contents-to-ring (header &optional contents)
   "Add the contents of HEADER to the header history ring.
 Optional argument CONTENTS is a string which will be the contents
-\(instead of whatever's found in the header)."
+(instead of whatever's found in the header)."
+  (setq header (downcase header))
   (let ((ring (cdr (assoc header mail-hist-header-ring-alist))))
     (or ring
         ;; If the ring doesn't exist, we'll have to make it and add it
@@ -223,6 +225,7 @@
 The history only contains the contents of outgoing messages, not
 received mail."
   (interactive (list (or (mail-hist-current-header-name) "body")))
+  (setq header (downcase header))
   (let* ((ring (cdr (assoc header mail-hist-header-ring-alist)))
          (len (ring-length ring))
          (repeat (eq last-command 'mail-hist-input-access)))
@@ -251,11 +254,12 @@
 
 Although you can do so, it does not make much sense to call this
 without having called `mail-hist-previous-header' first
-\(\\[mail-hist-previous-header]).
+(\\[mail-hist-previous-header]).
 
 The history only contains the contents of outgoing messages, not
 received mail."
   (interactive (list (or (mail-hist-current-header-name) "body")))
+  (setq header (downcase header))
   (let* ((ring (cdr (assoc header mail-hist-header-ring-alist)))
          (len (ring-length ring))
          (repeat (eq last-command 'mail-hist-input-access)))