aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhillip Rulon1999-10-09 01:19:36 +0000
committerPhillip Rulon1999-10-09 01:19:36 +0000
commit330bd7c39b44338d31d6c72a0bca8c1b475cddb3 (patch)
tree72f2bd4abef69d8c2592fe0692e098a28830cd37
parent62f1e1cd5997194fa774063ea79af8973caf85a1 (diff)
downloademacs-330bd7c39b44338d31d6c72a0bca8c1b475cddb3.tar.gz
emacs-330bd7c39b44338d31d6c72a0bca8c1b475cddb3.zip
* hexl.el (hexl-mode): Do nothing if already in hexl mode.
-rw-r--r--lisp/hexl.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/hexl.el b/lisp/hexl.el
index 4a5d12c28e9..e5d55b43ca4 100644
--- a/lisp/hexl.el
+++ b/lisp/hexl.el
@@ -122,8 +122,10 @@ and \"-de\" when dehexlifying a buffer."
122 122
123;;;###autoload 123;;;###autoload
124(defun hexl-mode (&optional arg) 124(defun hexl-mode (&optional arg)
125 "\\<hexl-mode-map> 125 "\\<hexl-mode-map>A mode for editing binary files in hex dump format.
126A major mode for editing binary files in hex dump format. 126This is not an ordinary major mode; it alters some aspects
127if the current mode's behavior, but not all; also, you can exit
128Hexl mode and return to the previous mode using `hexl-mode-exit'.
127 129
128This function automatically converts a buffer into the hexl format 130This function automatically converts a buffer into the hexl format
129using the function `hexlify-buffer'. 131using the function `hexlify-buffer'.
@@ -189,13 +191,11 @@ into the buffer at the current point.
189Note: saving the file with any of the usual Emacs commands 191Note: saving the file with any of the usual Emacs commands
190will actually convert it back to binary format while saving. 192will actually convert it back to binary format while saving.
191 193
192You can use \\[hexl-find-file] to visit a file in hexl-mode. 194You can use \\[hexl-find-file] to visit a file in Hexl mode.
193 195
194\\[describe-bindings] for advanced commands." 196\\[describe-bindings] for advanced commands."
195 (interactive "p") 197 (interactive "p")
196 (if (eq major-mode 'hexl-mode) 198 (unless (eq major-mode 'hexl-mode)
197 (error "You are already in hexl mode")
198
199 (let ((modified (buffer-modified-p)) 199 (let ((modified (buffer-modified-p))
200 (inhibit-read-only t) 200 (inhibit-read-only t)
201 (original-point (1- (point))) 201 (original-point (1- (point)))