← Back to team overview

vm team mailing list archive

Re: compilation warnings

 

Tim Cross writes:

> The focus-frame ones were fairly straight-forward. The existing calls were
> doing nothing, but from the code, the objective seemed to be to make the frame
> take focus, so I added the appropriate call to do this. 

Will it work on the supported older versions of emacsen?

> All but one of the default-enable-multibyte-characters were quite
> straight-forward. The one in vm-read-folder was a bit different. In most
> cases, the call was inside a let and used to set the value before creating the
> buffer. In this case, I wrapped the original in a test for boundp and then,
> inside the excursion where the buffer was made current, called
> set-buffer-multibyte. 

But the doc-string for default-enable-multibyte-characters says one
should use enable-multibyte-characters.  Have you tried that?

In any case, the multibyte stuff is delicate and can cause serious
folder corruption unless done correctly.

So, we better leave this to Ulrich to look at.

> In the case of vm-read-folder, I just commented out the offending line as I
> don't think it is necessary. That function is only called by the top level
> 'vm' function and that function does an explicit set-buffer-multibyte anyway. 

I guess this is part of the multibyte stuff?  If so, we leave it to
Ulrich.

But note that this kind of reasoning can be problematic.
vm-read-folder should do whatever it is logically required to do,
without depending on what the callers do.

> Code is compiling without these warnings and I've done a few tests (reading in
> new folders, deleting/expunging from folders etc, and it all appears to work.
> I'm testing with emacs 23.2. 

In these kinds of situations, we also need to make sure that all the
changed code is exercised by the tests.  That can be quite hard.  I
wish we had some tools for checking the coverage of tests.

Cheers,
Uday







Follow ups

References