Mercurial > emacs
changeset 13599:4bb7e84fec15
(hexl-mode): Set require-final-newline to nil.
If point was at end of buffer, move it back one byte.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 20 Nov 1995 05:33:16 +0000 |
parents | 4fbb17b559bf |
children | 4c8f65a17dc9 |
files | lisp/hexl.el |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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)))