diff options
author | Richard M. Stallman <rms@gnu.org> | 1994-02-07 05:42:40 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1994-02-07 05:42:40 +0000 |
commit | bb752f07fb8d8c504b6a81358c68fbfada3955da (patch) | |
tree | 1575cbe1d7c274632f6bcf0f8b0c458b4f9b6e09 /lisp/hexl.el | |
parent | 6c61e6a9bc72600942f745c8d9489e1972da5f63 (diff) | |
download | emacs-bb752f07fb8d8c504b6a81358c68fbfada3955da.tar.gz emacs-bb752f07fb8d8c504b6a81358c68fbfada3955da.tar.bz2 emacs-bb752f07fb8d8c504b6a81358c68fbfada3955da.zip |
(hexl-mode): Bind inhibit-read-only; don't alter buffer-read-only.
Diffstat (limited to 'lisp/hexl.el')
-rw-r--r-- | lisp/hexl.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el index 37b17cb7658..c75d5dfcca2 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el @@ -171,16 +171,14 @@ You can use \\[hexl-find-file] to visit a file in hexl-mode. (add-hook 'write-contents-hooks 'hexl-save-buffer) (let ((modified (buffer-modified-p)) - (read-only buffer-read-only) + (inhibit-read-only t) (original-point (1- (point)))) (if (not (or (eq arg 1) (not arg))) -;; if no argument then we guess at hexl-max-address + ;; if no argument then we guess at hexl-max-address (setq hexl-max-address (+ (* (/ (1- (buffer-size)) 68) 16) 15)) - (setq buffer-read-only nil) (setq hexl-max-address (1- (buffer-size))) (hexlify-buffer) (set-buffer-modified-p modified) - (setq buffer-read-only read-only) (hexl-goto-address original-point))))) (defvar hexl-in-save-buffer nil) |