summaryrefslogtreecommitdiff
path: root/lisp/hexl.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-02-07 05:42:40 +0000
committerRichard M. Stallman <rms@gnu.org>1994-02-07 05:42:40 +0000
commit7b5facfa5ea18e3e9418fd824d118d70e359076b (patch)
tree4669cba7f9ce173670d2521fd5e6397c10b6bfa0 /lisp/hexl.el
parentb5743ab748e78b16a585c86306b64136cc08baf6 (diff)
downloademacs-7b5facfa5ea18e3e9418fd824d118d70e359076b.tar.gz
(hexl-mode): Bind inhibit-read-only; don't alter buffer-read-only.
Diffstat (limited to 'lisp/hexl.el')
-rw-r--r--lisp/hexl.el6
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)