[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: enhanced select-safe-coding-system

From: Stefan Monnier
Subject: Re: enhanced select-safe-coding-system
Date: Fri, 03 May 2002 09:27:01 -0400

> Incidentally, I think Emacs should have `remove-if', or whatever
> Common Lisp calls the function for filtering lists according to a
> predicate, as I needed to filter the coding list.  That operation seems
> quite common.

I would agree (I actually use a `partition' function sometimes which
returns two lists: one for elements that matched the predicate and one
for those that didn't, but a CL-style function is just as good).

> If you want to make select-safe-coding-system more helpful, you could
> also use code like this to find at least the first unencodable
> character and display that part of the buffer when
> select-safe-coding-system needs to prompt for a coding system.  Emacs
> 20 used to do something similar, but it was only necessary to check
> charsets then.

I have recently posted a fairly simple patch that does that by slightly
modifying the C code, so it's fast.  The only question is if such
a functionality is good enough to efficiently implement Emacs-20's behavior
(which was to highlight the offending chars, rather than just jump to the
first one)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]