GNU bug report logs - #7252
hexl-revert-buffer

Previous Next

Package: emacs;

Reported by: Daiki Ueno <ueno <at> unixuser.org>

Date: Wed, 20 Oct 2010 06:01:02 UTC

Severity: normal

Done: Daiki Ueno <ueno <at> unixuser.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Daiki Ueno <ueno <at> unixuser.org>
Cc: 7252 <at> debbugs.gnu.org
Subject: bug#7252: hexl-revert-buffer
Date: Wed, 20 Oct 2010 12:18:53 -0400
> If I open a ZIP file with M-x hexl-find-file and then M-x revert-buffer,
> I see hexified file list generated by arc-mode, instead of raw ZIP data.

> This behavior is surprising for me and it is cumbersome to do M-x
> kill-buffer and M-x hexl-find-file each time.

> How about adding M-x hexl-revert-buffer?

No, we should tweak revert-buffer-function instead.

> +  (if (eq major-mode 'hexl-mode)

Use derived-mode-p rather than looking at major-mode.

> +      (let ((coding-system-for-read 'no-conversion))
> +	(revert-buffer nil nil t)
> +	(setq major-mode 'fundamental-mode)

Why is this setq needed (IOW please add a comment explaining why it's
needed).


        Stefan




This bug report was last modified 14 years and 275 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.