# HG changeset patch # User Richard M. Stallman # Date 816845596 0 # Node ID 4bb7e84fec1543365a74be80034c1f14ac7abb75 # Parent 4fbb17b559bf61b2316ee6c0c2d5e2a372695df9 (hexl-mode): Set require-final-newline to nil. If point was at end of buffer, move it back one byte. diff -r 4fbb17b559bf -r 4bb7e84fec15 lisp/hexl.el --- a/lisp/hexl.el Mon Nov 20 04:46:08 1995 +0000 +++ b/lisp/hexl.el Mon Nov 20 05:33:16 1995 +0000 @@ -182,9 +182,14 @@ (make-local-variable 'change-major-mode-hook) (add-hook 'change-major-mode-hook 'hexl-maybe-dehexlify-buffer) + (make-local-variable 'require-final-newline) + (setq require-final-newline nil) + (let ((modified (buffer-modified-p)) (inhibit-read-only t) (original-point (1- (point)))) + (and (eobp) (not (bobp)) + (setq original-point (1- original-point))) (if (not (or (eq arg 1) (not arg))) ;; if no argument then we guess at hexl-max-address (setq hexl-max-address (+ (* (/ (1- (buffer-size)) 68) 16) 15)) @@ -292,7 +297,6 @@ (defun hexl-goto-address (address) "Goto hexl-mode (decimal) address ADDRESS. - Signal error if ADDRESS out of range." (interactive "nAddress: ") (if (or (< address 0) (> address hexl-max-address)) @@ -301,7 +305,6 @@ (defun hexl-goto-hex-address (hex-address) "Go to hexl-mode address (hex string) HEX-ADDRESS. - Signal error if HEX-ADDRESS is out of range." (interactive "sHex Address: ") (hexl-goto-address (hexl-hex-string-to-integer hex-address)))