Charles G Waldman <cgw(a)alum.mit.edu> writes:
Edwin Steiner writes:
> Hello!
>
> I've implemented some things mentioned in the thread
> "Changes to avoid (inappropriate) font-locking during hexl-find-file".
>
[snip]
I think these are both good changes. I'm not sure that they
really
need to be customizable though. In my opinion the "new" behaviors are
the correct ones and there's not much reason to allow the user to
revert to the old behavior (which was basically just buggy).
My reasons for making it customizable were:
hexl-find-file-raw:
It's all about "What do you expect after opening a file by
hexl-find-file and then leaving hexl-mode by hexl-mode-exit?"
Do you expect
1) a buffer in fundamental-mode containing the literal binary
file, or
2) the buffer properly set up with major mode and an
appropriate coding-system for the file?
IMO there are arguments for both behaviours.
hexl-switch-font-lock:
I don't know if there is a stable way to restore font-lock
settings. My code should work for all major modes which setup
font-locking by setting
* font-lock-defaults or
* font-lock-defaults property on the major mode symbol or
* foo-mode-font-lock-keywords.
If there is a mode which tries to be cleverer about
font-locking, it is likely that restoring the settings will
not work.
I made it customizable, so it can be turned off, if it causes
problems.
Maybe a non-nil default for hexl-switch-font-lock would be
more sensible?
I will test your modifications and get back to you with further
feedback.
Thanks :-), good luck!
-Edwin