emacs-devel
[Top][All Lists]
Advanced

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

Re: vc making coding system nil, latexenc not protecting


From: Eli Zaretskii
Subject: Re: vc making coding system nil, latexenc not protecting
Date: Mon, 24 Sep 2007 23:32:18 +0200

> Date: Mon, 24 Sep 2007 08:37:04 -0500
> From: address@hidden (Karl Berry)
> Cc: address@hidden
> 
> lisp/international/latexenc.el:
>                   (coding-system-base   ;Disregard the EOL part of the CS.
>                    (with-current-buffer latexenc-main-buffer
>                      (or coding-system-for-write buffer-file-coding-system))))
> 
> Both coding-system-for-write and buffer-file-coding-system are nil, and
> thus coding-system-base throws the error.  It seems it would be
> desirable to avoid the call and hence the error in this case -- if I
> take out the call, for testing, everything goes through fine.  Or else
> to change coding-system-base to be a no-op if its arg is nil.

Why no-op? nil means undecided, AFAIK, so that's what the code should
do.  (Actually, perhaps it's better to change coding-system-base to do
that automagically, but I cannot say if this is safe without grepping
the sources for uses of coding-system-base.)

> The second question is why both those variables are nil in the first
> place.  After visiting the file, but before running CTRL-x v v,
> buffer-file-coding-system is undecided-unix.  So somewhere within
> vc-next-action it got set to nil.

That may be, but please note that there's nothing wrong with the value
of nil.

> I could not find where.  (Aside: too bad edebug doesn't have
> watchpoints.)

If you mean you want to watch buffer-file-coding-system, then it's a
buffer-specific variable, so it's stored somewhere in the buffer
structure; you could set a watchpoint on the C level.




reply via email to

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