changeset 5818:bdda7582b8cd

(hexl-mode): Bind inhibit-read-only; don't alter buffer-read-only.
author Richard M. Stallman <rms@gnu.org>
date Mon, 07 Feb 1994 05:42:40 +0000
parents 6229dd3050be
children b047e246c13d
files lisp/hexl.el
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/hexl.el	Mon Feb 07 05:40:46 1994 +0000
+++ b/lisp/hexl.el	Mon Feb 07 05:42:40 1994 +0000
@@ -171,16 +171,14 @@
     (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)