diff options
| author | Richard M. Stallman | 2004-06-13 21:58:41 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2004-06-13 21:58:41 +0000 |
| commit | 55391f5e9daed3a9ac4333501fcd7c59de9eab7f (patch) | |
| tree | 00dfc1393c5826ac95f5319d5d2a7a76bf90d135 | |
| parent | f4db52530aa107c4f3d6e9f7c11984872db9e55c (diff) | |
| download | emacs-55391f5e9daed3a9ac4333501fcd7c59de9eab7f.tar.gz emacs-55391f5e9daed3a9ac4333501fcd7c59de9eab7f.zip | |
(hexl-mode): Catch errors in hexl-goto-address.
| -rw-r--r-- | lisp/hexl.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el index cc36c37602e..883700933a8 100644 --- a/lisp/hexl.el +++ b/lisp/hexl.el | |||
| @@ -217,7 +217,9 @@ You can use \\[hexl-find-file] to visit a file in Hexl mode. | |||
| 217 | (set-buffer-modified-p modified)) | 217 | (set-buffer-modified-p modified)) |
| 218 | (make-local-variable 'hexl-max-address) | 218 | (make-local-variable 'hexl-max-address) |
| 219 | (setq hexl-max-address max-address) | 219 | (setq hexl-max-address max-address) |
| 220 | (hexl-goto-address original-point)) | 220 | (condition-case nil |
| 221 | (hexl-goto-address original-point) | ||
| 222 | (error nil))) | ||
| 221 | 223 | ||
| 222 | ;; We do not turn off the old major mode; instead we just | 224 | ;; We do not turn off the old major mode; instead we just |
| 223 | ;; override most of it. That way, we can restore it perfectly. | 225 | ;; override most of it. That way, we can restore it perfectly. |
| @@ -405,7 +407,7 @@ This function is indented to be used as eldoc callback." | |||
| 405 | Signal error if ADDRESS out of range." | 407 | Signal error if ADDRESS out of range." |
| 406 | (interactive "nAddress: ") | 408 | (interactive "nAddress: ") |
| 407 | (if (or (< address 0) (> address hexl-max-address)) | 409 | (if (or (< address 0) (> address hexl-max-address)) |
| 408 | (error "Out of hexl region")) | 410 | (error "Out of hexl region")) |
| 409 | (goto-char (hexl-address-to-marker address))) | 411 | (goto-char (hexl-address-to-marker address))) |
| 410 | 412 | ||
| 411 | (defun hexl-goto-hex-address (hex-address) | 413 | (defun hexl-goto-hex-address (hex-address) |