Edwin Steiner wrote:
I fixed the following problem:
When hexl-find-file opens a file for which
font-locking is enabled (eg. a source code
file), the buffer is font-locked before
hexlify-buffer is called. This wastes time and
can lead to inappropriate font-locking in the
(then hexlified) buffer.
My solution is:
* in lisp/files.el:
- add a variable 'after-find-file-nomodes'
- modify 'after-find-file' so it doesn't
alter the file's mode if the variable
'after-find-file-nomodes' is non-nil.
* in xemacs-packages/lisp/text-modes/hexl.el:
- bind 'after-find-file-nomodes' to 't'
when calling 'find-file'.
If this solution is acceptable, I will
create a patch.
Sounds unnecessarily complex. I would have thought that it would be
better to have hexl-find-file either:
a) bind font-lock-auto-fontify and font-lock-mode-enable-list to nil,
b) bind find-file-hooks to nil, or
c) bypass find-file altogether, in favour of e.g. insert-file-contents
or even insert-file-contents literally.
To me, find-file seems too high level for something like hexl.
--
Glynn Clements <glynn.clements(a)virgin.net>