# HG changeset patch # User Chong Yidong # Date 1173106505 0 # Node ID d24bffa1374c866ac63ee0d6ce48d3ceb0c0d382 # Parent dfdf18916e2d785ad507a46572a27401b00bfda9 (PC-do-completion): If completion-ignore-case is non-nil, replace field with completion string before exiting. diff -r dfdf18916e2d -r d24bffa1374c lisp/complete.el --- a/lisp/complete.el Mon Mar 05 14:54:56 2007 +0000 +++ b/lisp/complete.el Mon Mar 05 14:55:05 2007 +0000 @@ -404,8 +404,15 @@ ;; Check if buffer contents can already be considered complete (if (and (eq mode 'exit) - (test-completion-ignore-case str table pred)) - 'complete + (test-completion str table pred)) + (progn + ;; If completion-ignore-case is non-nil, insert the + ;; completion string since that may have a different case. + (when completion-ignore-case + (setq str (try-completion str table pred)) + (delete-region beg end) + (insert str)) + 'complete) ;; Do substitutions in directory names (and filename