On Tue, Apr 03 2007, Chong Yidong wrote: > How about the following approach? At the beginning of characters.el, > save the standard case table (which AFAICT hasn't been modified at > that point), as a variable ascii-case-table. Then downcase-ascii can > use it. [...] > + (defun downcase-ascii (string) > + "Convert ASCII argument to lower case and return that. > + The argument may be a character or string. The result has the same type. > + The argument object is not altered--the value is a copy." > + (let ((old-case-table (current-case-table))) > + (unwind-protect > + (progn (set-case-table ascii-case-table) > + (downcase string)) > + (set-case-table old-case-table)))) Note that the problem is not only the `downcase' function. So maybe adding `with-case-table' would be a good idea. Turkish Gnus user's might still suffer from the "slow search operations problem" [1] in `gnus/nnfolder.el'. Based on your previous patch, I've made a preliminary patch for `nnfolder.el' [2]. I didn't test it yet (I don't use the nnfolder back end). It has to be adjusted to use `ascii-case-table' and some compatibility code for Emacs 21 (where the downcase problem is not present). Bye, Reiner. [1] ,----[ http://thread.gmane.org/gmane.emacs.gnus.general/63925/focus=63979 ] | From: Reiner Steib | Subject: Re: Slow operations on buffers of tens of megabytes | Newsgroups: gmane.emacs.pretest.bugs, gmane.emacs.gnus.general | Date: 2006-11-13 17:28:58 GMT (19 weeks, 5 days, 3 hours and 34 minutes ago) | | On Thu, Nov 09 2006, Alexandre Oliva wrote: | | > Ultimately, I'm a bit concerned about messing with the case table of | > an nnfolder buffer for the entire duration of the buffer. It's hard | > to tell whether there'd be any less visible fallouts. | | Richard has eliminated the peculiar upcasing dotless-i to I in CVS. | Does it fix your problem? | | (IIUC, it should fix it _unless_ the user has a Turkish language | environment. I.e. Turkish Gnus user's might still suffer from this | problem.) | | ,---- | | 2006-11-12 Richard Stallman gnu.org> | | | | * language/european.el (turkish-case-conversion-enable) | | (turkish-case-conversion-disable): New functions. | | ("Turkish" lang env): Use them. | | | | * international/characters.el (case table): | | Do nothing special for i and I. | `---- `---- [2]