summaryrefslogtreecommitdiff
path: root/lisp/hexl.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2004-06-13 21:58:41 +0000
committerRichard M. Stallman <rms@gnu.org>2004-06-13 21:58:41 +0000
commit55391f5e9daed3a9ac4333501fcd7c59de9eab7f (patch)
tree00dfc1393c5826ac95f5319d5d2a7a76bf90d135 /lisp/hexl.el
parentf4db52530aa107c4f3d6e9f7c11984872db9e55c (diff)
downloademacs-55391f5e9daed3a9ac4333501fcd7c59de9eab7f.tar.gz
(hexl-mode): Catch errors in hexl-goto-address.
Diffstat (limited to 'lisp/hexl.el')
-rw-r--r--lisp/hexl.el6
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.
(set-buffer-modified-p modified))
(make-local-variable 'hexl-max-address)
(setq hexl-max-address max-address)
- (hexl-goto-address original-point))
+ (condition-case nil
+ (hexl-goto-address original-point)
+ (error nil)))
;; We do not turn off the old major mode; instead we just
;; 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."
Signal error if ADDRESS out of range."
(interactive "nAddress: ")
(if (or (< address 0) (> address hexl-max-address))
- (error "Out of hexl region"))
+ (error "Out of hexl region"))
(goto-char (hexl-address-to-marker address)))
(defun hexl-goto-hex-address (hex-address)